Author Topic: Should triplanar and UVW Randomiser be last in the chain?  (Read 3064 times)

2023-02-07, 15:59:11
Reply #30

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8839
  • Let's move this topic, shall we?
    • View Profile
    • My Models
So, i've tried to approach the issue more systematically and set up comparison between various texture rotation methods. My findings are interesting - when normal map is involved, you can only rotate UV coordinates at object level, but not at a map level, otherwise inevitably you will get wrong result. It's not randomizer's fault, you will get the same wrong result if you rotate coordinates in bitmap node, or indeed in Photoshop. It's logical outcome when you think about it. The only solution i can think of, if Corona would remap normal texture on the fly based on W angle rotation. I think technically this shouldn't be hard to do, although it might be quite expensive computationally. It still would be better than current situation where no normal map rotation is possible at a map level.

Below i'm attaching rendered examples. 1st is displacement only, no normal map. This is ground truth. 2nd to 4th - normal map is rotated at object level - renders correctly. 5th and 6th - normal map is rotated at map level - renders incorrectly.

Sorry for not providing the scene, but UV rotation is mess in 3ds Max, each method has its own mind where rotation center should be and even how offset works, so my test setup ended up pretty complicated. On the other hand it's very easy to reproduce the issue, you just need any normal map with distinct features, map it on a plane, create light source with sharp shadows and rotate the texture at the map level (with randomizer, or in bitmap node directly), you should notice the issue in no time.

This is the same issue I was having here right? https://forum.corona-renderer.com/index.php?topic=37957.0

Yes, i believe it is.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-04-14, 20:16:24
Reply #31

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8839
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Just to update things - apparently the solution to the issue is to keep correct order of nodes. Corona normal node must go before UVW randomizer, which must go before triplanar. More information about this can be found at Chaos support portal: https://support.chaos.com/hc/en-us/articles/13800753963537
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures