Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This example shows the difference between bump mapping and displacement mapping. Notice the round outline of the sphere and its shadow in the case of bump mapping, and the deformed outline produced by the displacement:

Section
Column
width10%
 
width

Image Removed Bump mapping

Column

Image Removed
Displacement mapping

Before after
40%
Column
width40%
afterLabelDisplacement
beforeLabelBump
Panel

Image Added

Panel

Image Added

Column
width10%

 

 

 

 



Attributes

...

 

 

None – When enabled, turns off displacement.

...

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

 

Section
Column
width5%25%

 

Image Removed  Displacement Shift = -columnwidth30%columnwidth30%
Column
width30%
50%
Image slider
minLabel-10.0
startIndex2
maxLabel10.0
Panel
borderStylenone

Image Added

Shift = -10.0

Panel
borderStylenone

Image Added

Shift = -5.0

Panel
borderStyle
none
Image Removed Displacement

Image Added

Shift

 

=

 0

0.0

Panel
borderStyle
none
Image Removed Displacement

Image Added

Shift

 

=

 5

5.0

Panel
borderStylenone

Image Added

Shift = 10.0

Column
width5%25%

 

 

Anchor
keepContinuity
keepContinuity

...

The Keep Continuity option is useful for objects with disjoint normals on neighboring triangles, usually because of different smoothing groups. In the middle image below you can see the edge splits produced by disjoint normals. Using the Keep Continuity option avoids this problem. This option will also help to produce a smoother result across material ID boundaries for objects with multiple materials.

Section
Column
width5%25%

 

columnwidth30%columnwidth30%
Column
width30%50%
Image Removed
Image slider
startIndex1
Panel
borderStylenone

Image Added

No displacement

Panel
borderStyle
none
Image Removed

Image Added

Keep

Continuity

continuity = disabled

 
Panel
borderStyle
none

Image Added

Image Removed

Keep

Continuity

continuity = enabled

 

Column
width5%25%

 



Anchor
clipMapping
clipMapping

...

Note: The Water Level parameter is also absolute in world units. If you change the Displacement Amount and/or Displacement Shift, you will probably need to adjust the Water Level to get the same effect. For this example, the Displacement Amount parameter is set to 5.0 and the Displacement Shift parameter is set to 0.0.

Section
Column
width25%
Image Removed
Water Level =

 

columnwidth25%columnwidth25%columnwidth25%
Column
width50%
Image slider
minLabel0.0
startIndex2
maxLabel5.0
Panel
borderStylenone

Image Added
Water level
  0.0 (no clipping)

Panel
borderStyle
none
Image Removed

Image Added
Water

Level

level =

 1

 1.25

 

Panel
borderStyle
none
Image Removed

Image Added
Water

Level

level =

 2

 2.5

 

Panel
borderStyle
none
Image Removed

Image Added
Water

Level

level =

 3

 3.75 

Panel
borderStylenone

Image Added

Water level = 5.0 (all geometry is clipped)
Column
width25%

 

 

Anchor
texture
texture

...

 

 

Example: Texture Boundaries

...

This example shows a plane mapped with a displacement map that has negative values. With the default boundaries for the displacement (from 0 to 1) we are unable to see the geometry displaced in the negative direction. However, once we set Displacement bounds to Explicit and set Min value and Max value to -1 and 1 respectively, we can see the displaced geometry in both the positive and negative direction.

 

Section
Column
width10%25%

 

Image Removed Min value  = 0 ; Max value = 1

Image Removed Min value  = -1 ; Max value = 1

Column
width40%
Column
width40%
50%
Before after
afterLabel-1/1
beforeLabel0/1
Panel
borderStylenone

Image Added

Panel
borderStylenone

Image Added

Column
width10%25%

 

 

...

 

Expand
titleScripting
UI Text Box
typeinfo

 

Add to node:

vray addAttributesFromGroup "pSphereShape1" "vray_displacement" 1;

Attributes:

vrayDisplacementNone
vrayDisplacementStatic
vrayDisplacementType
vrayDisplacementAmount
vrayDisplacementShift
vrayDisplacementKeepContinuity
vrayEnableWaterLevel
vrayWaterLevel
vrayDisplacementCacheNormals
vray2dDisplacementResolution
vray2dDisplacementPrecision
vray2dDisplacementTightBounds
vray2dDisplacementFilterTexture
vray2dDisplacementFilterBlur
vrayDisplacementUseBounds
vrayDisplacementMinValue
vrayDisplacementMaxValue 

...