Solaris/SOP copy to point and materials help

   4011   7   1
User Avatar
Member
365 posts
Joined: Nov. 2015
Offline
Hi guys, I have a palm tree and the fronds were created using the copy to points SOP. All the fronds are instances of the same geometry in SOPS but I have a few texture variations so I'll have a few different materials with each texture. I have a name and path attribute on the fronds for Solaris so they come in as one combined prim in LOPS. How can I randomly assign a material variation to each frond? In SOPS, Do I have to bring in each frond as a separate prim? and if so what's a great workflow for that?

The copy to points SOP supports a shop_material attribute that we can use to vary material for each copy instance, How can I replicate something like thins in Solaris? Thanks a ton in advance.

Attachments:
lops_hierarchy.jpg (11.7 KB)
lops_hierarchy1.jpg (153.6 KB)

hou.f*ckatdskmaya().forever()
User Avatar
Member
354 posts
Joined: Nov. 2013
Offline
There’s a recent thread about driving texture paths via string primvars here:

https://www.sidefx.com/forum/topic/82989/ [www.sidefx.com]

Alternatively I would say this is a good scenario for offsetting the uv’s on the fronds to pick up a different pattern within the same texture file. Unless the camera is going to get insanely close, an individual front isn’t going to need the entire texture space (particularly wrt frond width)
User Avatar
Member
365 posts
Joined: Nov. 2015
Offline
antc
There’s a recent thread about driving texture paths via string primvars here:

https://www.sidefx.com/forum/topic/82989/ [www.sidefx.com]

Alternatively I would say this is a good scenario for offsetting the uv’s on the fronds to pick up a different pattern within the same texture file. Unless the camera is going to get insanely close, an individual front isn’t going to need the entire texture space (particularly wrt frond width)
Hello @antc, Thanks for the ideas. The uv for each frond actually span several udims because it’s actually an HDA built to generate ‘hero’ fronds. But I’d like to know how I could get each frond to randomly pick a material from say a choice of 3 materials. I see a few places where I’d use this. Would it be efficient to have each frond be its own prim or is there a better way (
i’ll try the ideas from the link, but I see it saying it won’t work on third party renderers and I’m using redshift) This is definitely a kind of problem I’d like to know how to solve.
hou.f*ckatdskmaya().forever()
User Avatar
Member
354 posts
Joined: Nov. 2013
Offline
I see thanks for explaining. So, USD supports multiple materials on the same mesh via GeomSubset prims. You can bind a material to the GeomSubset prim instead of the mesh. SOP import has an option to convert SOP primitive groups into GeomSubset prims. From there you just need to assign a material to the GeomSubset prim(s).

Attachments:
subsets.png (687.0 KB)

User Avatar
Member
365 posts
Joined: Nov. 2015
Offline
antc
I see thanks for explaining. So, USD supports multiple materials on the same mesh via GeomSubset prims. You can bind a material to the GeomSubset prim instead of the mesh. SOP import has an option to convert SOP primitive groups into GeomSubset prims. From there you just need to assign a material to the GeomSubset prim(s).

Nice, I remember seeing a post on here where someone was saying to avoid GeomSubsets as they have a lot of limitations, so I just avoided them but If it works here then I’ll use them in this scenario.
hou.f*ckatdskmaya().forever()
User Avatar
Member
354 posts
Joined: Nov. 2013
Offline
GeomSubset's only have one purpose afaik which is to bind multiple materials to a mesh. So they are pretty simple, but may or may not have bugs of course.
User Avatar
Member
365 posts
Joined: Nov. 2015
Offline
antc
GeomSubset's only have one purpose afaik which is to bind multiple materials to a mesh. So they are pretty simple, but may or may not have bugs of course.
Thanks a lot @antc, I'll just create a group for each frond the copy SOP create and use GeomSubsets.
hou.f*ckatdskmaya().forever()
User Avatar
Member
365 posts
Joined: Nov. 2015
Offline
Vary Material Assignment LOP doesn't seem to work with GeomSubsets

Using VEX to vary the assignments in a Assign Material LOP works with GeomSubsets though, so, I guess maybe that's the way to go for now.
hou.f*ckatdskmaya().forever()
  • Quick Links