"Mtlx triplannar" normals are incorrect on different sides.

   473   7   1
User Avatar
Member
4 posts
Joined: June 2021
Offline
when using mtlx triplannar node, some sides have correct normals and some sides have incorrect normals (sphere).

Is there any way to get it correct.?

Does mtlx triplannar node supports normal maps.?


I will attach the render and material screenshot.

Attachments:
Screenshot_1.png (424.8 KB)
Screenshot_2.png (120.0 KB)
Screenshot_3.png (15.3 KB)

User Avatar
Member
6431 posts
Joined: Sept. 2011
Offline
Ajith_Martin
Does mtlx triplannar node supports normal maps.?

no, supporting normal maps with triplanar mapping is very complicated. Using bump maps is much more straightforward to implement. Normal maps for offline rendering is kind of silly anyway.
User Avatar
Member
4 posts
Joined: June 2021
Offline
jsmack
Ajith_Martin
Does mtlx triplannar node supports normal maps.?

no, supporting normal maps with triplanar mapping is very complicated. Using bump maps is much more straightforward to implement. Normal maps for offline rendering is kind of silly anyway.

Thanks jsmack. Does currently mtlx has an option for bump map.?
I think mtlx does not support bump map now.
User Avatar
Member
7156 posts
Joined: July 2007
Offline
jsmack
no, supporting normal maps with triplanar mapping is very complicated.
I don't see why it has to be complicated
Obviously you don't want to use already triplane blended normal map in tangent space
Especially because you don't even want to use tangent space to begin with as the whole purpose of triplanar mapping is to not have to have uvs

But I believe triplanar mapping node should properly support normal maps itself and output blended corrected vectors in world/camera space

Bump mapping is less ideal as for the same resolution you are getting softer results due to having to rely in derivatives to compute normals
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
6431 posts
Joined: Sept. 2011
Offline
tamte
I don't see why it has to be complicated
Obviously you don't want to use already triplane blended normal map in tangent space
Especially because you don't even want to use tangent space to begin with as the whole purpose of triplanar mapping is to not have to have uvs

It's complicated exactly because of that. The triplanar map node simply blends images based on the normal, which doesn't make sense for normal maps. The other issue is that the tangent space is not well defined for triplanar maps. The shader could use the plane space as the tangents, but then the normal will be wrong as it wraps around the shape. It would need to project the tangent space onto the surface to make it orthogonal.

Ajith_Martin
I think mtlx does not support bump map now.

Use Mtlx Height to Normal

tamte
Bump mapping is less ideal as for the same resolution you are getting softer results due to having to rely in derivatives to compute normals

triplanar is already going to be soft, it doesn't matter
Edited by jsmack - Nov. 29, 2022 12:21:14
User Avatar
Member
7156 posts
Joined: July 2007
Offline
jsmack
It would need to project the tangent space onto the surface to make it orthogonal.
Exactly, I don't see a math problem in that, since you have tangents from plane and base normal from the geo, so should be possible to create orthogonal basis simply because the projection is already limited to be <90°
But I may be missing something as I haven't tried to implement it
I'd just expect proper triplanar node to support that
Edited by tamte - Nov. 29, 2022 14:12:16
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
6431 posts
Joined: Sept. 2011
Offline
tamte
But I may be missing something as I haven't tried to implement it
I'd just expect proper triplanar node to support that

I've tried to implement it but the nodes to properly support matrix math/quaternions is lacking in materialX
User Avatar
Member
7156 posts
Joined: July 2007
Offline
jsmack
I've tried to implement it but the nodes to properly support matrix math/quaternions is lacking in materialX
Unfortunately MaterialX is lacking too much to be useful to describe a lot of necessary functions
Hopefully there will be a proper push in it's development to describe low level functions that most shading languages support
Otherwise Karma would need to expose a proper shading language to users rather than rely only on limited MatrialX interface
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links