Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
KirilStrezikozin opened this issue Jan 23, 2024 · 6 comments
Closed
2 tasks done
Assignees
Labels
feature upgrade for your old lawnmower solved How could you? GPT helped?

Comments

@KirilStrezikozin
Copy link
Owner

KirilStrezikozin commented Jan 23, 2024

This feature request is:

  • not a duplicate
  • implemented

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 KirilStrezikozin self-assigned this Jan 23, 2024
@KirilStrezikozin KirilStrezikozin added the feature upgrade for your old lawnmower label Jan 23, 2024
@KirilStrezikozin KirilStrezikozin added this to the BakeMaster 2.6.0 milestone Jan 23, 2024
@KirilStrezikozin KirilStrezikozin added the in progress All night I stay not sleeping because I'm thinking about this label Jan 23, 2024
@KirilStrezikozin
Copy link
Owner Author

KirilStrezikozin commented Jan 23, 2024

TODOs:

  • Check if changing color space after baking actually messes up image colors.
  • Install Agx into Blender 3.6.
  • Repeat 1st point again.
  • Add a custom color space option into colorspace drawdown items.
  • Update UI to display a field to enter custom color space.
  • Update get_colorspace() functions and dependencies to get the correct color space.
  • Testing and publishing 2.6.0a4

@KirilStrezikozin
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link
Owner Author

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
Copy link
Owner Author

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

@KirilStrezikozin
Copy link
Owner Author

KirilStrezikozin commented Jan 23, 2024

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.

@KirilStrezikozin KirilStrezikozin added solved How could you? GPT helped? close on release done here, but let's wait for the release and removed in progress All night I stay not sleeping because I'm thinking about this labels Jan 23, 2024
KirilStrezikozin added a commit that referenced this issue Jan 27, 2024
Merge local branch 'dev-2.6.0-issue63' into dev-2.6.0
@KirilStrezikozin KirilStrezikozin removed the close on release done here, but let's wait for the release label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature upgrade for your old lawnmower solved How could you? GPT helped?
Projects
None yet
Development

No branches or pull requests

1 participant