Home Creators Posts Import Register Favorites Logout

Content

Houdini has a wide array of tools for creating and editing UVs. In this article we'll explore the most useful ones in depth, plus learn how to use attribute transfer techniques to get UVs onto our cracked vase model from Part 4.

Creating UVs

Let's start by creating UVs on our original, quad-based vase model. With a simple model like this we'll likely want to create our own UV seams to get the best possible layout. That's easily accomplished! But first, let's look at what Houdini offers in terms of automatic UV creation.

After pressing Tab and typing "uv" you'll notice Houdini has thirty UV-related tools.

The good news is that a number of these overlap in terms of functionality and an even larger number are not particularly useful outside of specialized or technical workflows. Some are also outdated. For example, the UV Pelt node has been around since 2015. It does what it says, but there have been many advancements in artist-friendly workflows since then. For the vast majority of use cases we can focus on only a subset of Houdini's UV tools.

Generally speaking, the process of creating UVs on a mesh involves three steps:

Creating seams (or cuts) along edges.

Flattening (or unfolding) the mesh along those seams into islands.

Packing the resulting islands into one or more UV/UDIM tiles.

To create automatic UVs with a somewhat old school approach we can use one node for each step: UV Autoseam, UV Flatten and UV Layout.

Attach a UV Autoseam node to the mesh and adjust parameters get the desired number of cuts.

Next up: UV Flatten. This node accepts externally-created seams, so in this case we'll use the ones created by UV Autoseam, tagged with the seam group name.

Finally, add a UV Layout node to automatically pack the islands. To view the model in UV space, press Space-5 or select UV View from the menu.

This process gives us quick and dirty UVs that will likely be good enough in many situations.

For a more modern but less customizable automatic UV workflow, let's have a look at Labs Auto UV. "Labs" refers to SideFX Labs, an extensive set of tools designed internally at SideFX and targeted at addressing common artist needs. We'll be checking out other Labs tools throughout this series.

Labs Auto UV combines all three UV creation steps into one node and removes a lot of the complexity from the multi-node workflow, especially in regards to the flattening step. If you need to create decent UVs at warp speed and don't care about micromanaging details then this is the node for you.

Before moving on to manual UV creation, let's touch briefly on the various UV projection tools in Houdini.

UV projection refers to the process of "projecting" a 3D mesh onto a flat surface using a variety of algorithms. For example, "spherical" projection projects the surfaces of our mesh into the inside of a sphere, then that sphere is flattened and becomes our UVs.

All in all this is a poor way of creating UVs and will only work in the most basic of situations. The UV Project node lets us flatten our vase from various projection viewpoints, including orthographic, cylindrical or spherical. As we can see, a massive amount of detail is lost, textures are stretched, and interior surfaces are entirely hidden, among many other problems. In this case cylindrical projection perhaps gets the closest since the vase is somewhat of a cylinder.

That being said, this method is not recommended unless under very specific and limited circumstances.

(Bonus tip: to get this split viewport showing both 3D and UVs views, click the Viewport Layout button and select Two Views Side by Side, or press Ctrl-2.)

If automatic UVs aren't giving us the result we're looking for, we can create our own custom seams, island positioning and layout. The core of this process is still the UV Flatten node, but we'll now be taking advantage of many more of its parameters.

To make our seams, we can either create a seams group or click the arrow icon in the UV Flatten node next to the Seams parameter. This icon always allows us to go into selection mode in the viewport no matter which node we're using. Select points, edges or polygons as normal, then press Enter to confirm.

For our vase, we'll go the first route and set up a group manually. Add a Group node and select the edges that we want to use as seams. Double-clicking selects an edge loop. Hold Ctrl to remove from the selection or Shift to add to it.

Next, connect a UV Flatten and point it to our new group. This will flatten our mesh exactly as we wanted based our our chosen seams. We can then use a UV Layout node to automatically position our new islands. Generally, the default settings will be fine, but feel free to play with parameters to dial in island spacing and other settings.

We can use a UV Edit node to manually position, rotate and scale our islands. This can be very helpful when preparing UVs that need to retain certain logical groupings. For example, if we had a flower model we might want the petal UV islands next to each other, the leaves grouped elsewhere, and the stem in another spot.

UV Edit works just like any other mesh editing operation in Houdini. We can use the translate, rotate and scale hotkeys to quickly make adjustments. Choose UV connected Geometry from the Mode dropdown to easily select entire islands.

The end result is what one might call a professional UV layout!

Finally, I would be remiss to not mention the extensive integration of Rizom UV in Houdini. Rizom is a 3rd-party commercial standalone application for UV creation. It's best-in-class and I highly recommend it. SideFX has dedicated a number of nodes to Rizom functions. We won't be covering them here since this series is all about native Houdini workflows and not everyone following along will own 3rd-party tools or want to buy them. Suffice it to say that Rizom users will be happy to see excellent support for the app within Houdini.

Everything we've done so far is well and good for creating UVs on our basic vase mesh, but what about the final vase we created using booleans and VDB conversions? That mesh would be a nightmare to manually UV, to put it mildly. We could certainly use all our auto UV tools and get a decent result. But what if we wanted to retain our new, clean UVs? They're perfect for the model. The inside is on separate islands, the outside is laid out logically and all the seams are well thought out.

Well, we can in fact move our UVs more or less unchanged to this very different and much more detailed mesh. To do so, we'll take advantage of some advanced Houdini workflows based around attribute and group transfers.

The broad concept is that our final, detailed mesh occupies more or less the same volume as the original, simple one. As such, we can ask Houdini to use spatial position to transfer the original UVs to the new mesh with only minimal disturbance.

The classic way to accomplish this is by using an Attribute Transfer node. However, in this case I found the results somewhat unoptimized. Fortunately, Labs comes to the rescue with the Labs UV Transfer node. This tool is nothing short of magical and moves our original UVs over in excellent fashion.

However, there is one major problem: we have a lot of "extra" topology as a result of our boolean operations. Transferring the original UVs will result in distortion and suboptimal island shapes as the attribute transfer tries to squeeze the new topology onto the volume of the original mesh. Houdini is an endlessly amazing tool, so we can fix this seemingly very complicated problem without much trouble at all.

First, let's go back to our boolean operations and create groups for the intersecting faces of the booleans. In the case of our vase this is the binsidea (B Inside A) group, but it can be helpful to give them custom names. For example, let's call them bool1, bool2 and bool3.

Next, we'll use a Group Transfer node to transfer these groups from our original geometry onto the final mesh. The Group Transfer tool works similarly to the attribute transfer tools we've already used. It looks for topology in proximity and then "projects" the old group onto the new mesh.

We now have the three groups on our high resolution mesh. Use a Blast node to check to make sure everything is looking good. Blast is Houdini's "delete" function. In this case we'll select our three groups, then check Delete Non Selected so that we see only the surfaces that the boolean operations created.

We can now UV Flatten only these groups, quickly adding manual seams as needed. As a result of this operation we'll have our new islands sitting on top of the existing ones we already transferred.

We'll fix that in a minute, but before we do, if we look carefully we'll see that the UV transfer process didn't totally succeed. There are some orphaned polygons on the base in particular.

Here we can use a UV Fuse node and select all the adjacent islands on the bottom of the vase.

After doing this we'll need to use one last UV Flatten node, this time selecting Preserve Seams. Now all our islands look correct. (Checking Preserve Layout doesn't quite work in this case since we have a few new islands and thus can't retain the old layout.)

Add a final UV Layout and it will automatically pack our islands. Feel free to use UV Edit to position them manually if desired. Done!

Lastly, it must be noted that there is still a fair bit of distortion in these UVs. Use a Labs Visualize UV Distortion to check out the situation. The red and blue colors indicate stretching and pinching.

There is a Labs Remove UV Distortion node that can potentially address this, but unfortunately it creates new seams and will significantly alter our islands and layout. It's worth testing on a case by case basis, but for a quick and easy solution nothing beats Rizom's Optimize function for those wanting to branch out beyond Houdini. Before we go, here's a quick teaser showing what Rizom can do to address the distortion.

Conclusion

In this installment of The Complete Houdini we took a deep dive into Houdini's UV toolkit. We learned how to quickly create automatic UVs and explored how to create powerful and flexible custom layouts. Finally, we took advantage of some of Houdini's most advanced tools to transfer clean UVs to a mesh that would otherwise be a major challenge to UV effectively.

Files

Comments

No comments found for this post.