検索 - User list
Full Version: Variants not working when using USDimport
Root » Solaris and Karma » Variants not working when using USDimport
willh
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

mtucker
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…
willh
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
mtucker
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.
willh
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?
willh
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]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB