How to assign different properties to each side of a doublesided surface
From LightWiki
back to the Tutorial Ideas page
Previous to LightWave v9, if you wanted to make glass with accurate refraction you needed to duplicate your model and flip it to create so-called "air polys". LightWave v9 introduces a new method that keeps geometry to a minimum.
Assigning different colors to each side of a doublesided surface
In the LightWave 9.0 node graph shown below, the FG Color of the Mixer is overlaid on top of the BG Color of the Mixer. So, the green FG Color completely wipes out the red BG Color underneath as long as the Opacity is 100%. If the Opacity is 0%, the green fades out completely, and only the red shines through.
The Polygon Side output of the Spot Node marks the frontside of each doublesided polygon as white/100%/1.0, and the backside of each polygon as black/0%/0.0. I plug this Polygon Side output into the Opacity input, overwriting the internal Opacity of the Mixer node. Now the Opacity of the green FG color will be 100% opaque on the frontside of each polygon, and 0% opaque on the backside of each polygon. This is why the frontside of these double-sided polygons are green and their backsides are red.
This is good for applying different color textures/imagemaps to each side of a double-sided polygon. Plug one color texture/imagemap into the BG Color, and another into the FG Color, and you'll have a double-sided surface with different textures on each side.
Click Here for Hires Version (234KB)
Assigning different indexes of refraction to each side of a doublesided surface
For different Luminosity/Diffuse/Specular/(anything with a "green" input)/Translucency settings on each side of the polygon, consider using the Logic Node (Add Node->Math->Scalar->Logic) instead of the Mixer. Plug the Polygon Side output of the Spot Info into the Logic node's "A" input. Set B to 1.0, and the Operation to "A Equal To B." With this setup, the frontside of the polygon (1.0 in Polygon Side terms) will equal B (which is also 1.0), and the Logic node will use the number in the "If True" setting. The backside, which is 0.0 in Polygon Side terms, will not equal B (which is 1.0), and the Logic node will use the number in the "If False" setting.
With the setup shown in the second node graph, the frontside of each doublesided polygon has an Index of Refraction of 1.3. The backside of each doublesided polygon has an Index of Refraction of 1.0.
Click Here for Hires Version (279KB)
Assigning different textures to each side of a doublesided surface
You can have two completely different images/procedurals on either side of a double-sided surface. Plug the Color outputs of an Image or Procedural node into the color inputs of the Mixer node. Whatever you plug into the Mixer node's BG Color and FG Color will replace the Mixer's internal BG Color and FG Color, just like the way the Spot Info's "Polygon Side" overrides the Mixer's internal Opacity when plugged into the Opacity input.
Click Here for Hires Version (257KB)
Click Here for Hires Version (270KB)
Celshader 10:01, 23 Jul 2006 (EDT)






