Hi
I'm trying to assign random colours to the hair procedural, but not having much luck.
I've already randomized the id's at SOP level since I couldn't figure this out at shader level. no MtlX randomize?
What should I add in the PrimVarReader? "id" works on the guides render, but doesn't seem to on the procedural.
I did add "id" to the Attributes to Copy on the Hair procedural, but not sure how to access this from the shader?
Thanks
J
guides
render
Hair Procedural random ID's
2135 5 1- JasonSlab
- Member
- 1533 posts
- Joined: March 2020
- Offline
- jsmack
- Member
- 8000 posts
- Joined: Sept. 2011
- Offline
I don't believe there is one. The hair shader has a randomize function, but uses an internal id generator. ID on guides is useless since multiple guides are interpolated to each generated curve. The procedural sop network would be tasked with creating an id primvar at run time, but I don't think it does.
- JasonSlab
- Member
- 1533 posts
- Joined: March 2020
- Offline
O thanks man, pitty there isn't a option on the procedural, at least I wasn't missing something obvious..
Yeah I figured there would be some interpolation issues, and would end up in a sort of clumped look, but was curious to try.
Pity the hair shader doesn't have a bit more control for randomization, I'm using the Diffuse component, which doesn't randomize.
Guess one could always send off some RFE's
Yeah I figured there would be some interpolation issues, and would end up in a sort of clumped look, but was curious to try.
Pity the hair shader doesn't have a bit more control for randomization, I'm using the Diffuse component, which doesn't randomize.
Guess one could always send off some RFE's
- goldleaf
- Staff
- 4193 posts
- Joined: Sept. 2007
- Offline
The procedural does output
Hope this helps in the meantime.
primvars:id
on the Procedural Prim curves. I think the problem is the int to float connection, which for some reason isn't just auto-converted in every case? Also generating simple random numbers for Karma/MaterialX in-shader is more awkward than it should be, we're working on it.Hope this helps in the meantime.
I'm o.d.d.
- JasonSlab
- Member
- 1533 posts
- Joined: March 2020
- Offline
- pelos
- Member
- 621 posts
- Joined: Aug. 2008
- Offline
try fabio https://www.sidefx.com/forum/topic/92598/ [www.sidefx.com]
it use the materialX ready for gpu and in the nodes randomize for the curves
it use the materialX ready for gpu and in the nodes randomize for the curves
-
- Quick Links