kma_hextiled_triplanar bug
667 3 0- kornilowadd
- Member
- 12 posts
- Joined: Oct. 2022
- Offline
- jsmack
- Member
- 7863 posts
- Joined: Sept. 2011
- Offline
kornilowadd
Why does the uv on the geometry affect the result?
because it's a normal map, which is essentially a vector field in surface space. To convert the space from surface to world space, a matrix must be constructed. This is usually done using by taking the derivatives of the uv's since the map will be in the same space as the uv coordinates. Triplanar mapping doesn't use uv's so there is no valid space with which to build a transform. The surface shader will still happily build one from the uv's if they exist--even if it makes no sense for triplanar mapping. When they do not exist, the tangents of the parametric coordinates are used instead, which for triangles are ugly nonlinear things.
In short, normal mapping cannot be used with triplanar mapping. Use a bump map or displacement instead.
- tamte
- Member
- 8647 posts
- Joined: July 2007
- Online
jsmackIs there not?
Triplanar mapping doesn't use uv's so there is no valid space with which to build a transform.
For me in theory a very logical space would be the orthogonal projection Matrix multiplied by dihedral matrix between it's Z axis and surface N, per each projection
And then blend resulting evaluated world space normals within blend regions of the projections
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- jsmack
- Member
- 7863 posts
- Joined: Sept. 2011
- Offline
tamte
Triplanar mapping doesn't use uv's so there is no valid space with which to build a transform.
Is there not?
For me in theory a very logical space would be the orthogonal projection Matrix multiplied by dihedral matrix between it's Z axis and surface N, per each projection
And then blend resulting evaluated world space normals within blend regions of the projections
yes, that would make sense, unfortunately the materialX surface shader only works with tangent space normals. It will take significant modifications to materialX as well as a new triplanar mapping node meant for normal maps--so it's not possible with MaterialX currently. It should be fairly straightforward with a VEX Mantra material though.
-
- Quick Links