Page 1 of 2

Can mirrored normal maps bug be corrected from Modo Plugin?

PostPosted: Fri Jan 29, 2016 8:07 pm
by adamnerva
Hi Paul,

This is a bit of a longshot, but I have been getting annoyed by a normal map related bug in Octane, and I was wondering if it could be corrected from within the Modo plugin. Normal maps assigned to mirrored UVs render inverted. I am working on a scene that started as a real-time environment, and so utilizes lots of mirroring and such. Is there any way for the Modo Octane plugin to detect and correct/compensate for this error? Or is this a non-trivial issue that would be better to push for a fix in the Octane render engine?

Thanks.

Re: Can mirrored normal maps bug be corrected from Modo Plugin?

PostPosted: Mon Feb 01, 2016 5:01 am
by face_off
Could you pls send me a very simple Modo scene when demonstrates this problem pls, and I will take a look.

Paul

Re: Can mirrored normal maps bug be corrected from Modo Plugin?

PostPosted: Tue Feb 02, 2016 3:53 am
by adamnerva
OK, I sent you a PM with an LXO.

Thanks, Paul.

Normal_bug_Capture.PNG
Octane render normal map mirrored UVs bug

Re: Can mirrored normal maps bug be corrected from Modo Plugin?

PostPosted: Tue Feb 02, 2016 1:09 pm
by face_off
Thanks for sending the scene through. I can now reproduce the problem. I will need to submit it to Otoy for further analysis. I will post here once I know more.

Paul

Re: Can mirrored normal maps bug be corrected from Modo Plugin?

PostPosted: Tue Feb 02, 2016 6:40 pm
by adamnerva
Awesome! Thanks, Paul. I also sent you a Modo internal renderer shot with colorspace set to none in the image properties so you can see how it should look.

Modo-Render-Capture.PNG
Mirrored normal map rendered correctly in Modo internal render engine.

Re: Can mirrored normal maps bug be corrected from Modo Plugin?

PostPosted: Sun Feb 07, 2016 4:05 am
by face_off
Status Update:

I can reproduce this problem. And if the normal map is plugged into the diffuse pin it renders correctly - so the UV's are fine. I have sent the scene to Otoy who have had a look. I will ask them to provide an explanation of the issue, since it's over my head.

Paul

Re: Can mirrored normal maps bug be corrected from Modo Plugin?

PostPosted: Mon Feb 08, 2016 2:36 am
by adamnerva
Thanks!

Re: Can mirrored normal maps bug be corrected from Modo Plugin?

PostPosted: Mon Feb 08, 2016 11:22 pm
by roeland
There is indeed a bug in Octane which causes it to use a wrong “tangent vector” when the UV map is mirrored. This vector determines the orientation of the normal map distortion (more specifically: the color (1.0, 0.5, 0.5) specifies a distortion in the direction of this vector).

We will fix that bug, but this however will not fix the problem with this render. At the moment Octane assumes that the UV mapping is not mirrored, and it will also not mirror any distortions in the normal map. So you still end up with a normal which is mirrored around the U axis in 2 of the 4 quadrants:

Let's for example use a simple normal map:
border-tiny-corner.png
Normal map example
border-tiny-corner.png (1.99 KiB) Viewed 3476 times


And render it on a square with mirrored UV coordinates in the 4 quadrants:
example render.png


Note that although you only see one seam, the normal map is wrong in the upper right and lower left quadrant. Note the orientation of the highlights on the mirrored n.

Using just the usual UV mapping on a plane and relying on our mirror border mode for textures doesn't result in edges, but it still results in wrong orientations because the normal map distortion still needs to be mirrored in the right and bottom parts of the quad (note the bottom border).
example render 2.png


We are at the moment not planning to implement this kind of mirroring in Octane. The only way right now is to convert this normal map into a bigger normal map covering all 4 quadrants (and applying the right mirroring). Is this a common use case?

--
Roeland

Re: Can mirrored normal maps bug be corrected from Modo Plugin?

PostPosted: Tue Feb 09, 2016 12:07 am
by adamnerva
Hey, well thanks for at least looking into it. It works in Modo, Redshift, and of course game engines, so it is doable, but different engines have different priorities and schedules.

Thanks.

Re: Can mirrored normal maps bug be corrected from Modo Plugin?

PostPosted: Tue Feb 09, 2016 12:17 am
by oguzbir
roeland wrote:We are at the moment not planning to implement this kind of mirroring in Octane. The only way right now is to convert this normal map into a bigger normal map covering all 4 quadrants (and applying the right mirroring). Is this a common use case?
Roeland


Roeland I've already mentioned this in 3dsmax bug report, thinking that it is a bug related to Max plugin. Not being able to apply the mirroring as it should.
Please read my post here.
viewtopic.php?f=81&t=52450
Well I think this is actually an essential and frequently common case, I guess especially for octane plugins where use of mirroring or symmetry bunch of times.
So now I seems like we lost that functionality entirely. It's sad.
The same scenario doesnt work with Displacement though. Just when you use it as bump or normal bump. ( havent tried it with specularity maps.)
So there is no way to solve this?