(Solved) Triplanar Normal Mapping with PrincipledShader

   2335   8   0
User Avatar
Member
36 posts
Joined: Nov. 2013
Offline
Hi!

For texture baking, I am trying to set up some simple normal map patterns but triplanar normal maps seem a bit tricky with mantra. The uvtriplanarproject node only outputs color which can't be fed directly into the baseN parameter because it expects a converted normal map from the displace/normal texture node....

Does anyone know how this works?

Thanks
Felix
Edited by Fele - Aug. 12, 2022 02:41:49

Attachments:
normaltri.jpg (51.0 KB)

User Avatar
Member
7801 posts
Joined: Sept. 2011
Offline
convert the tangent normal map value to local space normals that the principled shader expects with a tangent normal remap node or a displace node set to 'normal map' mode.
User Avatar
Member
36 posts
Joined: Nov. 2013
Offline
thanks jsmack, I tried hooking it up like you said. The normal map works but the triplanar does something strange... but maybe I got it totally wrong...

would be great if you had a minute to look at this file

thanks
felix

Attachments:
normaltriplanar.zip (497.8 KB)

User Avatar
Member
7801 posts
Joined: Sept. 2011
Offline
Fele
thanks jsmack, I tried hooking it up like you said. The normal map works but the triplanar does something strange... but maybe I got it totally wrong...

Oh right, duh. I'm an idiot. You can't just use normal maps with triplanar mapping like that. The normal maps need to be transformed from tangent space, but the tangent space of triplanar maps is different for each planar map. I'm sure you could build a node that did it correctly, but you'd have to figure out the combining. Is this for baking as a tangent normal map, with standard uv's? I'm sure someone has figured this out already, you just need to find the right shader code.
User Avatar
Member
36 posts
Joined: Nov. 2013
Offline
Thx for looking into it.
Yes it's for baking BPR textures using the simplebaker.

I could use the existing uvs of the geo for the mapping, but triplanar would give cleaner/smoother results...
User Avatar
Member
7801 posts
Joined: Sept. 2011
Offline
Fele
I could use the existing uvs of the geo for the mapping, but triplanar would give cleaner/smoother results...

I mean for the baking, not for the mapping. Normal maps are meaningless without a corresponding tangent space derived from uvs.
User Avatar
Member
36 posts
Joined: Nov. 2013
Offline
I found a tutorial by O.Somg where he uses the "displace along normal" Node which looks like its working.

Going to compare the output with the regular normal map and will post my results.

https://youtu.be/6Mmd5r5Ektw [youtu.be]
around 17:20
User Avatar
Member
7801 posts
Joined: Sept. 2011
Offline
Fele
I found a tutorial by O.Somg where he uses the "displace along normal" Node which looks like its working.

Going to compare the output with the regular normal map and will post my results.

https://youtu.be/6Mmd5r5Ektw [youtu.be]
around 17:20

Yeah, if you've got bump maps instead of normal maps, displace along normal will be much simpler
User Avatar
Member
36 posts
Joined: Nov. 2013
Offline
I think I found a solution.

Haven't fully exposed/set up all parameters to the subnet yet, but the general triplanar normal mapping with scale and intensity works.
Edited by Fele - Aug. 11, 2022 15:19:27

Attachments:
triplanar.zip (2.7 MB)

  • Quick Links