Black color is incorrect from rgb4k_map.ppm

Forums: Black color is incorrect from rgb4k_map.ppm
Houdini Integrated Plugin

Moderator: juanjgon

Black color is incorrect from rgb4k_map.ppm

Postby TheNikand » Fri Feb 03, 2023 3:44 pm

TheNikand Fri Feb 03, 2023 3:44 pm
Hi, I'm using Cd point attribute to color packed intances with copy to point. My problem is Black gets a slight colored tint from hdr(I think) when using rgb4k_map.ppm in a texture_instance_color node(Color space is set to non-color data.
If colorspace is set to sRGB(texture_instance_color). Black is correct but other colors are incorrect(too dark).

2 examples. A uses vertex Cd, B uses point Cd(and copy to point packed instance), both Cd have 0,0,0 value. B render gets a slight purple tint.
Used contrast filter in affinty to make AB comparison more visible.
Aces, octane 2022.1.0.6

/Nikolaj
Attachments
color_Cd_vertex_vs point attrib.jpg
TheNikand
Licensed Customer
Licensed Customer
 
Posts: 32
Joined: Mon Jul 11, 2011 11:09 pm

Re: Black color is incorrect from rgb4k_map.ppm

Postby juanjgon » Sun Feb 05, 2023 8:43 am

juanjgon Sun Feb 05, 2023 8:43 am
I'm afraid that this is a side effect of how the ppm texture workaround works. Due to some math limitations, the colors are only defined from 0.02 to 0.98, so it is not possible to process a perfect black or white Cd value.

You could try to use math nodes in the shader to expand this 0.02-0.98 range to 0-1, for example using a gradient or thinking that this can be done using color = (ppm_color - 0.02)*1.04166

Hope it helps,
-Juanjo
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: Black color is incorrect from rgb4k_map.ppm

Postby TheNikand » Sun Feb 05, 2023 5:05 pm

TheNikand Sun Feb 05, 2023 5:05 pm
Thanks Juanjo that makes sense, I will work around it.
I'm also seeing slight colorvariations from using same color in color RGB node(octane material) and vs a colornode in sop(with Cd attrib). Is this expected?

/Nikolaj
TheNikand
Licensed Customer
Licensed Customer
 
Posts: 32
Joined: Mon Jul 11, 2011 11:09 pm

Re: Black color is incorrect from rgb4k_map.ppm

Postby juanjgon » Sun Feb 05, 2023 7:54 pm

juanjgon Sun Feb 05, 2023 7:54 pm
It could be possible, yes. The information packed inside the ppm texture is limited, not all colors can be represented.

-Juanjo
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: Black color is incorrect from rgb4k_map.ppm

Postby TheNikand » Wed Feb 08, 2023 2:15 pm

TheNikand Wed Feb 08, 2023 2:15 pm
The best solution I found was using the sRGB colorspace in texture instancer which does get clean blacks unlike non-color data.
The confusion comes from vertex Cd attribute node which I have always used directly into albedo. Texture instancer has to be set to non-color data for matching colors(but renders black incorrectly even with values above 0.02).

Solution for color consistency between ppm texture and Cd vertex attrib using same color node(sop):
Color vertex attrib + colorcorrect node set to gamma 2.2
Texture instance color node set to sRGB

/Nikolaj
TheNikand
Licensed Customer
Licensed Customer
 
Posts: 32
Joined: Mon Jul 11, 2011 11:09 pm

Return to Houdini


Who is online

Users browsing this forum: No registered users and 5 guests

Tue Apr 16, 2024 6:27 am [ UTC ]