Houdini's Integration of Visuals and Color
So...I feel the need to talk about lighting, color, and how we visually reproduce our images inside of Houdini. The more we understand what is going on behind the scenes, the more we can figure out how to render our creations successfully. Usually, I would make some individual articles on these topics, but I felt the need to be more technical, and also give a history lesson. So here we go...
First things first. In this chapter we are going to be talking about rendering, lighting and compositing a lot. As these functions are considered Houdini's visual integration outputs and inputs. In order for Houdini to output color and lighting information, we need to understand how the inputs work, and how Houdini'd brain works.
Absorption, Dielectrics, and Lighting
In a previous article I have talked about the different types of lights in Houdini, (see above), as well as general color correction (HERE). Basic lighting knowledge is mandatory for this article. As such, in order for us to see or creations , we need to add lights. This goes the same way for applying color, materials, and additional modeling elements. However, sometimes we would like Houdini to understand that different elements in the scene react differently to light, and to do that we need to make some parameter changes.
Color and light absorption is a hard feat to pull off in Houdini. This is something that you might use while creating objects that require a tinted glass effect, or have a juice-like consistency. Lucky for us there are many ways to pull this off. First way; you could use a volume object and work from there. However, a faster way is adjusting your material and mantra settings.
Let's say we operate on a Principle Shader. By adjusting the Transmission Color we can tint rays with this color as they pass through an object. You can scale the length of the tinting rays by using the At Distance parameter. Shorter distances give less tinting, longer distances give a darker and more saturated tint.
Depending on the color of your shader, adjusting the transmission color might not work well for you. Colors that are not fully saturated work best with the At Distance parameter. So if you are working with darker and vibrant color tone, you might struggle with how your render is appearing.
Now let's talk about how Houdini's internal system handles a situation like this.
Mantra can accumulate absorption colors across multiple, non-overlapping, transparent objects. It does this by multiplying tint values and combining it with the values of that object's color. It also calculates the lengths and amount of rays entering and bouncing off the surface of the object. Based on the color of the ray, and if the object is a closed surface, Mantra will then calculate how the rays travel get absorbed by the object. Sometimes if an object does not have a closed surface, the ray will not absorb the color values. A transparent plane will also not reflect color or reflect light correctly. Therefore, Mantra will render the surface black, and treat the surface like an infinitely deep object which absorbs all light.
Now...Scale of your object matters! If you object is too big you will have less transparency and more color saturation. This is because Mantra renders the object in world space units. The larger the object, the harder it is to render. Also, If you set up a shader on an example object at one scale, but then apply it to the render geometry at a different scale, you will not get the same look.
On another note, Mantra only starts tracking tint absorption when a light ray crosses a transparent surface facing the camera. This allows it to track when a ray enters an object and when it exits. However, if your camera is inside a transparent object, Mantra will not generate or sense these light rays.
Now let's talk about Nested Dielectrics.
What are nested dielectrics? This is the system that handles volumes that exist inside other volumes. Or rather two volumes in the scene that need two different rendering properties. For example, maybe you have two objects that require two different Index of Refraction values, for Houdini this might be a bit harder to calculate. This can also be a challenge if your objects overlap, and you don't want one's index of refraction to affect the other.
Therefore, you need to setup surface priorities. Wherever multiple shaded surfaces overlap, only the shader with the highest priority will contribute to the render. Think of dielectrics as a boolean operation to chose where and how materials should overlap. A value of 0 means the surface priority should be ignored. A value of 1, means that surface will be completely rendered.
Surface priorities can only be put into effect when Enable Absorption and Nested Dielectrics is turned on in the Mantra render node.
Linear Lighting and Color Formatting
Now onto the color formatting of Houdini. This might be a be a bit confusing for anyone who is unfamiliar with a color-space. So I highly recommend you look more into color-spaces if you see fit.
Houdini operates in something called a linear color-space. This means the absolute color values are calculated as a straight line. This is the standard in digital cinema and is the best way to produce realistic lighting.
There is also something called a non-linear color-space, and this this primarily used by older pieces of software, or programs. This color-space produces as darker and more saturated image when viewed in a linear pipeline. A non-linear color-space is also called sRGB.
Houdini automatically tries to correct any images it loads into it's system. It will automatically apply a 2.2 gamma correction to any image it labels as having an incorrect color-space. However, this can cause images to appear brighter than they are, and appear over exposed. So this setting can be adjusted.
- Houdini also contains many LUT toggles and setting inside the display menus, rendering and composting networks. As well as in the flip-book settings.
- The File COP has a Linearize Non-Linear Images parameter. In case you need it.
- The Texture VOP has a Source Color Space parameter. This is for handling linear images.
- Keep in mind, Houdini automatically converts images imported as textures for OpenGL.
Now, you may have heard of Houdini'd new lookdev and rendering setup called Solaris. In this section we are going to dive into some of the basics of how this system works.
The Universal Scene Description (USD), is the file format for describing 3D scenes and their corresponding compositing layers. This system was originally created by Pixar. I like to think of the USD as a book. There is a master layer that holds everything together like a folder, but inside are "pages", or the other corresponding files that make the "book" work. Once everything is ready inside this "book", it can be turned into something called a Stage in Houdini.
The main power of having these layers, is for allowing the user to have non-destructive editing. You have a pre-existing scene and create a new layer containing your edits. These edits won’t affect other edits, unless they choose to include a new layer. You can also replace one of the layers and automatically re-apply all existing changes on top of it.
These tools are collectively known as Solaris. They also contain LOPs, but we will get into that in a different article...
Keeping in mind this under-arching structure, let's talk about how the USD handles different tasks inside Houdini.
For composing all the data, the USD will form something called a composition arc. It references from one layer to another. These layers might reference their own sub-layers, those sub-layers may bring in sub-sub-layers, and so on. Layers are composited together, merging the prims in each layer. Properties in higher layers override the values in the lower ones. You can reference all information from the entire set of layers from the top-level one.
Now that is a very simplified version of how the USD works in Solaris. However, if you've ever build a material network, or rendering network inside an object node, it kinda works on the same premise. Everything works together in Houdini.
Working with SOHO
So I wanted to finish this article talking about something that doesn't get mentioned a lot. This is the SOHO (Scripted Output of Houdini Objects) Python bindings in Houdini.
All renders inside of Houdini use this system and it's corresponding parameters. SOHO has a lot of perks. It makes it easy to define new render output nodes for alternative renderers, and customize generation of render outputs by creating new render nodes, and customizing the soho_program parameters.
SOHO is used to send any data created in Houdini, and rendering properties to a renderer. You can access it through the soho_program parameter on a Mantra node.
In order to access and calculate all incoming parameters, SOHO calculates these values using a built in property inheritance order. This is useful so more specifically-defined properties/parameters have priority over more broadly-defined ones.
So as you can see...SOHO is a huge part of Houdini. This is also a very brief summary on how it works, and it's parameters and attributes extend way past an article that people can read through 5 minutes. Overall, please look into it. It's properties are insanely useful for both TD and artist work.
Rendering workflow tips: https://www.sidefx.com/docs/houdini/render/tips.html
Lookup Tables (LUTs): https://www.sidefx.com/docs/hdk/_h_d_k__i_o__l_u_t.html
Hey all. Wanted to know if there is a Houdini LUT(gamma correction) that can match these Color management settings in Maya 2018.2. See attached images: https://answers.arnoldrenderer.com/questions/14704/hey-all-wanted-to-know-if-there-is-a-houdini-lutga.html
Getting Data In and Out of Houdini: https://www.sidefx.com/docs/hdk/_h_d_k__i_o.html
Adding a New Image Format Using the HDK: https://www.sidefx.com/docs/hdk/_h_d_k__image__extend.html
Deep Shadow/Camera Images: https://www.sidefx.com/docs/hdk/_h_d_k__image_d_s_m.html
OpenColorIO Houdini: http://timmwagener.com/portfolio/ocio-houdini/
Materials gallery: https://www.sidefx.com/docs/houdini/gallery/shop/vopmaterial/index.html
Karma filters: https://www.sidefx.com/docs/houdini/solaris/filters.html
Solaris scene viewer: https://www.sidefx.com/docs/houdini/solaris/view.html
Linear lighting and color: https://www.sidefx.com/docs/houdini/render/linear.html
Lights and shadows: https://www.sidefx.com/docs/houdini/render/lights.html
Absorption and nested dielectrics: https://www.sidefx.com/docs/houdini/render/nested.html
Render quality and speed: https://www.sidefx.com/docs/houdini/render/quality.html