About Us   Contact Us   Site Security  
 
 
 
Home V-Ray for 3ds Max / Design V-Ray for Maya V-Ray for Softimage V-Ray for SketchUp V-Ray for Rhino V-Ray for C4D
 
     

 Subscribe to our V-Ray News Feed

Categories Categories
V-Ray for 3ds Max / Design
V-Ray for Maya
V-Ray for SketchUp
V-Ray for Rhino
V-Ray for C4D
V-Ray for Softimage
V-Ray for Blender
V-Ray Materials
V-Ray Training

V-Ray Gallery
V-Ray Tutorials
V-Ray Manuals
V-Ray Artist Spotlight


Product Select Product Select
V-Ray 3.0 for 3ds Max / Design(New)
V-Ray for 3ds Max / Design (EDU)
MultiScatter
AutoGrass for V-Ray
V-Ray 2.0 for Maya
V-Ray for Maya Educational Edition
V-Ray 2.0 for SketchUp (New)
V-Ray for SketchUp EDU
V-Ray for SketchUp EDU to Commercial Upgrade
V-Ray for SketchUp EDU Lab Bundle
V-Ray for SketchUp Mac OS X
V-Ray 2.0 for Rhino (New)
V-Ray 2.0 for Rhino EDU (New)
V-Ray for Rhino EDU to Commercial Upgrade
V-Ray 2.0 for Rhino EDU Lab Bundle (New)
V-Ray 1.8 for C4D (New)
V-Ray 1.8 for C4D EDU (New)


V-Ray Resources V-Ray Resources
Free V-Ray Demo
Free V-Ray Tools


Help Help
V-Ray Product Support
Contact us
Retrieve Account Information
Privacy statement
Terms & Conditions


Payment Options Payment Options
Visa Accepted
 
MasterCard Accepted
 
Discover/Novus Accepted
 
American Express Accepted
 
PayPal Accepted
 
Official PayPal Seal

VRay.com - Your source for all things VRay  ::  VRay for 3ds Max  ::  Tutorials  ::  Displacement Mapping

VRay for 3ds Max Tutorials

VRay for 3ds Max Tutorials

Displacement Mapping

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

In this tutorial we'll examine displacement mapping in V-Ray. 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:

Original object
Bump mapping
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 V-Ray 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 V-Ray 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:

This is because V-Ray 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 Editor 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:

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:

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:

Shift = -5.0
Shift = 0.0
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:

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):

Water level = 0.0 (no clipping)
Water level = 1.25
Water level = 2.5
Water level = 3.75
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

V-Ray 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 V-Ray 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):

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

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:

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
0.5

Normal rendering
 
Blowup rendering
Edge length value
1.0

Normal rendering
 
Blowup rendering
Edge length value
2.0

Normal rendering
 
Blowup rendering
Edge length value
5.0

Normal rendering
 
Blowup rendering
Edge length value
10.0

Normal rendering
 
Blowup rendering

Buy VRay for 3ds Max
Buy VRay for 3ds Max

VRay has become the top choice for fast and accurate photo-realistic rendering. Offering state-of-the-art rendering technology, VRay has single handedly transformed the CG industry.

View Product Page




Buy VRay for 3ds Max EDU

VRay has become the top choice for fast and accurate photo-realistic rendering. Offering state-of-the-art rendering technology, VRay has single handedly transformed the CG industry.

View Product Page


V-Ray Newsletter

V-Ray Newsletter
Renderings by Dennis Brunn

 
Subscribe to our V-Ray Newsletter

Subscribe to our V-Ray Newsletter and receive new V-Ray product announcements, special sales, tutorial updates and more!

Brought to you by Visual Dynamics LLC.


  Your email address is never shared and is always kept strictly confidential. Each newsletter that we send always has a single click unsubscribe link so that you can unsubscribe at any time if you decide that you wish to do so.


*  Your email address:
*  Enter the security code shown:


Your cart Your cart
View cart
Checkout
Wish list
Orders history


News News

Monday, March 24, 2014

V-Ray 2.0 for SketchUp now supports SketchUp 2014

V-Ray 2.0 for SketchUp now supports SketchUp 2014

V-Ray 2.0 for SketchUp Service Pack 1 is now available for download. A few new features have been added and improvements have been made to many current ones.

Click here for more information



Your e-mail:

Type the characters you see in the picture. (If you do not see any picture here, please enable images in your web browser options and refresh this page):

Get a different code
Subscribe 


Follow Us on Twitter

Follow Us on Twitter



Feedback Feedback

Truly a great service experience! I'd recommend this site to anyone.

Jeff O.
Click Draw
Richmond, Canada


I emailed with a query as I am intending to purchase V-Ray but had some reservations about the products compatibilities etc. A big thank you to Scott Slauson who replied extremely quickly and answered all my questions clearly and concisely, very impressed!

Kris R.


Great service!

Artem T.
Leipzig, Germany


very soon & very good

Oscar
Taipei, Taiwan


Thank You Scott, congratulations by your competence and kind!!!

Carlos S.
TKS Educacao e Tecnologia
Curitiba, Brazil
 


Robin A.
RA Design
Measham, United Kingdom


View More Feedback Results




VRay.com is a service of Visual Dynamics LLC Copyright 2014 VRay.com - Your source for all things V-Ray