Houdini 17 Quicktip: Packing Geometry Using the UV-Layout SOP

comments 14
Free Tutorials

With the Houdini 17 party still going, let’s have a look at a somewhat hidden gem in H17’s tools: The UV-Layout SOP. “Wait! I don’t care about ’em UVs!” you might say. We hear you, but they are not really the focus of this tutorial. The very same tech underpinning decent UV layouts can be hijacked and used to pack something other than UV Islands. That’s right, we’re talking geometry packing!

It took us a bit by surprise, but it makes sense: The UV-Layout SOP can decently pack any piece of geometry into a (2D) bounding region. Be aware however that any 3D object’s outline will be projected onto a flat plane and used for packing. So not true 3D packing but a 2.5D solution in a way.

Download Project File (.hip)

Here are some renderings created using this technique:

packer01 (00151)

packer02 (00151)

packer03 (00151)

packer04 (00151)

packer05 (00151)

Liked it? Take a second to support Moritz on Patreon!
Become a patron at Patreon!

14 Comments

  1. That’s a very useful and cool technique Moritz.
    Be prepared for a lot of packed geo images I’d say πŸ™‚

  2. fantastic work, I made a game with a long word that could only see the small letters in jpg version which allows to expand it : )
    thanks.

    • Interesting! Do you have a link to that? πŸ™‚
      Cheers, Mo

  3. Wow! Packing is really a very difficult problem to solve – Of course Houdini delivers again
    Great work Entagma guys! Beautiful renders to guys – Mantra?

  4. Mo, you idea and work here is genial, it is original : )

    you just have to make a long word, then in the jpg format with the highest definition you can the letters will be small inside, that’s the point, the game is to “expand it with your fingers” to find the alphabet soup with different colors with a random “attribute from map” , because nobody knows that there are letters inside, just it is the single game with friends.
    but not in video format because it does not allow to reach expand with the fingers !

  5. This is really cool!

    Do you have any idea how to do something like this in Processing? Packing arbitrary polygons? I’ve seen circle packing, but nothing about complex shapes.
    Thanks.

  6. Great tutorial! Thank you so much.
    How would I populate the first uvlayout input with a number of different strings?

  7. Hey! As Always Danke!

    But instead of gouping by what is out of the bounding box, to delete the unpacked primitives, have you seen the “Output groups & Attributes” section at the end of the UV-Layout properties?

    Saves you the “hassle” of getting the “right ones” together.

    Aber sonst alles bestens… πŸ˜‰

  8. Hey Moritz, great tutorial! πŸ™‚
    Noobie question: How can you load multiple shapes with into your setup? For example one ai-file with multiple shapes separated and one file with multiple shapes staying together?
    Thanks for your help!

    • Heyhey,

      on top of my head I think the UVLayout-SOP takes in an island attribute, so one idea would be to load in a bunch of shapes, then use the connectivity-SOP to find out which parts are connected and use the class-attribute generated by that SOP (set it to run over primitives) in the UVLayout-node. (Have a look under /connectivity/island attribute) For multiple disconnected polygons keeping their orientation, just give them the same class-attribute.

      Cheers, Mo

Leave a Reply