Bite-sized tips, tricks, what's, and how's | #002
Much like a sketchbook, these are sporadic entries logging all sorts of discoveries while using, exploring, and occasionally crashing SideFX’s Houdini.
🢐 Houdini Version: 19.0.455 🢒
🢐 V-Ray Version: 5.20.02 🢒
Although V-Ray does a good job of documenting what their Toon Effects can do, there is little documentation regarding how to actually set it up in a scene. Here’s a workflow to use V-Ray Toon effects within Houdini (that I’ve found to work reliably well).
Let’s start simple, with a grid and a sphere, and use these as our test subjects. Also, drop in a camera. We’ll need this to tell V-Ray what to render.
Switch over to the out context. In here, we’ll add in a vray render node, which should automatically add in the vrayIpr node as well. The vray node should already have the camera we created in the “Camera” parameter.
For reasons I am not fully aware of, V-Ray Toon effects currently only work in CPU. Make sure that Mode is set to CPU.
Press “Render To Disk” to start a really basic render and automatically bring the VFB (V-Ray Frame Buffer), where your render will occur. For this instance, I’ll dock the window to the right of Houdini. V-Ray automatically adds very primitive lighting to a scene with no lights. We’ll fix the light after we’ve set up the Toon effect.
Add in an V-Ray Environment node in the out context. Double click to dive inside it.
Add the V-Ray Toon Effect node. It is an atmospheric node that allows for a toon effect on the entire scene. This node also contains some parameters to tweak the toon effect. At the moment, even if you render, nothing will happen. We’re about to fix that.
Jump back to the out context, and select the vray render node. There’s a parameter called “environment.” This is where you will reference the vray environment we just created, enabling the toon effect.
Press render and you’ll get a (not very exciting) toon effect on the image!
Let’s add the toon material now, to give it more of a cartoony look. Got the mat context, and drop in a vray toon material.
Just to make sure things are working, change the diffuse color to something other than the default. For this instance, I’ll pick a shade of blue.
Now, hop back the obj context, and assign the toon material to the sphere, then press render. Also, add a V-Ray Directional Light, to just help the render look a little better. Once you assign the material, its likely the object will turn black in the viewport.
We have a Toon Effect! Now, let’s say you have point colors on your object, and you’d like to view that on the sphere. For this, let’s give the sphere some color attributes. I dropped in a color sop, and set it point and then color type to bounding box. Additionally, I set the display mode to wireframe, as having the toon material globally applied disables my color preview.
Next up is to read the attributes from the sphere into the material. To do this, you can switch over to the mat context, and add a vray user color node, and connect this to the diffuse. This automatically overwrite the previous color setting.
Press Render! and You should have something reading the color attribute of the geometry.
One more thing: The vray toon effect node within the vray environment node also controls different aspects of the linework. For example, if you disable the “Use Main Line Controls” you’ll have more control over the linework.
There’s a ton more things to explore with the Toon effects within V-Ray Houdini, but this should provide a fairly simple set up and introduction on getting started with it. Also, this is probably one of the few times in which playing around with the render settings, such as the noise control, can enhance and add more of that hand-drawn feel to your toon render.