(part 1)

Part 1: This little walkthrough demonstrates an easy way of creating a basic nebula effect.

In Part 2 we will fine tune it using different layers, compiling additive and substractive
transparencies, volumetric tricks and add a heart to it.

First, I want to thank Eric Chadwick for his amazing help back then…
Second, you can download the scene file and all the texture maps here: NEBULA_ZIP


This example uses a displacement map, a map that will subdivide our basic geometry, in other
words add more UV lines. Then this map according to the normals of the given geometry will
deform it in the Y axis (up)or according to its normals.


Mental ray computes vertices and deformations during the rendering process, we will
be able to control the amount of tesselletion of the surface (step), but within our workflow
our geometry will stay really light. Unlike a displacement mesh tool like a weight map.

(weight map)

The amount brightness of the map will change the shape.
A bright pixel will push the corresponding vertice outward along its normals and vice versa.
(intensity of the image channels…) Other types of displacement exists such as vector or scalar based one.


In this example a conversion of our RGB value into scalar (any value between 0 and 1) will be done.

Here we go : 

-           Create a grid surface (nurbs) : UVsub / 12&12 and UVlenght / 15&15

-           Delete the default light

-           Set your ambient lighting (Show/Properties : Explorer) to 0.05 for luma

-           Create an infinite light (The sun fires parrallel rays), leave the intensity and colors
values as default but enable shadows casting (Umbra on) with an intensity of 0.3

-           Rotate the infinite light –90 on X and translate it up in Y



Now select your grid, give it a texture support (Property>Texture_support>Create texture cont..)
Choose a planar XZ (grid’s resolution plane) and name it.


Make sure that the grid is still selected, in the render tree, double click on the Phong node
Adjust :          

ambient : Luma / 0.1,
specular : Luma / 0.3           
specDecay : 40
translucency : off                 
incandescense : off


The maps or shaders used here will drive our spec, amb, diffu, transparency and displacement


A usefull function in XSI is clip maps: an instance of a pic that can be copied and tweaked many
times without having to reload it into ram, the render engine only looks at
the master copy and
applys only the tweaking.

The master is called a Source and the slave a Clip.

 Draging and dropping a PSD file from the XSI Browser into any viewports will create a Source
Within the explorer (Switch Scene mode to Image) you will find a Source folder, from there
drag and drop your Source pic into the Clip folder : an instance has been created, (a reference clip.)

Note also that now you can drag and drop again your clips from the explorer to the render
tree or select them within the render tree’s clip pull down menu

We can generate any types of texture (transparency, gradient, noisy…) with shaders, but
in some cases using a 2d PSD map will decrease our rendering time and in some cases be
less confusing.

Let s have a look at the PSD used :


-  GalaxyColor_psd : our opaque and diffuse map (main color)
Its alpha will define the opacity of the nebula (transparency map)
-  GalaxyDsp_psd : our displacement map (geometry shape) 
-  NebulaColor_psd : our second diffuse map (that will be blend as a second layer on top of our first one)

At this point, dynamic links will occur in the Render Tree.

Tip : you can create a custom tool bar, and drag and drop into it any shader nodes that you
may use a lot ( Ex : scalar2color ). And from there drag and drop them to the tree.

Time to bring those three maps as clip images (in the Render Tree).
Connect them to the texture support node (called image, image1,…)

To do that operation you can use Nodes/Texture/images

Then unlink the nolcon.pic and link instead the desired clip (open the Txt supp node and make sure
that the one you have created is the one selected).     


Link GalaxyDsp image Txt Supp to a Color2Scalar node (in between them you can link an Intensity
node for adjusting the bump effect).


Then link the Color2Scalar node to the displacement input of your main Material node
(once again in between those to you can add a ChangeRate node for more tweaking).

 Don’t be scared... a final image of the entire tree is at the end of this tutorial.

Preview now : the grid is deformed according to that map.


Connect your GalaxyColor clip link it to a Txt Supp then to a Color2Alpha node (this one converts
the color of the pic to an alpha channel).
That is why sometimes you will have to use an Invert node after it to get the right result.


Or you may use a node called PickChannel to isolate the built-in alpha (but this one requires
a Scalar2Color node after it).


Let s come back to our Color2Alpha node, connect it to the transparency of your Phong node.
You have just created a transparency map.


Preview again


We want to give a little color to that nebula :


Get a Mix_8Color node (this one is a mixer)
an Incidence node (usually used for transparency purposes), it allows to shades the edges
of a surface based on the angle of the surface relative to the camera.
This one we can tweak to look at the amount of light reflected from an object toward the camera
angle, in this case called a Fresnel effect.

Link this incidence node (set : camera direction / exp : 0.2 ) to another Scalar2Color node, then
link this last one to the Base_Color of your Mix_8Color node.


Now link the Txt Supp of your GalaxyColor clip to its Color1 input.


Add another layer to that Mixer node, connect the NebulaColor clip with a Txt Supp and link that
last one to the color2 input of your mixer.


Open the Mixer node make sure that the weight value of Layer1 (color1) is at  L : 0.5
This equals to an average blend between the incidence value and your GalaxyColor clip.
(Mode should be set to : Mix, and you may take advantage of the alpha channel from that
clip by turning on the Multiply Weight By Alpha box.


Your second layer, Color2 or if you prefer the NebulaColor clip should have the same weight value
but the mixing mode can be changed to HardLight (for better ressult).


Finally you can connect the output of your Mixer to the diffuse input of your Phong node
As a result, now your diffuse settings are driven by that Mixer and its multiple inputs….

A cool effect will be to link the Scalar2Color node of your incidence also to the ambient input
of your Phong node.


Here is what that rendertree looks like.…

As you can see I can also connect a Transparency node in between my Phong and Surface nodes.


Also I can link a Color_Correction node (really… powerfull) between my Mixer and Phong


Also you should use Incidence and Thickness nodes connected to some of your Phong‘s input,
if you are using any refraction tricks on some of your transparencies…


To obtain more detail in your displaced surface : select your grid then :
Property>Geometry Approximation>Displacement Tab>Parametric : Try a step value of 1, 2 or 3 and see…


Also try connecting an Incidence (using the X-up value) to the spec of your Phong
(this will wash out your diffuse colors on the hot spot parts)

That s it for now, see you when I'm done with Part II………


That s it for now, see you when I m done with Part II…
Written by Thomas Groppi,
Avid 301 Instructor CDIS
Center for Digital Imaging and Sound XSI ATC, Vancouver B.C (Canada)