Advanced car-paint OSL shader

cglSurfaceCarPaint is an advanced car-paint OSL shader, free to download from CG-Lion studio’s website.

The cglSurfaceCarPaint car-paint material combines 3 layers:
Base: A blend of diffuse/metallic shading with a view-angle color mix
Metallic flakes: Distance blended procedural metallic flakes
Clear coat: Glossy clear coat layer with built-in procedural bump irregularity
And has been tested with:
Blender & Cycles
Maya & Arnold
3ds max & V-Ray

Download and more info

Getting started with OSL shaders

 

V-Ray for Maya toon shading

Software:
Maya 2018 | V-Ray 3.6

Toon shading in V-Ray consists of two elements:

  1. A VRayToon node that creates a graphic contour effect on the rendered image.
  2. A flat shader that uses surface luminance data to define color areas.
    * A VRayLightMtl can be used for that.

Creating the VRayToon node:

  1. Click the Create V-Ray Toon button in the V-Ray toolbar to create a VRayToon node.
  2. In the VRayToon node attributes, set line thickness, color, and more graphic properties.
    * if you created a VRayToon node and it’s not selected RMB click the Create V-Ray Toon button in the V-Ray toolbar and choose Select VRayToon node.
    * To delete the VRayToon node, select it and press Delete.

Creating the toon shader:

  1. Create a VRayLightMTL node as the object’s surface shader.
  2. Create a Ramp texture node, connect it’s output color to the VRayLightMTL’s color input and delete it’s accompanying 2D placement node.
  3. Create a surfaceLuminance node and connect it’s output to the Ramp node’s V Coord input.
  4. Optional remapValue node between the surfaceLuminance node and the Ramp node to clamp the luminance values.
  5. Optional floatMath node to scale or manipulate the surfaceLuminance output value.

Untitled-1Untitled-2

Related:
Arnold for Maya Toon Shading

V-Ray for Maya with XGen

Software:
Maya 2018 | V-Ray 3.6

The technical steps needed to render XGen hair with V-Ray and a VRayHair3Mtl in Maya:

  1. in the Plugin Manager,
    Make sure the xgenvray.py plugin is loaded.
    * Needless to say vrayformaya.mll must be loaded too.
  2. Set a Project Folder and save the scene.
  3. In Render Settings, set the Renderer to V-Ray.
  4. Select an object or mesh elements and create an XGen Description.
    * This can be done by clicking the Create New Description button in the XGen tab or XGen Window.
  5. In the XGen Output Settings set the Operation to Render and the Renderer to V-Ray.
  6. Edit / Design / Groom your hair.
  7. In the XGen window, Choose File > Export Collections or Descriptions,
    And export the hair Collection and Description.
  8. in the XGen window, Choose File > Export Patches for Batch Render,
    To export the hair cache abc (alembic) file.
  9. In the Hypershade, create a VRayHair3Mtl shader.
  10. In the Outliner, select the XGen Description.
  11. In the Hypershade Browser window,
    RMB click the VRayHair3Mtl and choose Assign Material To Selection.
  12. Make sure there is a light source, and render the scene.

 

Related:
V-Ray for Maya and nHair

Untitled-1

Untitled-1.01

Untitled-1.1.1.jpg

Untitled-2

Untitled-3

Untitled-3.1.jpg

Untitled-4

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

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