Back

Realistic Trees, Step by Step

There have been a lot of videos and articles produced lately that outline the workflow of pushing an InfraWorks® model into VR, specifically 3ds Max® Interactive (previously known as Stingray) so I’m not going to focus on the ins and outs of that. Rather, I’d like to focus on how to bring your InfraWorks trees to life by adding a few nodes in the material’s Shader Graph in 3ds Max Interactive. This workflow eliminates the need to replace the InfraWorks trees with 3ds Max trees.

To begin, we need to remove the opaque, black background of the leaves for each tree and its associated material.

To find the associated material, select the leaves  from one of the trees and in the Explorer panel on the right you’ll see the unit highlight (Figure 1).

Figure 1

From there, click on the Goto resource button below in the Materials section of the Transform panel. The material is then highlighted in the Asset Browser (middle-bottom) and the Asset Preview panel shows the material (Figure 2).

Figure 2

Make sure the material is still selected and then click the Make Unique button in the Parent Material section of the Property Editor on the right-hand side (Figure 3). The button will then change to say Open Shader Graph.

Figure 3

At this point you’ll need to toggle on the Use Color Map Alpha and Use Normal Map options (Figure 4). This will remove the opaque, black background, making the background transparent and giving the leaves a more realistic look.

Figure 4

The next few steps will make the trees look and feel more realistic by making the leaves look fuller as well as translucent. With the material still selected, open the shader graph to display a Dynamo-esque interface (Figure 5).

Figure 5

You’ll need to partially minimize the Shader Graph so you can see both the Standard Base node and the Property Editor at the same time (Figure 6). Select the Standard Base node, and its properties become available for editing. Make the following changes to the node in the Options section of the Property Editor:

  • Material Type: Translucent
  • Face Culling: None (double sided)
  • Shadows Casting: Alpha Clip

Figure 6

At this point our material has been modified so that it is transparent between leaves (we’ve removed the black background), translucent (so it will let some light pass through), and we modified the face culling (to make the leaves look fuller).

We’re now ready to add a few additional flow nodes to the Shader Graph to really bring our trees to life.

To add nodes, simply click the right mouse button (RMB) and select Add and whichever node you need. For our trees we’ll add the following nodes:

RMB → Add → Animation → Vegetation Animation

RMB → Add → Input → Time

RMB → Add → Vertex Input → Color0

RMB → Add → Vertex Input → Position

RMB → Add → Vertex Input → World Normal

Add the values for Speed (0.1), Bend Amplitude/Frequency (0.5, 0.5), and Detail Amplitude/Frequency (0.5, 0.5). See Figure 7.

Figure 7

By using the RGB values of the material, we can achieve a more realistic movement due to the randomness of the RGB values throughout the material.

The Red channel is used to control the stiffness of the leaf edges; the Green channel controls the movement of the individual leaves; the Blue channel controls the overall stiffness of the leaves. The leaves are bent by deforming the edges using the R values of the vertex color and the deformation is controlled by the xy direction of the World Normal vertex. The Blue channel controls the per-leaf bending along the z direction of the World Normal vertex. And each leaf’s movement is varied based on the Green channel.

When combined with the Speed and Bend and Detail Amplitude variables, the leaves begin to look as though a gentle breeze is making them move. The higher the Speed value, the faster they move.

The last step to bringing our trees to life is to connect the Vegetation Animation node to the Position Offset variable of the Standard Base Node and save the material.

Figure 8

Once it recompiles, the asset preview window will show the animated material based on the settings you’ve given it.

If you’ve done everything right and connected the nodes correctly, the final product should look as shown here: https://tinyurl.com/yclzfb8e

For additional information outlining the workflow for pushing an InfraWorks to 3ds Max Interactive, check out the InfraWorks webcast and a couple of Autodesk University classes below.

InfraWorks Webcast – Immerse Yourself in Your Infrastructure Project! Intro to VR

Autodesk University 2017 – CI121477: Driving Austin: An Urban Simulation of Austin, Texas, Using InfraWorks and Stingray

Autodesk University 2016 – DV21503: Visualize Your InfraWorks 360 Design in a Gaming Environment with Stingray.

Appears in these Categories

Back