Before You Begin

Please check out the Getting Started page before you do this tutorial to make sure you have Houdini installed correctly. In this tutorial, we will be rendering the above image, using a pre-built VDB data file, and a pre-built shader. You can download this "Isolated Galaxy VDB" file and the "Sample Volume Shader" from the Downloads page. Some of the later tutorials will dive into importing your own data, and creating your own shaders.

Houdini's Windows

If you now open Houdini (or Houdini Apprentice), you will see a lot of buttons and windows. The main windows you'll see are:

Houdini windows and labels

Scene View: Where all your models and data will appear, along with cameras and other scene objects.
Network View: Where all your models, data, cameras, etc will appear as nodes, which you can wire together to create dependencies.
Parameters: Once you have an object selected, you can manipulate several properties of each object. Some options include position and color.

Load the Volume Data

Houdini accepts several graphics data formats natively, including .vdb, .geo, .bgeo, .json, .pdb, and .obj. We will be importing a .vdb volume object. Make sure you have downloaded the IsolatedGalaxy.vdb file.

Put your mouse over the Network View window and press the TAB key on your keyboard. This will bring up the TAB Menu.

Start typing "geometry" and the Geometry menu option will appear.

Press the Enter key on your keyboard or click on the Geometry menu option to select it, and then press Enter or click once again, to place the Geometry node down in the Network View window. This will also create a box in your Scene View, which is a defualt filler geometry that Houdini creates for you.

Press Enter or double-click on the "geo1" node to step inside it. You will see a node named "file1".

In the Parameters window, locate the "Geometry File" parameter, and type in the path to the IsolatedGalaxy.vdb file on your computer, or select the button to the right of the text area to open a file browser.

Place your mouse cursor over the Scene View window and press the G key on your keyboard to frame the view.

Load and Modify the Shader

Make sure you have downloaded the sample_shader.hdanc file. To install this pre-built shader, in the Menu bar, navigate to File -> Import -> Houdini Digital Asset...

Type in or navigate to the path of your installed sample_shader.hdanc file in the "Digital Asset Library" text field, and select "Install and Create".

This will have taken you to away from the "obj" (object) Network View, and inte the "shop" (shader operator) Network View. You should now see a node called "sample_shader1".

In order to assign this shader to our data object, we need to return to the object view. Do this by clicking on "shop" in the Network View, and selecting "obj" in the menu that appears.

Select the "Material" tab in the Parameters window, and click on the selector button next to the text field.

This will open up a tree view of your material(s)/shader(s). Navigate to and select the "sample_shader1" shader, and click "Accept".

Now, the shader is assigned to this object. We can render the image to see what it looks like, by selecting the "Render View" tab above the Scene View window.

It doesn't look like much yet! Let's return to the shop Network View and change some of the shader settings. To return to the shop Newtork View, select "obj" and then "shop" in the dropdown menu.

Let's mess with some values in the Parameters window.

The range of values in this Isolated Galaxy data set is 0-1, so enter 0 in the "Min Data Value" field, and 1 in the "Max Data Value" field.

Since our data is self-luminescent, we want to do is to remove the diffuse component of the volume's color. To do this, in the Parameters view, set "Smoke Intensity" to 0, un-check "Use Smoke Color" and "Use Point Color", and set "Smoke Color" to black by entering 0 0 0 as the R G B values. This will make the render in the Render View a bit darker, but still not interesting. This is because we are looking at the entire data range, including 0.

Let's take a look at only the higher values. Scroll down in the Parameters window until you see the "Density Ramp" graph. To begin with, there is a straight line going from 0 at one end, to 1 at the other end. Click on the graph at around x=0.2 to create another point with a value of 0. You can click and drag to move this around, or you can type in an exact value below the graph. Now we are actually able to see something!

Now that we have set the opacity as we like it, let's add some color. In the Parameters window, switch to the "Temperature" tab. Here, you will see that the "Temperature Field" is set to "temperature" by default. If our data had multiple variables, we could use one to drive the opacity, and another to drive the color; but in this example, we only have one. So, set the "Temperature Field" to "density".

Now, double-click on the "Map Temperature to Emission Color" area to create new points with color on this color map. You can move them around or edit them as you like.

Feel free to go back to the "Density" tab and modify the opacity ramp as well. Try playing with other values in both the Density and Temperature tabs.

To save your rendering, right-click on the image in the Render View and select "Save Frame...".

That Was Easy! Now Let's Complicate Things...

We provided you with downloadable files in order to skip a few important steps, and we glossed over a few important concepts. To learn more, come back later to check out these tutorials:

  1. Load Your Own Data With A Python SOP
  2. More About Shaders
  3. Creating A Camera
  4. Rendering


Python SOP

Next Tutorial