Isolate meshes from primitive into individual primitives
1181 11 1- MathiasJ
- Member
- 55 posts
- Joined: 4月 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?
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 - 2024年6月29日 08:08:33
- robp_sidefx
- スタッフ
- 498 posts
- Joined: 6月 2020
- Offline
- MathiasJ
- Member
- 55 posts
- Joined: 4月 2017
- Offline
- robp_sidefx
- スタッフ
- 498 posts
- Joined: 6月 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.
- MathiasJ
- Member
- 55 posts
- Joined: 4月 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.
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
- antc
- Member
- 335 posts
- Joined: 11月 2013
- Offline
- robp_sidefx
- スタッフ
- 498 posts
- Joined: 6月 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.
- MathiasJ
- Member
- 55 posts
- Joined: 4月 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 - 2024年7月12日 04:08:38
- antc
- Member
- 335 posts
- Joined: 11月 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 - 2024年7月12日 12:24:00
- MathiasJ
- Member
- 55 posts
- Joined: 4月 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?
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?
- antc
- Member
- 335 posts
- Joined: 11月 2013
- Offline
MathiasJIt'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:
Just curious, you happen to know why it is that the meshes show up again, even though they are deleted in SOPs?
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 - 2024年7月12日 14:35:42
- MathiasJ
- Member
- 55 posts
- Joined: 4月 2017
- Offline
-
- Quick Links