V-Ray – Underwater rendering tip

Software:
3ds max 2019 | V-Ray Next

I decided to do some test renders for an underwater swimming pool scene with 3ds max and V-Ray,
And happily found out that my initial geeky academic approach to the subject was actually outdated and unnecessary.
> look down at the bottom for the correct sample renders.

In this example there is a VRaySun & VRaySky for the daylight render setup and a Caustics calculation to create the light lensing effects on the under water surfaces.

The wrong way:
Having ancient habits in the subject,
I first flipped the water\air surface’s normals so they’ll point down into the water (towards the camera), And set the water material’s IOR to 0.75Ā ( 1 / 1.333 ) so instead of being an “air to water” material, it will become a “water to air” material.
This produced a non realistic result.
Viewed from underwater, the air surface should have a very dominant mirror reflection at most angles.Untitled-1.jpg

 

The Correct Way:
It seems that in V-Ray nothing special should be setup in terms of the water material.
You don’t have to create a special water-to-air material like I thought at first.
Its a regular water material, and the water surface is facing upwards like it should,
And when the camera is underwater it renders the water surface correctly as an air surface from withing the water.

The pool water material setup:
Note that Affect Shadows is turned off so the surface will generate caustics and not fake transparent shadows, and that Reflect on back side is turned on to produce more detailed reflections.
mat.jpg

This produced the following result in which the reflection/refraction look correct but the water is still too simple:Untitled-2.jpg

Improved wave deformation for the water surface, added detail using a Noise bump in the water material and a sense of depth with Volumetric Fog:Untitled-4.jpg

Finally remembered to activate Reflect on back side at the water material to add more realistic reflection detail, some basic contrast in the V-Ray VFB,
And a shark because I couldn’t help it…. šŸ˜€
Untitled-6.jpg

Advertisements

V-Ray Next’s PBR’ness

Software:
3ds max 2019 | V-Ray Next

A quick test of V-Ray Next‘s PBR workflow,
Namely designing materials while previewing them using V-Ray,
Defining the material properties using the new (to V-Ray)Ā Metalness attribute, and usingĀ Roughness rather than Glossiness, shows good results IMO.

Results are generally consistent through Blender & Cycles, Maya & Arnold, and UE4.

Untitled-1.jpgUntitled-3

Untitled-4

Untitled-2

 

Related Posts:

  1. V-Ray Next – Metalness
  2. Metal In UE4
  3. Fresnel Reflections

Complex Fresnel texture for Cycles

Software:
Blender 2.79 | Cycles Renderer

The most realistic way to create real world metal shaders is to use Complex Fresnel reflection.
Cycles has a general implementation of a Complex Fresnel reflection in its Principled shader (when Metallic is set to 1.0), but this implementation doesn’t allow using real world physical numeric Complex IOR values in order to accurately render physical metals.

You can use a Complex IOR OSL shader such as this one from Chaos Group,
But there are some limitations with it:
1) It isn’t supported in GPU rendering.
2) For some reason I don’t know I couldn’t get it to work with Cycles..

Seeing these limitations I decided to develop a Complex Fresnel/IOR texture for Cycles that will work on GPU, and your welcome to download it here on my studio’s website:
https://cg-lion.com/2018/07/08/free-complex-fresnel-texture-for-blender/

The blend file itself contains a text with some Complex IOR preset values for metals,
And you can get more physical IOR data fromĀ refractiveindex.info

Enjoy! šŸ™‚

BlenderNation
Related:

  1. Fresnel Reflections
  2. Metallic shading in V-Ray Next
  3. Create rich metal in UE4Ā 

 

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

VRayMtl’s new metallic goodness

Software:
3ds max 2019 | V-Ray Next | V-Ray next GPU

In V-Ray Next (4) for 3ds max, a new Metalness parameter has been added to the Reflect parameters of the VRayMtl material.
This allows for easy creation of realistic metal materials and also effectively enables a PBR workflow with V-Ray.

When the Metalness parameter is set to 1.0, the material becomes completely reflective, the Diffuse color controls the general reflection color, and the Reflect color (which should generally be set to white) controls the reflection color at grazing incidence angle.

The IOR parameter still controls how fast will the main reflection color (set by the Diffuse color) blend into the Reflection color, and I don’t know whether some form of complex Fresnel has been implemented or if it’s just a dielectric simple Fresnel blended over a reflective surface.

An excellent article on the new Feature from the Chaos Group blog:
https://www.chaosgroup.com/blog/understanding-metalness

VRay_Next_Metalness

Related:

  1. Fresnel Reflections
  2. Complex Fresnel for Blender & Cycles
  3. Metal material in UE4

 

Arnold for Maya refractive caustics

Software:
Maya 2018 | Arnold 5

An account of the drastic measures that need to be taken in order to ‘persuade’ Arnold for Maya to render refractive caustics.

  1. In the refractive object’s shape attributes,
    Under ‘Arnold’, ‘Opaque’ must remain checked.
    * This is unintuitive but when refractive caustics are calculated there is no need for transparent shadows. the caustics pattern is in fact the light refracting through the object.
  2. The refractive object’s aiStandardSurface shader must have it’s Transmission layer active.
    For a colored refractive object, Transmission Weight should be 1.0,
    A color should be selected, and the density of the color should be controlled with the Depth attribute (higher values make the color less dens).
    In the shader’s advance attributes, check ‘Caustics’.
    In the shader’s Specular layer, set the IOR to match your material.
    * The default of 1.52 is the IOR for glass, and water would be IOR 1.33 for example.
  3. For refractive caustics to be rendered, the light source must be an Arnold Mesh Light,
    And in its shape attributes, under Light AttributesĀ ‘Light Visible’ must be checked.
  4. In many cases, in order for the caustics pattern’s intensity to be correct,
    The ‘Indirect ClampĀ Value’ must be raised in Render Settings > Arnold Renderer, under Clamping.
  5. In some cases the Transmission value under Ray Depth inĀ Render Settings > Arnold Renderer must be increased for the caustics to render properly.
    * Light simulation must be able refract through all the relevant surfaces.
  6. To increase the caustics render quality, the number of Diffuse samples must be raised in Render Settings > Arnold Renderer.
    * This may be unintuitive, but the caustics pattern is actually part of the Diffuse rendering of the surface upon which the caustics are appearing.

That’s it!
Hope you find this useful šŸ™‚

Arnold_Coustics_AArnold_Coustics_BArnold_Coustics_C