A Fast and Simple Planetary Atmosphere

By -
Duration
4 mins
Last modification: 16 Sep, 2017

I'm not sure what Pluto's tenuous atmosphere looks like, but to mark the occasion of its fall from planethood to planetoid here is a mini tutorial on creating an atmosphere using Maya fluids. This tutorial uses fluids not for dynamic behavior, but rather its volume rendering. The fluid node has the most accurate volume render integration of any volume shading in Maya. However if one doesn't have Maya unlimited volume primitives can be used. 1. Create a sphere for the planet and a directional or point light for the sun. Note that one should use very high tessellation on the planet, because the volume method used here is very sensitive to differences in depth. (For a nurbs sphere enable advanced tessellation and set the number U+V to around 18) 2. Create a "Volume Primitives: Sphere" and scale it up to the desired atmosphere boundary. At this point it will render a little like an atmosphere, although it won't shadow on the dark side of the sphere. First let's try using a sphereFog approach. By default the volume sphere shape is assigned a sphereFog shader. 3. On this shader edit the edgeDropoff so that the density falls off from the surface of the planet, rather than the default which is less sharp. It is useful to do this using IPR in the render view window for fast feedback. Set the density to the desired opacity. Also edit the color and transparency, which should usually be in the bluish range. Some incandescence can also help... or use very bright colors (V > 1 in the color editor). 4. Create the shadowing of the fog by making the colorRampInput = Y gradient, editing the color ramp to have a transition to black on one half of the ramp, then rotating the volume sphere such that the shadow faces away from your sun. One could optionally enable "illuminated" on the sphereFog node and use real shadows, but it would be slower and take a bit of work to get a smooth transition (shadow maps with large filtersize or soft raytraced shadows and a high volume samples override on the sphereShape node) 5. If desired one can enable illuminated and play with light scatter, so that the atmosphere is brighter when backlit to create brighter rims on the dark side. Now let's try using fluids. 3. Assign a fluid shader to the volume sphere shape using the lighting/shading assign new material menu. It will now use a fluid node for a shader instead of the sphereFog shader. The volume bounds of the sphere will be more efficient in this case than rendering the usual fluid box container. 4. On the fluid make the following settings: size = 2,2,2 ( this is required for the sphere dropoff to fit the sphere shape) density = off velocity = 0ff opacityInput = constant dropoffShape = Sphere 5. Note that if the scale of the fluid node matches that of the sphere then the shaded display on the fluid box in the viewports will roughly match the render of the volume sphere. One could parent it to the volume sphere if desired.( after doing this check that the fluid scale is 1,1,1) The fluid resolution can be increased for better previewing of the density in the viewports. 6. Adjust the edge dropoff so that it starts from the planet surface. 7. Create the shadow setting the colorInput to YGradient and transitioning from blue to black halfway across the color ramp. Rotate the sphere shape such that the shadow faces away from the sun. The value of the blue color entry should be very bright, around 4 (brighter than white). Adjust the transparency for the best effect. 8. Lower the fluid quality setting just above the point where dots will appear in the render. This will speed up render times. Note that if one wants to use real shadowing the fluid version will resolve the shadows much better than the sphereFog shader would. Also one could texture the color and opacity with the high quality built in noise on the fluid.

editPfxOnPolyPath.mel parentToSurface.mel nClothBook.ma dynamicFollow.mel cameraFollow.mel cameraFollowScene.ma lightOcclusion.ma fireball.ma itsSlinky.ma TunShu_BindClothSkin.zip confettiFall.mb simpleConfetti.ma roundConfetti.ma partyStreamers.ma waterTank.ma nClothWater2.ma nClothWater.ma waterPlayground.ma sunsetLeaf.zip oakBigLeaf.mel + oakBigLeaf.mel.icon ribbonTwist.ma bagOfMarbles.ma toonOcean.ma buckySphere.ma thickSlab.ma phoneChord.ma forestRoad.ma bark.iff basicLeafHC.jpg birchBark.gif grassRoad.jpg leafSerrate.tif WhiteBark.tif sideleaf.rgb atmosphere.ma
Posted By
Published In
Tags
  • Tutorials
11 Comments
To post a comment please login or register
| 5 years ago
I should also add that i am unable to reduce my fluid resolution below 3.
Edited by 7yEdpsOM 5 years ago
| 5 years ago
Hi, i am using Maya 2016 with Mental Ray and the volume primitive doesn't show up in renders. I have a very large scene (6,700 meters) with an earth, clouds and a direction light.
Edited by 7yEdpsOM 5 years ago
| 9 years ago
I just went through the tutorial and everything works OK for me in 2012. The file atmosphere.ma above has the described setup and still works fine loading into 2012. Are there any steps you are uncertain of?
| 9 years ago
Hi Duncan, is very hard to follow the tutorial cause is very old and now, with Maya 2012 is almost impossible to make what you suggest... can you make a simple UPDATE ti reply old command and procedure ? Could be very helpful! Many thanks!
| 9 years ago
Turn on visible in Refactions on the volumeSphere shape. It is off by default. ( same with the fluid node)
| 9 years ago
Hey Duncan, there is anyway to make the volume primitive visible trough refractions ? i already set the option box at the volume sphere but still no results.. maybe a limition of Mr? i appreciate any help.
| 13 years ago
Hi Duncan, I know this is an old post, but I'm running into a small problem i'm hoping you can help with. I don't have Unlimited, so I tried using the Volume Primitives Sphere instead of the fluids. It looks fantastic when I render a still, but there's a very noticeable flicker during an animation. Is there a setting I can tweak in the Volume Sphere to prevent this from happening? thanks in advance, love your posts!
| 13 years ago
Paint effects is a post process and currently does not integrate well with volume effects like fluids, particles or volume fog( the environment fog is an exception and has special code for pfx, however) You probably need to either convert the pfx to poly or composite the atmosphere effect in post.
| 14 years ago
Duncan- Tried both methods and could not integrate them in an animation. Both produce a black sphere/circle of emptiness around the planet when used with paintfx... so far, rendering a separate layer and adding the glow in post seems the only solution. Any ideas?
| 14 years ago
what fun....I spent 2hrs playing with all the settings...then I made a backgrd for a space poster prop in a kid's room scene I'm doing.
| 14 years ago
Hi Duncan, Kepp this up. Wow already 2 tutorials. This is great.