Trinity3D.com
Buy online or call 1-800-548-1578
Home Contact Us Downloads Free Tutorials Animation Production  

 
   

Bookmark and Share  



  VRay Categories   Categories

VRay for 3ds Max
VRay for Max EDU
VRay for Maya
VRay RealTime
VRay for Rhino
VRay for SketchUp
VRay for Cinema4D
Standalone
Bundles
Learn VRay Interiors
Learn VRay Exteriors


Animation Production
Ultra Render Farm
Photosimulation


  VRay Resources   VRay Resources

1. Free VRay Demo
2. Free VRay Tools
3. Free VRay Tutorials
4. VRay Documentation
5. VRay Tips and Tricks
6. VRay Gallery


  VRay Bestsellers   Bestsellers

1. VRay Renderer
2. VRay Bundle
3. VRay Super Bundle
4. VRay Educational
5. Learn VRay Bundle
6. VRay RT


     Special
Gift certificates


     Help

Contact us

800-548-1578 - (US)
816-525-0103 - (International)

email: sales@trinity3d.com


Privacy statement
Terms & Conditions


  What's New   What's New

Archinteriors Bundle

Save Big with Evermotion Bundles

ArchModels, ArchInteriors, and/or ArchExteriors

1. ArchBundles 2-Pack
2. ArchBundles 3-Pack
3. ArchBundles 4-Pack
4. ArchBundles 6-Pack
5. Archinteriors Vol 1 - Vol 5 Bundle
6. Archinteriors Ultra Bundle


     Ballistic

Inspiration Unleashed

Massive Black

Ballistic Publishing Books - Massive Black

d'artiste Digital Painting

Ballistic Publishing Books - Digital Painting

d'artiste Character Modeling

Ballistic Publishing - Character Modeling

d'artiste Character Modeling Vol. 2

Ballistic Publishing - Character Modeling 2

d'artiste Character Modeling Vol. 3

Ballistic Publishing - Character Modeling 3

Expose 7

Ballistic Publishing - Essence the Face


     Newsletter

Subscribe to our Newsletter!

Trinity3D.com Newsletter

Subscribe to our newsletter and receive new product announcements, special sales, coupons and more! Your email address is never shared, is always kept strictly confidential and you can unsubscribe at any time.

Trinity3D.com Newsletter
 

* Your Email Address

 

 


  VRay Home  ::  VRay Documentation Home  ::  VRay Tutorials Home

Search Keywords: displacement, displacement mapping, 2D, 3D

In this tutorial we'll examine displacement mapping in VRay. We will concentrate on the 3d displacement mapping method.

What is displacement mapping?

Displacement mapping is a technique for adding geometric detail to surfaces at render time. In contrast with bump mapping, which works by just changing the surface normal to create the illusion of surface detail, displacement mapping modifies the surface itself. Here is an example of the same object rendered with bump mapping and with displacement mapping:

VRay Tutorials - VRay Displacement Mapping Tutorial
Original object
VRay Tutorials - VRay Displacement Mapping Tutorial
Bump mapping
VRay Tutorials - VRay Displacement Mapping Tutorial
Displacement mapping

In the case of displacement mapping, the surface is actually modified, which leads to correct outline, shadow and GI. In the case of bump mapping, although the surface appears modified, the outline and the shadow stay the same.

Note that displacement is different from other kinds of shading, since it needs to modify the actual object surface. Therefore an object must be displaced before it can be rendered. This is why in VRay displacement is represented with a modifier (although the modifier can take the displacement map from the object material).

A simple example - a displaced sphere

Start with an empty scene. Create a GeoSphere with a radius about 40 units in the viewport and choose VRay as the renderer. Apply some Standard material to the sphere.

Applying the VRayDisplacementMod

Go to the Modify panel and apply a VRayDisplacementMod to the sphere. If you render straight away, you will notice a slight displacement effect, like so:

VRay Tutorials - VRay Displacement Mapping Tutorial

This is because VRay applies a simple noise displacement map when no other texture is chosen.

Selecting a displacement map

To select another map, click the texture button in VRayDisplacementMod. This will bring up the Material/map browser dialog. Choose a Cellular texture. To edit the newly created map, open the Material Edtior and drag the map from the button in VRayDisplacementMod to a slot in the Material Editor. Choose the Instance method when you drop the map.

If you render again, you should get a similar result:

VRay Tutorials - VRay Displacement Mapping Tutorial

Setting the displacement amount and shift

To make the displacement effect more pronounced, increase the Amount value of VRayDisplacementMod. If you set it to 5.0 and render you will get something like this:

VRay Tutorials - VRay Displacement Mapping Tutorial

The Amount value determines the maximum displacement amount (which occurs at places where the displacement map is white).

You can shift the whole displacement map up and down by adjusting the Shift parameter. The effect will be to expand (for positive Shift values) or shrink (for negative Shift values) the displaced surface. Here are some examples of different Shift values:

VRay Tutorials - VRay Displacement Mapping Tutorial
Shift = -5.0
VRay Tutorials - VRay Displacement Mapping Tutorial
Shift = 0.0
VRay Tutorials - VRay Displacement Mapping Tutorial
Shift = 5.0

Note that the Shift parameter is an absolute value in world units. If you change the Amount, you will probably need to adjust the Shift too.

Clipping geometry using the Water level

The Use water level and Water level parameters allow you to clip parts of the object. Return the Shift value to 0.0, if you have changed it. Then turn on the Use water level option and set the Water level to 2.5:

VRay Tutorials - VRay Displacement Mapping Tutorial

The geometry is clipped away for those places in the displacement map where the displacement value is below the Water level. Here are a few examples of different Water levels (assuming the Amount parameter is still 5.0 and the Shift parameter is 0.0):

VRay Tutorials - VRay Displacement Mapping Tutorial
Water level = 0.0 (no clipping)
VRay Tutorials - VRay Displacement Mapping Tutorial
Water level = 1.25
VRay Tutorials - VRay Displacement Mapping Tutorial
Water level = 2.5
VRay Tutorials - VRay Displacement Mapping Tutorial
Water level = 3.75
VRay Tutorials - VRay Displacement Mapping Tutorial
Water level = 5.0 (all geometry is clipped)

The Water level parameter is also absolute in world units. If you change the Amount and/or Shift, you will probably need to adjust the Water level to get the same effect.

For 3d displacement, the geometry is clipped on a sub-triangle basis - a subtriangle is either clipped away entirely, or completely visible (this is not the case for 2d displacement where clipping is more precise). Therefore, you may get a jagged effect at the clipped edges. You can reduce this effect by producing more subtriangles (see the next section).

Displacement quality

VRay does 3d displacement by subdividing each triangle of the original object into a number of subtriangles. More subtriangles mean better displacement, but will also take more memory and will increase the render time. To get a better idea of how many subtriangles you have, apply a Standard material to the sphere (if you haven't done so already) and turn its Faceted option on. This is important, as otherwise VRay will not only smooth the surface normals, but will also automatically apply a normals map that represents the normal of the perfect displaced surface, which will make the surface look a lot more detailed that it actually is. Also, switch off the Use water level option of VRayDisplacementMod, if it is on. If you render, you should get a similar result (click the image for a larger view):

VRay Tutorials - VRay Displacement Mapping Tutorial

Here is a blow-up of this rendering to better show the individual subtriangles (click the image for a larger view):

VRay Tutorials - VRay Displacement Mapping Tutorial

In addition, here is a rendering that shows the boundaries of the original triangles of the sphere. To do that, put a VRayEdgesTex map in the Diffuse slot of the material and instance this map into the Self-illumination slot. Set the Color of the edges in the VRayEdgesTex to red and the Thickness to World units:

VRay Tutorials - VRay Displacement Mapping Tutorial

The quality of the displacement is determined by the size and number of the subtriangles. The main parameter to tweak is the Edge length. It determines the maximum length of a subtriangle's edge. This can be in world units or in pixels, depending on the View-dependent option. Lower values for Edge length mean smaller triangles and better quality. Here is the previous image rendered with various values for Edge length (with View-dependent turned on). Note that the View-dependent option refers to pixels in the original image, not the zoomed-in image you get with a blow-up rendering. This is why we were able to do a blow-up rendering to see the individual subtriangles better. Click the images for a larger view:

Edge length value
Normal rendering
Blowup rendering
0.5
VRay Tutorials - VRay Displacement Mapping Tutorial
VRay Tutorials - VRay Displacement Mapping Tutorial
1.0
VRay Tutorials - VRay Displacement Mapping Tutorial
VRay Tutorials - VRay Displacement Mapping Tutorial
2.0
VRay Tutorials - VRay Displacement Mapping Tutorial
VRay Tutorials - VRay Displacement Mapping Tutorial
5.0
VRay Tutorials - VRay Displacement Mapping Tutorial
VRay Tutorials - VRay Displacement Mapping Tutorial
10.0
VRay Tutorials - VRay Displacement Mapping Tutorial
VRay Tutorials - VRay Displacement Mapping Tutorial

  Buy VRay
VRay
Buy VRay - $899
 

Buy VRay (Educational Version) $240


Buy VRay - Bundle $999


Buy VRay - Super Bundle $1135


  

Follow our newsfeed for all latest product updates and discounts

     Your cart
Cart is empty

View cart
Checkout


     Authentication
Username

Password

Log in
Register
Recover password

If you have disabled Javascript in your browser click here


     VRay News

Populate your scenes quickly and professionally with Evermotion's 3D Archmodels!

Evermotion Archmodels Vol. 70

Add top quality props to your scene within minutes. Archmodels provides professional high quality 3D models for your visuals.

Click for more details


     Popular Products

Facebook 

Follow us on Facebook!

Get the latest info on new products and special offers.

Or check out our ebay store - Discounted items


 
 
Trinity Animation Inc.

Pre-Sale and Post Sale Support

Trinity Animation, Inc.

We have years of real world production experience and our knowledgeable staff can provide you the support you need for your pre-sale or post sale questions.


Flat Shipping Available Flat Shipping Available

Only *$9 for national shipping via FedEx Ground
Only **$25 for International shipping via FedEx to most countries

Both shipping options include the following benefits:

  • Tracking Number
  • 3-5 Day Average Arrival Time
  • Guaranteed Arrival

*$9 national shipping includes most packages. Please note however that heavier items such as books require additional shipping charges.

**
$25 covers most countries. You will be contacted prior to shipment if your country is not included within the FedEx International shipping price. Please note that heavier items such as books require additional shipping charges.

International Customers: please be aware that you are responsible for any/all customs, duties, taxes and fees that your country might charge.

Downloadable products do not require shipping and do not incur a shipping charge. 


Learn 3ds Max and VRay From The Pros
ArchInteriors provides finished, top-notch architectural interiors set up for use with VRay to get photo real results. You just load and render! You can dissect the scene file to learn how it was done.
 
Archinteriors Vol. 13 Archinteriors Vol. 14 Archinteriors Vol. 15
Learning VRay - Archinteriors Vol. 13 Learning VRay - Archinteriors Vol. 14 Learning VRay - Archinteriors Vol. 15

Trinity3D.com Newsletter Subscribe to our Newsletter!

Subscribe to our newsletter and receive new product announcements, special sales, coupons and more! Your email address is never shared, is always kept strictly confidential and you can unsubscribe at any time.

 Trinity3D.com Newsletter

* Your Email Address: