Variants not working when using USDimport

   2339   5   0
User Avatar
Member
134 posts
Joined: Dec. 2006
Offline
Hey, So I have set up a layout scene in LOPS with some variants that i want to render in Mantra. My problem is that the variants all come in on top of each other.

How can i get the the USDimport to bring in only the variations that i selected in my LOPS scene?

thanks

this is what it looks like when i import the saved out USD into a geo node in SOPS. The paintings come in all
on top of each other.





This is what my actual layout looks like

Edited by willh - March 22, 2020 16:39:25

Attachments:
houdini_scene_view.jpg (649.9 KB)
lops.jpg (582.6 KB)

User Avatar
Staff
4438 posts
Joined: July 2005
Offline
Any chance you can attach the generated USD file and/or hip file used to generate it?
If the variants are authored properly, there should be no way for the USD Import to even see the multiple possible frame geometries at the same time…
User Avatar
Member
134 posts
Joined: Dec. 2006
Offline
Hi mtucker, thanks for checking in. I set up a simple paintings scene to show how the variants are being ignored when importing. It would be great if you can shine some light on this

thanks

Attachments:
uds_painting_example.hiplc (701.4 KB)

User Avatar
Staff
4438 posts
Joined: July 2005
Offline
Hey willh, hhanks for the great example.

The short answer is that LOP Import will happily import invisible primitives by default. If you change your lopimport Primitives parameter to be:
/Paintings/Painting/* & { usd_isvisible(0, @primpath) }
Then I think everything works as expected. The “&” and everything after says the prims must match both the name pattern and the VEX expression inside the braces, which ensures that the prim is visible (see https://www.sidefx.com/docs/houdini/solaris/pattern.html).

Apologies if the rest of this answer is too pedantic, but I was confused by your original question because I was assuming that your three variants actually contained the three different pieces of geometry, rather than just setting the visibility on the prims. By having all three pieces of geometry in the scene graph you are (very slightly) slowing down composition, and also making it a little harder to quickly see what the contents of your scene are. So you might want to look into changing the way you are authoring your variants (which will also sidestep this LOP import visibility issue). Also, a minor point (which may not happen in your real scene, just in this quick example), but you've got a component defined under another component, which isn't a legal Kind hierarchy. /Paintings/Painting should really be a Group.
User Avatar
Member
134 posts
Joined: Dec. 2006
Offline
Thanks so much for the help mtucker, Do you mind sharing what you would consider to be a better scene graph? I have very little experience in USD.

Also what does the scene graph need to look like for the visibility to just work when i do a usdimport?
Edited by willh - March 25, 2020 03:01:11
User Avatar
Member
134 posts
Joined: Dec. 2006
Offline
I might have sone something weird but i followed this tutorial from the documentation and matched my scene graph to the
one in there. Is this the wrong way to set it up?
https://www.sidefx.com/docs/houdini/solaris/tutorial_1.html [www.sidefx.com]
  • Quick Links