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

REQUEST: Option to type custom texture color space in Color Management #63

Closed KirilStrezikozin closed 6 months ago

KirilStrezikozin commented 7 months ago

This feature request is:

Is your feature request related to a problem? Please describe. If the user has a custom-configured color management in Blender, he'd need to change image texture color space to a custom one. The problem here is that texture color space has to be set before baking, otherwise it messes up the colors. BakeMaster only supports the default range of color spaces available within Blender @Alexandr (from Discord) faced exactly that.

Describe the solution you'd like to be implemented BakeMaster color management has a texture color space dropdown. Could a Custom Colorspace option be added to that dropdown? When this option is chosen, a field to type a custom color space will be displayed for the user.

Additional context Another feature request should be created for introducing a toggle to show the full list of color spaces for textures in BakeMaster instead of the most common ones the addon currently has.

KirilStrezikozin commented 7 months ago

TODOs:

KirilStrezikozin commented 7 months ago

1st point: Changing color space after bake actually messes up colors - True.

  1. Two baked textures, left - sRGB, right - Non-color. They look the same just after the bake. image

  2. Changed the second image's color space from Non-Color to sRGB to match the first one, colors became messed up: image

KirilStrezikozin commented 7 months ago

Same done with Agx in Blender 3.6.2 now, but strangely the result is the same for Non-color and sRGB texture baked: image

KirilStrezikozin commented 7 months ago

ah, well, obviously. In the previous comment, the right image didn't have Non-Color color space because it was not available with Agx. So they were default sRGB, hence the same colors.

Below is the correct way of doing it, with implemented custom color space property. The image on the right was baked as Generic Data (Non-color) and then changed to Appearance Punchy sRGB after bake. It visibly has messed up colors compared to the image on the left, which was initially baked with Appearance Punchy sRGB color space: image

KirilStrezikozin commented 7 months ago

The baked image on the left seems to look according to the meaning of Appearance Punchy sRGB, which solves this feature request.

KirilStrezikozin commented 7 months ago

I can still see a difference between similar colorspaces used in Blender 3.6 and Blender 4.0. Appears to me the testing should be also done in EXR, not PNG, as images out of Blender 4.0 have high saturated colors clipped, meaning the color data there was way beyond what PNG with sRGB color gamut can possibly store.

Overall: image

  1. Blender 3.6, Agx, Baked with Agx Base: DIFFUSE_AsRGBAgx_Base

  2. Blender 4.0, Agx, Baked with Agx sRGB Base: DIFFUSE_4sRGBAgx_Base

  3. Blender 3.6, Agx, Baked with Appearance Punchy sRGB: DIFFUSE_AsRGBAgx

  4. Blender 4.0, Agx, Baked with sRGB: DIFFUSE_4sRGBAgx

To conclude, I like the Blender 4.0 result more.