KirilStrezikozin / BakeMaster-Blender-Addon

Welcome to BakeMaster, a powerful and feature-packed baking solution created for Blender - an open-source 3D Computer graphics software.
Other
34 stars 6 forks source link

FEAT: Texture channel packing for vertex colors #49

Closed KirilStrezikozin closed 6 months ago

KirilStrezikozin commented 9 months ago

This bug report is:

Describe the bug Kas.st#8843 initially reported this on Discord. In short, when baking maps to vertex colors with a channel pack set up for these maps, the channel pack is not performed and only the first vertex color bake is saved, others are blank. Reason: channel packing was not implemented for maps baked to vertex colors.

To Reproduce Steps to reproduce the behavior:

  1. Add 2 maps (e.g. AO and Curvature).
  2. Set bake to Vertex Colors.
  3. Bake.
  4. Only the first map is saved to a new vertex color layer, others are blank, and no channel pack.

Expected behavior Channel packing for maps baked to vertex colors to work properly.

Screenshots image image

Desktop (please complete the following information):

Additional context @Kas.st#8843 replied:

I thinking a good approach to fixing the issues are to 1. fix the overwriting of the first vertex attribute => all data is written to the channels, 2. post process packing: create new attribute and copy individual channels. (3. delete 'buffer attributes')

KirilStrezikozin commented 9 months ago

Todo:

KirilStrezikozin commented 9 months ago

Since vertex color layers are now properly written and saved, the channel packing feature can be implemented for them. Todo:

My integration would be:

  1. ~Create a new attribute~ Select the 'holder' attribute (like it is done for the regular channel pack with images).
  2. Write individual channels from layers from the channel pack into corresponding RGBA channels of the 'holder' layer.
  3. Delete 'buffer attributes'.