Arnold for 3ds max – Render objects as volumes (volume shading)

Software:
3ds max 2019 | Arnold 5

In-order for objects in 3ds max to be rendered as volumes with Arnold, the object mesh has to be converted to a volume, and a Standard Volume material assigned to the object:

  1. Add an Arnold Properties modifier to the object.
  2. Under Volume set the Step Size to a value higher than 0.0.
    Untitled-4
  3. Assign a Standard Volume material to the object and set it’s parameters to design the volumetric effect:
    Untitled-2

Examples:

* Note that both Density and Depth control the transparency or ‘thickness’ of the volume. (lower Depth setting creates a thicker volume)
* When Scattering is set to 0.0 the volume will have only a absorption effect

Untitled-1.jpg

Untitled-2.jpg

Untitled-3.jpg

In this example an Arnold Noise map is connected to the Standard Volume‘s Density parameter:
* Note that the Scale values must be set correctly in order to actually get a ‘cloudy’ effect.
* Note that the noise color values are now controlling the Density of the volume.

Untitled-1

Related:
Arnold for 3ds max God Rays

 

Advertisements

Arnold for 3ds max – Volumetric Fog and ‘God Rays’

Software:
3ds max 2019 | Arnold 5

a

Adding a ‘Volume Light’ effect in Arnold for 3ds max is fairly simple:

  1. In the Render Setup windows > Arnold Renderer tab, under Environment, Background & Atmosphere:
  2. Click the Scene Atmosphere material slot, add an Arnold Atmosphere Volume material to it,
    And drag it as an instance to the Material Editor to edit it’s parameters.
    Untitled-3
  3. Set the Density to a higher than 0.0 value, so the material will have an effect.
  4. You’ll probably need to significantly raise the number of samples in the Atmosphere Volume material, and also the number of Volume samples in the light settings in order to get a clean render.

Untitled-1.jpg

Related:
Arnold for 3ds max Volume Shading

V-Ray for 3ds max Wood Floor Material

Software:
3ds max 2019 | V-Ray Next

An example of varnished wood floor material in V-Ray and 3ds max.
The material uses a VRayBlendMtl with 2 connected VRayMtl sub materials to simulate a natural wood base layer coated by a glossy varnish layer.

51026299_2476404122388912_8157106964938096640_o

Explanation of the material node graph:50770279_2476404922388832_853261524695777280_o.jpg

  1. The wood color (Diffuse texture)
  2. The wood black and white detail texture (used to add reflection detail)
  3. The wood bump texture (actually the same as the reflection texture just color corrected to whiten most details except the lines separating the wood planks)
  4. The reflection texture is color corrected to to intensify it prior to it being connected to the base wood layer material:
    Untitled-1
  5. The reflection texture is color corrected to to decrease its intensity prior to it being connected to the varnish coat blend:
    Untitled-1
  6. The base layer natural wood material with the Diffuse, Reflect and Bump textures connected to it:
    Untitled-2.jpg
  7. The varnish coat material with the Bump texture connected to it:
    * Note the Fresnel Reflections is turned off because the Fresnel reflection is calculated by the Falloff map (8)
    Untitled-2.jpg
  8. The Falloff map that defines the amount with which the varnish coat material covers the base wood material,
    A combination of Fresnel reflection intensity/Angle with the pre-processed reflection detail map (5):
    Untitled-3.jpg
  9. The final VRayBlendMtl combining the base wood material with the varnish coat material using the Fresnel Falloff blend map:
    Untitled-1.jpg

 

Related posts:

  1. Fresnel Reflections

Simple Snow Material in VRay for 3ds max

Software:
3ds max 2019 | V-Ray Next

A simple way to create a snow material in V-Ray for 3ds max is to combine a VRayFastSSS2 material with a VRayFlakesMtl using a VRayBlendMtl.
The VRayFastSSS2 creates the soft translucent shading for the snow, and the VRayFlakesMtls adds sparkling highlights.

  • Note that depending on the scene and view scale,
    The VRayFlakesMtls ‘flake glossiness’, ‘flake density’ and ‘flake size’ have to be tweaked to achieve the wanted result.

Untitled-1

Untitled-2

Untitled-3

3ds max Island / Seashore opacity underwater tip

Software:
3ds max 2016

When creating a surface submerged in sea water,
Theoretically, it’s the Volume Absorption or ‘Fog‘ of the water shader that should do cause the surface to disappear under water.
But in many cases that doesn’t work well because we don’t actually model enough extended surface under the water for it to completely disappear without seeing the surfaces geometric edges that spoil the result.

One of the oldest tricks in the book is to use a Gradient Ramp map in the surface’s Opacity channel to make it gradually disappear before the geometry ends.

This can be done in most  3d software and render engines, I’m demonstrating it here using 3ds max and V-Ray:

Island

 

Python for 3ds max – Mesh manipulation

Software:
3ds max 2019

An example of creating a mesh ripple deformation using Python for 3ds max:

mesh_manipulation.gif

Script steps:

  1. Define the effect intensity and a helper point object that will serve as the effect center.
  2. Collapse the object to an Editable-Mesh so its vertices will be accessible by Python.
    Note that the Node‘s Object has to be cast as a TriObject, to access the object’s Mesh data.
  3.  Loop through the Mesh’s vertices, get their world position, and set a new Z position as a sine function of the distance from the effect center.
import math
from MaxPlus import Factory
from MaxPlus import ClassIds
from MaxPlus import INode
from MaxPlus import TriObject
from MaxPlus import Matrix3
from MaxPlus import Point3

# Intensity:
effecr_mult = 1.0

# Effect center:
effector = INode.GetINodeByName('Point001')
effect_pos = effector.GetWorldPosition()

# Prepare object and eccess it's mesh data:
node = INode.GetINodeByName('Teapot001')
new_edit_mesh_mod = Factory.CreateObjectModifier(ClassIds.Edit_Mesh)
node.AddModifier(new_edit_mesh_mod)
node.Collapse(True)
node_tm = node.GetWorldTM()
node_pos = node.GetWorldPosition()
obj = node.GetObject()
triobj = TriObject._CastFrom(obj)
mesh = triobj.GetMesh()

# Process the object's vertices:
for i in range(mesh.GetNumVertices()):
     # Get vertex in world space
     vert_pos = mesh.GetVertex(i)
     vert_world_pos = node_tm.VectorTransform(vert_pos)
     vert_world_pos = vert_world_pos + node_pos
     # Get vertex distance from effect center:
     diff_vec = vert_world_pos - effect_pos 
     diff_vec.Z = 0
     dist = diff_vec.GetLength()
     # Set new vertex position:
     mesh.SetVert(i,vert_pos.X,vert_pos.Y,vert_pos.Z + math.sin(dist)*effecr_mult)

* note that when copying and pasting a script from this example, the indentation may not be pasted correctly.

Related Post:
Python for 3ds max – Animated Mesh

Python for 3ds max – replace selected objects with a merged object

Software:
3ds max 2019

merge

The following Python for 3ds max snippet replaces all selected objects with an object merged from an external 3ds max file.

Notes:

  1. The ‘model_path’ string variable should be set to the path of the 3ds max file containing the replacement model.
  2. This example takes into account that the merged file contains only a single object, otherwise the first of the merged objects will be used.
  3. The script actually replaces the Object node of the selected objects with the Object node of the merged model (creating instances), assigning them the merged material giving them the merged object’s name appended with numbers.
from MaxPlus import FileManager
from MaxPlus import SelectionManager

model_path = r"D:\Google Drive\CG-Lion_Studio\Asset_Library\3D_Models\Furniture\Home\Bar_Stool_A.max"

place_holders = []
for o in SelectionManager.Nodes:
     place_holders.append(o)

FileManager.Merge(model_path,True,True)

model = SelectionManager.GetNode(0)

for i in range(len(place_holders)):
     place_holders[i].SetObject(model.GetObject())
     place_holders[i].SetMaterial(model.GetMaterial())
     place_holders[i].SetName(model.Name + "_" + str(i))

model.Delete()

* note that when copying and pasting a script from this example, the indentation may not be pasted correctly.