Randomize textures in V-Ray for Maya

Software:
Maya 2018 | V-Ray 3.6

Connect the different texture options as inputs to a VRayMultiSubTexNode and connect it to the wanted material input.
In the VRayMultiSubTexNode attributes, set Get ID From to Random by Render ID.
* Press add new item in the VRayMultiSubTexNode attributes to add one or more inputs to the list.

Untitled-1

Maya V-Ray GPU texture resizing

Software:
Maya 2018 | V-Ray 3.6

By default V-Ray for Maya, when Production Engine is set to CUDA (GPU), resizes all the textures to 512×512 in order to save GPU memory.
Naturally, this may cause the textures to appear blurry and lacking detail in the rendered image.

To avoid this,
In Render Settings > V-Ray tab > Production renderer,
Set GPU Resize Textures to Full Size Textures, so the textures will not be resized at all (but consume more memory),
Or On-demand mipmapping, so the textures data will be optimized to reduce memory consumption (but not quality) in a pre-render process.

Note:
To get full size textures in IPR mode, do the same in the IPR tab

Untitled-3

Untitled-2

Untitled-1.jpg

Using VRayMtlHair3 shader with nHair in Maya

Software:
Maya 2018 | V-Ray 3.6

  1. Select the nHair object.
  2. In the Attribute Editor, in the hair system shape attributes.
    Open the Attributes menu, and choose VRay > Hair Shader.
  3. Create a VRayMtlHair3 shader.
  4. Connect the shader to the Hair Shader slot under VRay Extra Attributes in the hair system Shape Node attributes.

Untitled-1

 

Related:
V-Ray for Maya and XGen

Displacement in V-Ray for Maya

Software:
Maya 2018 | V-Ray 3.6

Basic Displacement through the shader:

1) Connect a displacement map to the Displacement Shader input of the Shading Group Node.

2) Multiply the value to set the displacement amount.

3) Control Displacement Settings globally through VRay Render Settings:
Edge Length:
The minimum size in pixels for new created edges.
Lower values will create more detailed geometry but cost more memory.

Disp_A.jpg

 

Per Object Displacement with more controls:

1) Add a VRay Displacement node to the object (See images).

2) Connect Displacement Map

3) For more control, and Local displacement quality settings,
In the Attributes Editor, Add VRay Displacement Control and VRay Subdivision and Displacement Quality attributes to the object (See images).

Disp_B.jpg

Disp_B1.jpg

V-Ray for Maya Matte / Ray Visibility

Software:
Maya 2018 | V-Ray 3.6

Basic object render visibility can be set through Maya’s Render ‘Stats settings’ in the object shape node.

For more control and Matte Object / Shadow catching options, add VRay Object Properties to the Object (See Example)

To Create a Shadow Catcher:

1) Add VRay Object Properties to the objects (see image)

2) In the VRay Object Properties attributes, check ‘Matte Object’

3) Check Shadws

vray_maya_matte1.jpg

Shadow Catcher Notes:

* Artifacts in shadows while using Light Cache GI (no problem with Brute Force GI)

* When using a Dome Light, the Dome light Back ground will not show through the Matte Object but the Environment background to solve that connect the Dome light texture also to the VRay Enviroment Override.

* In order for ‘Affect Alpha’ to work and produce transparent image, ‘Alpha Contribution’ must be set to -1.

 

Materials:

Matte Shadow and Ray Visibility can also be set through shaders, by using a VRayMtlWrapper:

Untitled-3.jpg

And also by using a VRayRaySwitch texture:

Untitled-4.jpg

Sample based white balance using the physical camera in 3ds max / Maya

Software:
3ds max 2017 | Maya 2018 | V-Ray 3.6

3ds max

Render a test with White Balance set to Custom with pure white color.
Let the rendering go on at least until the pixel values stabilize (the Denoiser works at least once..).

WB_A
Test done using custom white balance with pure white

set the white balance custom color to a color sampled from the VFB at a point that you know should be appearing completely neutral (neither warm or cold)

WB_B
White balance is set using sample from the test rendering

Render again.

WB_C
A new render done with the sampled white balance color

* Each time you want to test different sample locations you need to sample the pixels from the test rendered with custom pure white.

Maya

The procedure in Maya is identicle,
Add V-Ray Physical Camera attributes to the camera and enable them,
Create a test render with pure white White-Balance Color,
Sample the white/grey surface color in the V-Ray VFB (Render Window) to the White-Balance color, and render again.

Untitled-2.jpg

Untitled-2.jpg

 

V-Ray for Maya Physical Camera

To access V-Ray Physical Camera functionality in Maya,
V-Ray Physical Camera attributes must be added to the camera and enabled.

1) select the camera

2) In the attribute editor open the Attribute menu and choose V-Ray > Physical Camera

3) make sure treat as physical camera is enabled

* you can add more V-Ray Attributes to the camera like this

V-Ray_Physical-camera