A tapa of geometry Smoke

Creating quality CG cigarette smoke is not easy task, there are very different approaches ,some have their strength in the look, other in the dynamics,others in the control, other speed...but i still dont think there is a perfect one that fills them all.

Particles ,Fluids,Geometry..

I will write a bit about a setup i did not long ago,its a bit different, and more focused in the shapes of the smoke,.
I had to build some numbers with e very ethereal smokey look to them, they had to evolve, but they should not look ghosty!. I knew that the look of them was going to be an issue so I started playing with different setups that would let me "sculpt" shapes while keeping the look .
Not long before i had watch a video of how to fake occlusion in realtime within the viewport in maya,it was quite interesting and became the base for what i had in mind: a density shader.


It uses sampler info(UV plugged) to a point on surface info node a cross product between the tangents a distance node for the value and a range that drives the transparency to a ramp.

This density shader has great advantages,it changes its transparency depending how far neighbors CVs are from each others , and best of all: its pretty much realtime, that is, if i pull away CVs in the geometry in the viewport i could see how it dissolves at the same time if i pull them closer the area becomes denser, so this meant i could sculpt the shape straight in the viewport.Here is a quick image from the viewport of a test:

Unfortunately it has a its disadvantages also, No mentalray (surprise???) and at the moment,only works with Nurbs geometry....

After having fun with soft bodies and my density smoke geometry, i decided to make a little rig with some stripes , several curves and some skeletons, the curves would drive the rig and this the striped geometry, to make things easier while sculpting i assigned colors for each curves and also locked the length of them using maya hair.I started building shapes,by pulling the curves CVs and by converting them to soft bodies I add the motion.

A Tapa of Tone Mapping with Footage

Tone mapped renders and Footage are usually treated separate and comped in Post , this setup is not the best option when we need to tweak our 3d elements to sit or blend with that footage.

From the moment we add the tone mapper in the lens shader slot of our camera, the background footage is treated and filtered as the rest of the objects in our scene, obviously we don’t want this to happen.
Though We have the option to compensate the effect of the tone mapper by tweaking the Image Plane node ,its not always an easy task.
There is a way around all this in Maya, it is not perfect solution, but works fine, it implies the use of render layers .We will make the same effect as a post-comp inside the render view in Maya, so every time we tweak the lighting or shading of our 3D objects the background wont be changed. It also works with constant or Surface shaded objects.
I will make a very simple example here

Lets have this image as our background:


Now lets add our 3d elements. Lets assume we want 3 Surface Shader spheres keep their colour values all the time as pure 100% R ,G or B, if we start lighting our character , converting the internal 32 bit render to the 8 bit framebuffer using a tone mapper like the mia_exposure_photographic, we can see how the colours of the spheres and background are affected:

Sin título
(Notice the dull sky and the wrong values of the spheres compared to the Hypershade swatches)
Lets make a correct setup:
We create 2 Render layers. First one with all the scene objects and a second one with only the objects we don’t want to be affected by the tone mapper (in this case the 3 RGB spheres). If we render the second layer alone we should have something like this:


Now we are going to make use of the Layer Override in Maya. Lets go to the camera and in the MentalRay create a Layer override in the lens shader slot. Now we can break the connection of this shader with the camera for this layer. If we render we have the footage and spheres untouched by the tone mapper, as we want:


Now, all we need to do is go to the Render layer with all the objects in it, go to the image plane and create another override in the display mode, make now the image plane not visible. Lastly and this only needs to be done if we are using constant or surface shader 3d objects (in our case the three spheres) override their shaders matte opacity to black.


From here we can start tweaking our light, shaders and tone mapper, the original footage and surface shaders of the spheres wont change.Once we finish, just render the main Render layer and make the final comp in Post.
As I pointed at the beginning its not perfect, mainly because the comp between layers is done un-premultiplied, still its easy to set up and most important, it lets us work with all the elements the way we want inside the Render view in Maya.

Finally, yes, this test example could have been easily done using traditional lighting techniques with no need of tone mapping.Its just an example.

Site Up

Ok this seems to be working, will update soon....