Bad reading of normal map

Forums: Bad reading of normal map
Newtek Lightwave 3D (exporter developed by holocube, Integrated Plugin developed by juanjgon)

Bad reading of normal map

Postby Acrom » Mon Mar 18, 2019 2:25 pm

Acrom Mon Mar 18, 2019 2:25 pm
Hi,

I am rendering some test and i have a problem with the normal map and Octane. I attach 2 examples with red zones where Octane flips the normal map. Native render of lightwave works fine.

any idea?

thanks!
Attachments
Render_LW.jpg
Render_Octane.jpg
Lightwave 15 + Octane Render | 4x GeForce TitanBlack | Intel i7 4.5Ghz http://www.ricardourbano.com
Acrom
Licensed Customer
Licensed Customer
 
Posts: 147
Joined: Mon Feb 03, 2014 6:34 pm
Location: Madrid, Madrid, Spain

Re: Bad reading of normal map

Postby juanjgon » Mon Mar 18, 2019 9:43 pm

juanjgon Mon Mar 18, 2019 9:43 pm
Hi,

The normals seem inverted or something like that. Do they come from an 8-bit file format, like a JPG or PNG? I ask because in this case the problem can be related to the gamma correction in the texture image node.

Thanks,
-Juanjo
Computer Graphics Software Developer
Octane plugin development and support: LightWave and Houdini
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 7056
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: Bad reading of normal map

Postby Acrom » Wed Mar 20, 2019 11:29 am

Acrom Wed Mar 20, 2019 11:29 am
Hi,

I have rendered in EXR format and the problem is the same. I have set the gamma of texture image node to 1 but the problem continues...

Thanks!
Lightwave 15 + Octane Render | 4x GeForce TitanBlack | Intel i7 4.5Ghz http://www.ricardourbano.com
Acrom
Licensed Customer
Licensed Customer
 
Posts: 147
Joined: Mon Feb 03, 2014 6:34 pm
Location: Madrid, Madrid, Spain

Re: Bad reading of normal map

Postby juanjgon » Wed Mar 20, 2019 12:39 pm

juanjgon Wed Mar 20, 2019 12:39 pm
Hmm, I'm not sure what could be the problem. Have you tried to invert the texture to see if it helps? If you want to share the scene, I could take a look at it here.

Thanks,
-Juanjo
Computer Graphics Software Developer
Octane plugin development and support: LightWave and Houdini
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 7056
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: Bad reading of normal map

Postby Acrom » Wed Mar 20, 2019 3:58 pm

Acrom Wed Mar 20, 2019 3:58 pm
Ok Juanjo, i attach the content. In the scene, the two materials are ready (LW and Octane). I attach a JPG too.

Thanks!!
Attachments
Content.zip
(8.47 MiB) Downloaded 21 times
Revision.jpg
Lightwave 15 + Octane Render | 4x GeForce TitanBlack | Intel i7 4.5Ghz http://www.ricardourbano.com
Acrom
Licensed Customer
Licensed Customer
 
Posts: 147
Joined: Mon Feb 03, 2014 6:34 pm
Location: Madrid, Madrid, Spain

Re: Bad reading of normal map

Postby juanjgon » Mon Mar 25, 2019 1:06 pm

juanjgon Mon Mar 25, 2019 1:06 pm
To be honest I don't know why the Octane normal mapping doesn't match the LW one. The texture flip works, but what I don't understand is why the map is good for some objects, the left ones, for example, and wrong for the other objects. I wonder if the problem is the object vertex map, or perhaps the way used by Octane to apply the normal maps using tangents or something like that.

If I find something I'll let you know, but meanwhile, you are going to need to use different materials for the left and right objects and use the texture flip to fix the objects that are wrong.

Thanks,
-Juanjo
Computer Graphics Software Developer
Octane plugin development and support: LightWave and Houdini
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 7056
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: Bad reading of normal map

Postby Lewis » Mon Mar 25, 2019 11:10 pm

Lewis Mon Mar 25, 2019 11:10 pm
I think that goes way back to v3 or so, i had some similar problems on some older projects where sunny side of building wall looked wrong and shadow wall opposite to that looked right and they were using same materils/normal map.
I though it's just an illusion and i never checked in native but now when i see this topic i'm pretty sure it's octane BUG/issue.
--
Lewis
http://www.ram-studio.hr
Skype - lewis3d
ICQ - 7128177

WS Dual Xeon E5-2698v4, 128GB RAM, Win10, 2x2080Ti + 2x1080Ti
RS1 Dual Xeon E5-2690, 64GB RAM, Win8, 2080Ti + 2x1080Ti + TitanX(M)
RS2 i7 6850K, 64GB RAM, Win10, 2*1080Ti
User avatar
Lewis
Licensed Customer
Licensed Customer
 
Posts: 797
Joined: Tue Feb 05, 2013 6:30 pm
Location: Croatia

Re: Bad reading of normal map

Postby milanm » Tue Mar 26, 2019 5:44 am

milanm Tue Mar 26, 2019 5:44 am
Yes Lewis is right, actually this goes even further back than V3...

Long story short, there are two long standing issues with normal (& bump) maps in Octane:

1. They depend on UVs. If you mirrored your object, but kept UVs as they are, your normals will be flipped. To fix this you could create a copy of a material with a flipped (inverted green or red channel) normal map and assign it to the flipped part of the mesh. Or you could flip one of the channels of the normal map in your shading network. See this.

2. Depending on the camera angle, they might not render correctly. This can be solved (to some extent) by replacing the blue channel with a constant linear value of 1 (or 255 in 8bit) or by reducing the intensity of the normal map in the ImageTexture node. You could also use falloff to reduce intensity of the bump/normal on the edges. See this (apologies for the huge post, I hope those gifs help explain this).

Cheers
Milan
Colorist / VFX artist / Motion Designer
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
milanm
Licensed Customer
Licensed Customer
 
Posts: 261
Joined: Tue Apr 30, 2013 7:23 pm

Re: Bad reading of normal map

Postby Acrom » Tue Mar 26, 2019 11:25 am

Acrom Tue Mar 26, 2019 11:25 am
Thanks for all answers.

Juanjo, can you report this problem to the Octane Team? I think that is a big issue they have to resolve.

Thank you very much.
Lightwave 15 + Octane Render | 4x GeForce TitanBlack | Intel i7 4.5Ghz http://www.ricardourbano.com
Acrom
Licensed Customer
Licensed Customer
 
Posts: 147
Joined: Mon Feb 03, 2014 6:34 pm
Location: Madrid, Madrid, Spain

Re: Bad reading of normal map

Postby trogers » Thu Oct 31, 2019 9:48 pm

trogers Thu Oct 31, 2019 9:48 pm
Hi, I've been dealing with this same issue over the past week trying to get my normal textures to look right (not flipped) on a non UV'd geo using triplanar projection. I have had some luck in UV'ing the geo and flipping the individual UV islands, but not only does this not make any sense to have to do when using triplanar projection, it's a huge hassle to have to correct.

In researching this it seems that that this is a long standing issue not just with Octane, but with normal mapping (particularly in relation to triplanar mapping) in general across the industry. I came across this article on Medium by Ben Golus that addresses this issue directly: https://medium.com/@bgolus/normal-mappi ... bf39dca05a In the article he not only explains the reasons why this happens, but provides the code necessary to solve the issue: https://github.com/bgolus/Normal-Mappin ... nar-Shader The solution is written for Unity, but I'm sure could possibly lend some insight into how this problem could be solved within Octane.

I'm wondering as well, while we wait for a fix, if anyone here has enough familiarity with OSL to try and port over Ben's solution to create an Octane projection node that could be shared with the community.
trogers
Licensed Customer
Licensed Customer
 
Posts: 7
Joined: Sun Jan 13, 2019 11:00 pm
Location: Los Angeles

Return to Lightwave 3D


Who is online

Users browsing this forum: No registered users and 0 guests

Thu Nov 21, 2019 12:37 am [ UTC ]