Welcome to this V-ray feature short demonstration.
In this video we will take a look at the v-ray displacement modifier together with the v-ray
hair material and the Ornatrix plugin, all supported in V-Ray GPU.
The concept of displacing a mesh is taking a polygon
mesh object, subdividing it into smaller polygons and offsetting them along the normals.
The amount of offset depends on the values of a texture and the displacement amount parameter.
This way white values in the map will be offset 5cm, black values are not going to be offset
at all, and grayscale values will be offset within that range.
If an 8-bits per channel texture is used for displacement, its values are positive, and
one cannot have both positive and negative offset.
That’s why the displacement shift can be set to half the amount in negative direction.
It is important to note that both the shift and amount parameters are in world units.
In the case when floating-point maps are used for displacement, the amount value should
be set to 1 and no shift is required.
This is because these maps can contain negative and larger than one values that do not need
adjustments.
A unique feature of the V-Ray Displacement is the “Water level”.
It allows you to remove the geometry below a certain displacement amount.
The value for water level is measured in world units and should be larger than the shift
value.
The removed polygons are not stored in memory and not processed at all, making the feature
very optimized.
Displacement can also be performed in a different direction than the polygons’ normals.
This way more complex shapes can be achieved.
This can be done using the “Vector displacement” mode.
It requires special RGB maps, that can be extracted from external tools or using the
“VRayVectorDisplBake” material.
The level of detail for a displacement can be controlled by the “Edge length” parameter.
It tells V-Ray how long an edge is allowed to be.
If any edge is longer than that value it is subdivided, thus refining the displaced mesh.
The length of an edge can be measured in world space, in our case centimeters, and also in
screen space – in pixels.
That is set by the “View dependent” option.
If it is disabled, the edge length is calculated in world units.
Otherwise, it is the number of pixels an edge occupies in the rendering.
This is a great optimization, since edges far from the camera are not subdivided that
much, and do not take up memory.
That’s why it is enabled by default and it is not recommended to turn it off.
Let's open up the render settings and make sure that ActiveShade is set to V-Ray RT.
We'd like to render on the GPU.
For NVIDIA GPUs it is recommended to render with the CUDA engine type, so let’s choose
that and click the render button.
Overall our model has just a basic shape and no details.
We can use displacement to add all the needed detail.
Let’s start with the helmet and add a displacement modifier.
If we look at the displacement texture, we’ll see that the mid-point is 0.5 and overall
we have values from 0 to 1.
That means the texture min and max could be set from 0 to 1 to cover the range of the
texture values.
Since the mid-point is 0.5 we need to shift back the displacement with that value.
To make the displacement stronger we can double the amount.
We need to compensate for that in the shift value as well.
Let’s apply a metal material to the helmet.
Using the same approach, we can add displacement to the armor as well.
The displacement texture used on the armor though, has values less than 0 and greater
than 1.
To cover the whole range, we should set the texture min and max to appropriate values.
Let’s take a closer look at the sleeve and utilize the “Water level” feature.
Just as before, we can start off by adding a displacement modifier, reset all of its
settings and plug in a texture.
We can lower the displacement amount if the effect is too strong.
By ticking on the water level checkbox, we can clip all of the geometry that is below
a specified height.
In this case 0.1cm.
A larger “Edge length” value could cause some jagged edges, so let’s lower it.
Let’s apply a metal material to this chainmail as well.
The helmet has some hair on it which is currently hidden.
Let’s unhide it and apply a v-ray hair material on it.
The “VRayHairMtl” is optimized for rendering hair and fur objects.
The hair and fur objects have additional information that can be extracted with the “VRayHairInfoTex”
texture.
For example, we can extract the position from root to tip for every hair and map colors
along it.
It can also be used with black and white colors, to drive the transparency of the hairs.
This makes the tips looking soft and fuzzy.
Another mode of the “VRayHairInfoTex” is “Random by strand index”, which gives
a random color based on the index of each strand.
This can be used to introduce variation in the hair.
To quickly achieve a certain type of hair look, we can choose one of the presets in
the “VRayHairMtl”.
Since hairs are thin and translucent, their main color should be set by the transmission
color.
Let’s change it.
We can use the V-ray hair info texture to bring in some variation.
For example, we can use position along strand to assign different colors to the root and
the tip of each hair strand.
We can also use the bias setting to favor either the first or the second color.
If we choose the random by strand index output, each hair strand would be colored in either
the first or the second color.
Again, using the bias we can control this further.
By using pure black and white colors in the v-ray hair info texture, we can use it in
the opacity slot of our material to drive the softness of each hair strand tip.
Let’s assign a red hair material and increase the hair count significantly to achieve a
better look.
Let’s unhide the animal fur which was created in the exact same way and let it render.
In this video, we went through simple steps explaining how displacement works and how
we can utilize it on the GPU.
We have also covered the hair material and the hair info texture.
I hope you have found this video useful and helpful.
Please give us your feedback, comment or share it.
If you’d like to follow along this tutorial you can download the scene from the link provided
in the description of this video.
Make sure you check out more of the V-Ray feature videos and be on the lookout for new
ones.
Thank you for watching.