3D – Shading, UVs and Materials.

Intro to materials and texture

UV’s work in UV space, parametrizing the surface. In order to have a material stick to your object, you need a UV skin.

If you have an object (like a sphere) with a seam, you can cut the seam and lay it flat like on a Mercator projection, as seen below.

UV space is square and there are lots of ways to split up your geometry in order to attach UV’s to it, it doesn’t matter that much. However, if the UV’s are laid out well you can go in, select individual pieces of your geo (for example a table leg from your table) and just put materials on that selected piece.

Usually, when working in a VFX house, the texturing would be done in a software such as substance painter or Maya, but it can be done in Houdini.

Procedural texture – A texture which has detail and this detail created using separate functions, such as noise. Sometimes you’ll need to paint over seams, project decals and change the offset because sometimes textures can look too uniform. This is necessary because your eyes can quickly realise that an object isn’t real when a texture is too uniform or is made of repeated patterns.

Some of the different functions you can use are:

  • Diffuse
  • Reflection
  • Subsurface Scattering

All of these have colour – albedo.

You can also use maps to break up the surface, such as:

  • Bump
  • Normals
  • Displacement

There is wear and tear on normal objects, these can be used to create that effect.

This is a view of the nodes that have been used to texture the table with a brick material. You can see a displacement and a bump map have been used here.
There are some nooks in the material to mimic wear and tear, but this is the same material after using a bump map, using a heightfield in the displacement map and changing the reflection roughness.
Now it looks a lot more like concrete.

Here is what it look like after just having wrapped a grid in UV’s and then adding a basic material.

Different materials need different amounts of refraction, reflection and roughness. For example clay would have a max roughness and hardly any reflection where as something like glass would have a lot of reflection and hardly any roughness. Roughness is also really important for shading because it breaks up the uniformity of colour and specular reflection.

The only constant is that, no matter how matte something is, it will always have some level of reflection and refraction.

IOR, in short, is a number that tells you how much and what direction light bends when going through a medium. This is really important. Most materials have an IOR of around 1.5. However, this changes with concrete, which is matte but appears shiny from a certain angle.

Plane materials

Our Mosquito had a gun-blue paint which needed really rough reflection (IOR 1.52). However, more adjustments can be made in Nuke.

UDIMS’s

We have an advantage when creating UV’s in Houdini. We can use UDIMs. With UDIMs we can treat each part of the plane individually because they can all have there own UV space. Materials can be added to each individual stream. If you are building outside of Houdini, you would have to go in and manually group the streams yourself.

UDIMs can also be very helpful if your object has different materials such as metal, rubber or glass. You can organise the different materials in different UDIM rows. UDIMs go to a max of 10 spaces in the U axis but an unlimited amount in the V axis. This makes them easy to refer back to and select all together when making changes.

There are two methods of attaching materials to your objects. You can either add a material node at the end of your node or you can add a material to the end of the completed object and assign materials to objects you have previously created groups for. This means, each material is assigned to a different group in one node.

Shading with Attribute VOP’s.

I wanted to have a look at some more commonly used features of VOP’s. I decided to follow a tutorial on how to make a small, low polygon planet. The attribute VOP is a vector operator that allows you to take the components on your object and edit all those components at the same time.

You can use math to manipulate values inside of the attribute VOP and it will allow you to shade your object. When we go into our VOP and add a constant we can change the values of the RGB between (0,0,0) and (1,1,1), making our object black, white or a grey in between. However, our RGB stands for Red, Green, Blue and combining these hues of light is the standard method for producing a whole rainbow of colour options. So if (0,0,0) is black and white is (1,1,1), how do we get colours? We need to use vectors to get three individual values! To do this we need to add a multiplier node.

When using a multiplier node, it turns the object black. This is because the number it automatically starts on is zero, and zero multiplied by zero is zero, which is black. When we increase the values, we begin to see colours.

When using an add node, we can make our colours brighter unless we are adding by a negative.

It was very interesting to find out that multiplying affects the colour and adding affects the brightness of the colour. I assumed when using multiplication you could change both but this is incorrect.

Some other interesting nodes I had a play around with are:

Colour Mix, which allows us to blend the first input of colour and the second. Changing the bias amount will let us decide how much you want the colours to mix.

Vector to Float or Float to Vector, which allows you to convert from a single component value (0) to a vector such as (0,0,0) which we know we can use to change colours or position.

When creating ocean and land colours for my planet, I took my position attribute and plugged it into my colour so that my colours were determined by the points on my sphere. Then after adding a 3D noise node, my planet began to change shape depending on where my points were between 0 and 1. Because my colour is determined by my point position and my noise is affecting the displacement, I could have the green (land) on my planet be raised about the blue (sea level). Here’s the finished product.

The tutorial I followed to create this was the
Houdini Kitchen: Introduction to VOP’s

Introduction to VOPs

Another way to add materials to your objects is to use Ptex, made by Wetta. You can work on a model without UV’s because you can add them on the fly. You can go in and paint on the textures after you have finished building your model. This is procedural though, as you cannot go back and modify the UV’s or see their geometry.

References:

Leave a comment

Design a site like this with WordPress.com
Get started