Home Creators Posts Import Register Favorites Logout

Content

Over the course of Practical USD we used both plain text files and Nvidia Omniverse USD Composer to work with USD. One of the first major DCCs to get in on the USD game was Houdini with its Solaris context. Solaris is a "pure" implementation of USD with low level access to all aspects of the specification. In general, it strikes a good balance between power and a more artist-friendly workflow. Well... as artist-friendly as Houdini gets, anyway!

Let's look at how Solaris implements all the features we covered in Practical USD, from attributes to variants to instances. Before getting started, you can refresh your memory of USD terminology with my USD Glossary.

First, let's see how Solaris handles the display and editing of attributes and primvars. Load up the Solaris workspace in Houdini and add a Sphere to the scene. We can examine the attributes of our new sphere by opening a Scene Graph Details pane and selecting the sphere in the Scene Graph Tree. We see all the attributes we'd expect, including radius.

Let's change it! Solaris makes it easy to modify attributes. Simply right click on radius and select Edit Property, or press Shift-Enter.

A new Edit Properties node will be added. The node is "smart" and will give us the ability set values relevant to the property being edited. In this case it will let us assign a new float value for the radius.

Let's look at some slightly more complex geometry. Add a Test Geometry: Rubber Toy and enable the display flag. In the Primitive Inspector there are a lot more attributes than the sphere had. Try editing the subdivisionScheme attribute. As expected, it gives us options relevant to the attribute type: in this case, a dropdown with typical subdivision options.

We can also see primvars now listed along with our other attributes. The toy geometry has a UV attribute, which we see displayed as primvars:st.

Moving on, we can set Kind, Purpose and Instaceable (and much more) on prims using a Configure Primitives node. Simply select the desired prim, or pattern of prims, and change the settings as needed.

When loading external files using a File node, we can choose whether the the imported layers are treated as references or sublayers. Remember that a reference can be placed anywhere in the stage hierarchy, but a sublayer is always placed at the root. There is also a third option, Asset Reference, that includes variant selection and transform options in the parameter interface.

Note that the title bar here says "Import USD File," but Solaris can read many different file types: .abc, .fbx, .vdb and much more.

Next, let's see how Solaris handles Variants. If you have an existing scene with Variants, simply connect a Set Variant node and choose the variant you want. Let's go further and explore how to create new variants within Solaris.

Take our toy geometry and split it off with a transform node that flips it upside down. Add a grid for a floor and connect everything to an Add Variant node. The grid can go into the left input for the stage, and the two toys connect on the right.

Name the Variant Set as desired and then double click on each Variant Name to customize them.

That's all there is to it! We now have a Variant Set attached to our toy prim and can easily switch between them using a Set Variant node. This of course can be easily exported to USD/USDA and opened in any other app that supports USD.

Finally, let's check out Solaris' point instancing workflow. An Instancer node can be used to create basic point instances.

Let's create some randomized point instances of the toy geometry. Connect a SOP Create and an Instancer to our toy.

Dive inside the Sop Create, create a grid, connect a Scatter node and set it to a low-ish number of points. Let's get some tutorial synergy going and make use of the random orientation script we learned in Rotation and Quaternions in Houdini. Connect a Point Wrangle and enter the following code:

f@pscale = fit(random(@ptnum), 0, 1, .5, 1.5);

i@seed = chi("Seed");i@clamp = chi("Clamp");

f@val1 = fit(random(@ptnum + @seed), 0, 1, -1, 1) * @clamp;f@val2 = fit(random(@ptnum + @seed + 3817), 0, 1, -1 ,1) * @clamp;f@val3 = fit(random(@ptnum + @seed + 501), 0, 1, -1, 1) * @clamp;

v@rotation = (@val1, @val2, @val3);@orient = eulertoquaternion(radians(@rotation), 0);

Click the Create spare parameters icon and set the clamp to 360 for a random range of +/-360 degrees.

Go back up to the Stage level and point the Target Points section in the Instancer to the points we created in the SOP Create. Point the Prototypes section to the toy prim. Leaving Set Orientation and Set Scale checked means that the Instancer will pick up the pscale and orient attributes we created in the Wrangle.

There you have it, a basic USD point instancer, perfect for creating memory-efficient copies of trees, rocks, lights or anything else you might want.

Another method for instancing in Solaris is the Layout node. There is some debate how useable this tool is. It has been considerably improved in terms of workflow and stability with the release of Houdini 20.5. However, it still suffers from some buggy behavior. I don't know how enjoyable it would be to use in a project, but regardless, let's briefly explore what it can do.

Layout works similarly to the Paint tool in USD Composer or Unreal. The idea is that you create an Asset Gallery of prims that you can then "paint" onto target geometry. For demo purposes, we can just create a grid as a floor, add the rubbertoy geo to our layout and paint away using the various tools.

Under the hood, by default any work done this way adds to a USD point instancer. However, you can change the behavior to Instanceable Reference.

This allows use of collision physics in Edit mode. This is a cool but perhaps not too useful feature where prims can interact with each other when moving them around the scene. It can allow natural positioning of props that settle into position in a realistic way.

Play around with it and see what you come up with! Simply switch to the Edit tab, check the prims you want to enable physics on, then check Use Physics above the viewport.

It all works decently well in a simple setup like this and it's fun. But, stories abound of people running into bugs and glitches sooner or later, so I'd urge caution with the tool at this point.

Conclusion

Houdini's Solaris is one of the most sophisticated, flexible USD tools available. As with all things Houdini, it's often confusing and complicated, but dedication to learning it is rewarded with unrivaled power. Solaris was also one of the first broadly-available USD implementations and, thanks in part to that "first-mover" advantage, it has become the default in many studios. If you plan on working with USD in a professional capacity, being familiar with Solaris is essential.

Files

Comments

No comments found for this post.