triplanar map materialx

   7743   18   4
User Avatar
Member
99 posts
Joined: 11月 2018
Offline
Hi, i have troubles to understand how work triplanarmap with materialx in karma how it work?like scaling the texture or rotate it, inside 19.5, pevious there was a node called materialx usd uv transform to do that but in 19.5 there isn't anymore
Edited by Piledriver - 2022年7月31日 15:40:07
User Avatar
Member
8041 posts
Joined: 9月 2011
Offline
The USD Coordsys can be used to place 3d or 2d textures, which can also be used with the triplanar projection node. The triplanar projection node doesn't allow for a different projection for each texture though, so this may not be what you are after.

Attachments:
karma_coordsys_mtlx_test.hip (776.3 KB)

User Avatar
Member
99 posts
Joined: 11月 2018
Offline
this coordinate system node work only for cpu
User Avatar
Member
99 posts
Joined: 11月 2018
Offline
i open the scene but i don't understand why don't work i create the new one USD Coordys node
User Avatar
Member
8041 posts
Joined: 9月 2011
Offline
Piledriver
i open the scene but i don't understand why don't work i create the new one USD Coordys node

It's pretty picky about hierarchy, I had to experiment a bit. Check out the help and example file under the coordsys node.

Piledriver
this coordinate system node work only for cpu

Oh, bummer. I forgot about that limitation. For XPU, there's always multiply and add nodes.
Edited by jsmack - 2022年8月1日 00:28:37
User Avatar
Member
99 posts
Joined: 11月 2018
Offline
i tried to check the help if you mean the doc its not so clear.... hope in future sidefx implement better this triplanar because in other render engines and also with principled shader its a lot simpler
Edited by Piledriver - 2022年8月1日 04:48:30
User Avatar
Member
8041 posts
Joined: 9月 2011
Offline
Piledriver
i tried to check the help if you mean the doc its not so clear.... hope in future sidefx implement better this triplanar because in other render engines and also with principled shader its a lot simpler

what are you having trouble with? The coordsys or the triplanar texture? The coordsys is by no means required for the triplanar texture, it's just a convenient way to transform it. As for enriching the features of the node itself, since it comes from MaterialX, it would be up to them to adopt a more complex node. Alternatively, sidefx could implement a karma-specific node, but there would have to be significant demand for that.

It's also not impossible to just build your own triplanar projection yourself based on the math used by the mantra version.
User Avatar
Member
99 posts
Joined: 11月 2018
Offline
the coordsys it's my issue now i don't just unrderstand how name the attribute to make the scale work to triplanar node, i mean at the staart of this conversation the issue itself it was about the fact that i can't scale or rotate the texture for triplanar, about rotating i solved that putting a mtlxrotate node but for the scale there isn't a node to allow that, but just i give up because i'm tired, so just i don't use materialx for triplanar mapping. maybe in future when this are done better i could do that but i don't want become crazy to make something where other render engine just do in a easier way
User Avatar
Member
8041 posts
Joined: 9月 2011
Offline
Piledriver
the coordsys it's my issue now i don't just unrderstand how name the attribute to make the scale work to triplanar node, i mean at the staart of this conversation the issue itself it was about the fact that i can't scale or rotate the texture for triplanar, about rotating i solved that putting a mtlxrotate node but for the scale there isn't a node to allow that, but just i give up because i'm tired, so just i don't use materialx for triplanar mapping. maybe in future when this are done better i could do that but i don't want become crazy to make something where other render engine just do in a easier way

scale is even easier, just use the multiply node. Same as with Mantra shaders.
User Avatar
Member
99 posts
Joined: 11月 2018
Offline
what i need to multiply with? i never used mantra but with the triplanar node withprincipel shader its just easier to do that
Edited by Piledriver - 2022年8月1日 17:06:14
User Avatar
Member
8041 posts
Joined: 9月 2011
Offline
Piledriver
what i need to multiply with? i never used mantra but with the triplanar node withprincipel shader its just easier to do that

the amount you want to scale it by. Scale = multiply
User Avatar
Member
99 posts
Joined: 11月 2018
Offline
i don't have any scale node with triplanar
User Avatar
Member
8041 posts
Joined: 9月 2011
Offline
Piledriver
i don't have any scale node with triplanar

what are you talking about? There is no scale node. read my posts, use a multiply node to scale the position space. this is really just basic shader building. position multiplied by 2 is twice as many repeats of the pattern per unit of space.

Attachments:
mtlx_scale_position.png (54.4 KB)

User Avatar
Member
8785 posts
Joined: 7月 2007
Offline
I understand the frustration

I don't really get how MtlX is missing so many basic nodes, it feels like a proof of concept, but hopefully with more adoption the development will accelerate

there is Place2D node which has nice transform controls, especially Pivot which can be tedious to manage with just simple math nodes especially without full matrix math library

but Place3D is nowhere to be found, one shouldn't have to resort to external coordsys relationship or building their own math libraries for relatively basic functionality
Edited by tamte - 2022年8月1日 22:28:30
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
99 posts
Joined: 11月 2018
Offline
what talking about??? maybe you don't understand one thing, its not because i'm using houdini i'm a technical guy that building shadings all day... i just asking a basic thing that in other rendering its just easy stop... change tones with me ok?
Edited by Piledriver - 2022年8月2日 03:43:16
User Avatar
Member
4 posts
Joined: 1月 2019
Offline
I'm also trying to get the whole triplanar thing to work on my end. And through reading everything above I can replicate everything except for properly rotating each side of the triplanar individually.

I inserted a mtlxrotate3d node and rotated the X-axis 90 degrees, which does work for the X-axis's side, but for the rest of the sides my texture just becomes warped (see image).

Am i inserting the mtlxrotate3d node in the right place or what's going on? I basically want my texture to be rotated so that all sides display the grunge flowing in the same direction. I also tried splitting the "vectors" individually and tried to scale them through that, but no luck there.

Attachments:
materialX_rotateIssueTriplanar.JPG (311.9 KB)

User Avatar
Member
20 posts
Joined: 2月 2018
Offline
Fabazo
I'm also trying to get the whole triplanar thing to work on my end. And through reading everything above I can replicate everything except for properly rotating each side of the triplanar individually.

I inserted a mtlxrotate3d node and rotated the X-axis 90 degrees, which does work for the X-axis's side, but for the rest of the sides my texture just becomes warped (see image).

Am i inserting the mtlxrotate3d node in the right place or what's going on? I basically want my texture to be rotated so that all sides display the grunge flowing in the same direction. I also tried splitting the "vectors" individually and tried to scale them through that, but no luck there.


hello, were you able to resolve this
User Avatar
Member
4 posts
Joined: 1月 2019
Offline
Kwesikwaa
Fabazo
I'm also trying to get the whole triplanar thing to work on my end. And through reading everything above I can replicate everything except for properly rotating each side of the triplanar individually.

I inserted a mtlxrotate3d node and rotated the X-axis 90 degrees, which does work for the X-axis's side, but for the rest of the sides my texture just becomes warped (see image).

Am i inserting the mtlxrotate3d node in the right place or what's going on? I basically want my texture to be rotated so that all sides display the grunge flowing in the same direction. I also tried splitting the "vectors" individually and tried to scale them through that, but no luck there.


hello, were you able to resolve this

I wasn’t, no. I haven’t used the newer versions of Houdini though since I posted here.. so maybe there’s a way now?
User Avatar
Member
3 posts
Joined: 9月 2014
Offline
I've just posted an open source version of some tools for Houdini I've built over the years, including a MtlX Triplanar node that solves this rotation issue. Details can be found on the repo's README [github.com]. Please let me know what you think and if you run into any errors - I'm a one man team so the more eyes the better.

https://github.com/chris-denny/CDFXHouTools [github.com]

Cheers,
Chris
  • Quick Links