scene assembly

Houdini as scene assembler part 05. User attributes by Xuan Prada

Sometimes, specially during the layout/set dressing stage artists have to decide certain rules or patterns to compose a shot. For example let’s say a football stadium. Imagine that the first row of seats is blue, the next row is red and the third row is green.
There are so many ways of doing this, but let’s say that we have thousands of seats and we know the colors that they should have. Then it is easy to make rules and patterns to allow total flexibility later on when texturing and look-deving.

In this example I’m using my favourite tool to explain 3D stuff, Lego figurines. I have 4 rows of Lego heads and I want each of those to have a different Lego face. But at the same time I want to use the same shader for all of them. I just want to have different textures. By doing this I will end up with a very simple and tidy setup, and iteration won’t be a pain.

Doing this in Maya is quite straightforward and I explained the process some time ago in this blog. What I want to illustrate now is another common situation that we face in production. Layout artists and set dresser usually do their work in Maya and then pass it on to look-dev artists and lighting td’s that usually use scene assemblers like Katana, Clarisse, Houdini, or Gaffer.

In this example I want to show you how to handle user attributes from Maya in Houdini to create texture and shader variations.

  • In Maya select all the shapes and add a custom attribute.

  • Call it “variation”

  • Data type integer

  • Default value 0

  • Add a different value to each Lego head. Add as many values as texture variations you need to have

  • Export all the Lego heads as alembic, remember to add the attributes that you want to export to houdini

  • Import the alembic file in Houdini

  • Connect all the texture variations to a switch node

  • This can be done also with shaders following exactly the same workflow

  • Connect an user data int node to the index input of the switch node and type the name of your attribute

  • Finally the render comes out as expected without any further tweaks. Just one shader that automatically picks up different textures based on the layout artist criteria

Houdini as scene assembler part 04 by Xuan Prada

Let’s talk a little bit about cameras in Houdini. Most of the time cameras will be coming from other 3D apps or tracking/matchmoving apps. The most common file format then it would be alembic. Apparently alembic cameras are not very welcome in Houdini, don’t ask me why, but there are certain issues that might occur. In my experience most visual effects companies have their own way to import alembic cameras.

I have never used fbx cameras in a professional environment but I have done a few tests at home and it seems to work fine. So, if you get weird issues using alembic maybe fbx could be a solution for your particular case. Go to file -> import to do so.

To create cameras in Houdini use the camera node. Here are some important features to consider when working with cameras in Houdini.

  • If you need to scale the camera, not very common but it can happen, do not scale the camera itself, just connect a null to the camera and transform the null instead.

  • Render resolution is set in the camera attributes. It can be overwritten in the ROP node but by default it uses the camera resolution.

  • There are different types of camera projection, perspective, orthographic, etc. There is also a spherical lens preset in case you need to render equirectangular panoramas.

  • Apperture parameter is pretty much the same as sensor size, this is very useful when matching real cameras (always in vfx)

  • Near/far clipping, same as every 3d app, important when working with big/small scales.

  • Background image: It places an image in the background that actually gets render. Usually you don’t want this to happen for final rendering. If you disable this option, the image won’t be visible during render time but it still will be visible in the viewport. Use the below icon to disable it.

  • To see safe areas go to display -> guides (display is d key).

  • Sampling parameters

    • Shutter time: Controls motion blur

    • Focus distance and f-stop: Control depth of field

    • To see focus distance, select the camera and click on show handle