Isolate meshes from primitive into individual primitives

   1259   11   1
User Avatar
Member
55 posts
Joined: April 2017
Offline
Hey all,
I have some kitbash assets that contain several pieces per file i.e. pillar01-03 contains both pillar 01, 02 and 03.

I've tried using a SOP Modify to delete two of the meshes, and it looks like it deletes their meshes from the primitive corrently, but they still show up in the scene like they're not really effected, or being merged into the remaining mesh.

Is there a way to isolate meshes from primitives into new individual primitives?
Or do I really have to save out each one as its own file?

Edited by MathiasJ - June 29, 2024 08:08:33

Attachments:
Isolate Meshes.jpg (258.0 KB)

User Avatar
Staff
503 posts
Joined: June 2020
Offline
Just to check, what's under the "proxy" prim?

You can send the hip & data to support for us to look at if you're still stuck.
User Avatar
Member
55 posts
Joined: April 2017
Offline
Hi Rob, and thanks.
Sorry but I've modified the scene since the post and can't get it back to that point.
If I remember right, it was also just the single mesh like in render.

You're saying it should work like this though? By simply blasting meshes inside a SOP Modify to isolate?
User Avatar
Staff
503 posts
Joined: June 2020
Offline
MathiasJ
You're saying it should work like this though? By simply blasting meshes inside a SOP Modify to isolate?

If it's one combined USD prim and you're just trying to remove parts of it, then yes this should (in general) work. I'd need to see your setup to understand why it doesn't work for you.

I'm attaching a simple example.

Attachments:
blast.hip (174.3 KB)

User Avatar
Member
55 posts
Joined: April 2017
Offline
It's actually one Primitive with individual meshes inside, i.e. Pillar primitive with Pillar 01/02/03 meshes inside it.
Where I want to delete meshes, to isolate specific ones for layout. Specifically when importing USDs with Asset Reference/Reference LOP.

I might have misunderstood how USD works though, this isn't a thing, and I should just fix it in export.
Deleting meshes like this just seemed like a basic thing to me.

I've attached your example with some different attempts I've made.
Using Group Import on SOP Create gives the result I want, where it isolates meshes, but it doesn't seem to work with SOP Modify and isn't possible with Asset Reference/Reference LOP which is what I want to use it for.
Image Not Found

Attachments:
blast_v2.hiplc (394.0 KB)

User Avatar
Member
337 posts
Joined: Nov. 2013
Offline
Deleting stuff in USD can actually be quick tricky once there's multiple layers involved, which is the case in most of your examples. The good news is USD has a non-destructive "soft" delete called "active" which you can author without going into sops.
Edited by antc - July 11, 2024 18:26:46

Attachments:
deactivated.hipnc (118.9 KB)

User Avatar
Staff
503 posts
Joined: June 2020
Offline
antc
The good news is USD has a non-destructive "soft" delete called "active" which you can author without going into sops

In addition to the Configure Primitive LOP, you can also use the Prune LOP for this.

If you're looking to remove an entire USD prim (i.e., you've imported the SOP geometry and it's created three USD prims - one for each pillar), deactivation is a sensible way to go. SOP Modify only makes sense if the SOP geometry didn't have a name/path attribute and thus all came in as one USD mesh prim.
User Avatar
Member
55 posts
Joined: April 2017
Offline
antc
Deleting stuff in USD can actually be quick tricky once there's multiple layers involved, which is the case in most of your examples. The good news is USD has a non-destructive "soft" delete called "active" which you can author without going into sops.

And that lightens the scene load even though the meshes still appear under their parent primitive?
Edited by MathiasJ - July 12, 2024 04:08:38
User Avatar
Member
337 posts
Joined: Nov. 2013
Offline
MathiasJ
And that lightens the scene load even though the meshes still appear under their parent primitive?

The only real way to have these meshes not impact scene load at all would be to remove them during export. Any time they are present in the input file, loaded, and then removed (whether it be via sops or lops) there will be some expense. Deactivating will almost certainly be cheaper than attempting to delete the geometry in sops though.

As far as rendering goes, the data for these deactivated meshes will not be fed into the renderer. If you're using binary USD files (usdc) the mesh data won't be loaded into memory by USD either. Strictly speaking, binary USD never loads attribute data itself - it's only ever read from disk due to some request from the client e.g because the renderer needs it or because some ui wants to display the data.
Edited by antc - July 12, 2024 12:24:00
User Avatar
Member
55 posts
Joined: April 2017
Offline
Sounds like a decent solution outside of fixing it in export. Thanks for explaining guys.

Just curious, you happen to know why it is that the meshes show up again, even though they are deleted in SOPs?

It feels like it's Solaris reverting the primitive back to its old state before the SOP operation for some reason?
Because the point/prim count doesn't match up with the previous name attributes or something?
User Avatar
Member
337 posts
Joined: Nov. 2013
Offline
MathiasJ
Just curious, you happen to know why it is that the meshes show up again, even though they are deleted in SOPs?
It's mostly due to layering, and that the sopmodify is introducing a new layer, which isn't able to permanently delete prims from the input layers. So the layer stack kind of goes like this:

Layer A -> your referenced file that contains all meshes
Layer B -> additional layer created by sopmodify that overlay some sparse changes on top of layer A

Layer B has no way to reach into layer A and delete the meshes. What layer B can do however is author deactivation opinions about the meshes in layer A.

It's kind of similar to a movie player cropping a movie from 4:3 to 16:9 aspect. It can introduce black bars at the top/bottom as you watch, but it can't actually reach into the movie file and start deleting pixels.

What would be nice though is if sopmodify authored a deactivate opinion when an input prim gets fully deleted in sops.
Edited by antc - July 12, 2024 14:35:42
User Avatar
Member
55 posts
Joined: April 2017
Offline
Ah like that. I'll have to read up on layering some more.
Thanks for taking the time antc!
  • Quick Links