Accessing unpacked Geo in LOPs

   1724   6   1
User Avatar
Member
166 posts
Joined: Nov. 2013
Offline
I'm using a sopmodify to unpack geo and query which prims are in which UDIM tile. The reason for this is our texturing dept have set up rules such as "UDIMs 1001-1010 get the glass texture, UDIMs 1011-1020 get the metal texture etc". This allows me to assign Cd and other attrs based on which range of UDIMs they fit into, and I'm hoping to use these new attrs to create collections and assign materials in LOPs.

The issue is that all geo comes back into LOPs as packed prims, so one packed bit of geo may have multiple different attribute values per prim. Now, as I said above, I assigned @Cd (and other attrs) to each region, like red for metal, blue for glass etc. As @Cd translates to displayColor, this all works fine and respects those colors in the LOPs viewport - alas, the other attributes have conflicts due to full unpacked geo not being accessible (even though displayColor seems to be able to access it).

Is there a way to access/assign rules to unpacked geo in LOPs? I've tried every different parm on the Import from SOPs tab on the sopmodify lop, but can't seem to get the lower-level granular access to shapes to create accurate collections.
Edited by Hamilton Meathouse - April 12, 2021 18:34:20
User Avatar
Staff
4435 posts
Joined: July 2005
Offline
I'm afraid I'm not understanding your question. I think some of it may just be terminology issues... Unfortunately USD has its own terms for a lot of things and they don't necessarily line up with the SOPs terms for similar concepts. Are you trying to take one USD mesh primitive and split it into several different USD mesh primitives so you can assign a different material to each primitive? If so, you may want to look into using SOP groups to define USD "Geometry subsets". These are essentially equivalent to SOP primitive groups, and in USD materials can be assigned to these subsets. You can't set USD primvars directly on these subsets, but you can define uniform primvars on the whole mesh and just ensure that the same value is used for all polygons in each subset. Or you could skip the primvars completely and just make a new material for each subset with the per-subset overrides you want.

Or maybe I'm totally misunderstanding what you're trying to accomplish. In which case maybe a simple hip file example would help get everyone on the same page?
User Avatar
Member
166 posts
Joined: Nov. 2013
Offline
After further investigation, it seems the modeler has assigned UVs from a single piece of connected geometry across 2 different UDIMs.

Obviously in SOPs it's no problem to see that and work with it, but we don't want (and I don't think LOPs supports) per-face material assignment.

It sounds like USD Geom Subsets is what will help solve the issue - I'll give that a whirl. In the meantime, I have shown people the error of their UVing ways...
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
Hamilton Meathouse
After further investigation, it seems the modeler has assigned UVs from a single piece of connected geometry across 2 different UDIMs.

that's not abnormal, unless you mean faces are straddling the boundary between udims, that's not desirable. For characters, which are usually one piece of connected geo, I've seen them spread out over a dozen or more udims.
User Avatar
Member
166 posts
Joined: Nov. 2013
Offline
jsmack
For characters, which are usually one piece of connected geo, I've seen them spread out over a dozen or more udims.

True, but for characters it would usually be multiple materials layered/blended into a single material which is then assigned to that piece of geo.

This is for vehicles, and for simplicity/automation's sake we want to assign a single material for the geo with car paint, a single material for geo with fabric/glass/rubber etc.
User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
Hamilton Meathouse
This is for vehicles, and for simplicity/automation's sake we want to assign a single material for the geo with car paint, a single material for geo with fabric/glass/rubber etc.

In the pipeline I'm used to working with, the model will contain string primvars to tag the model's parts for different materials. Then it's a trivial matter to make assignments based on the primvar values. With a vexpression on a material assign node, you could even procedurally do the assignments if the materials are named after the tags.
User Avatar
Member
166 posts
Joined: Nov. 2013
Offline
That's what we ended up doing. Then made collections and assigned materials with matching names to matching collections.
  • Quick Links