3D Cloud shader

Report this File

Th_shadernodes

Views:

34,364

Updated:

Jun 29, 2008

Readership Level:

Advanced

Tags:

Maya Versions:

4.x, 5.x, 6.x, 7.x, 8.x, 2008

Platforms:

windows

Owner:

Language:

English

Hi guys, Maya fluids are amazing but expensive to use, So here is an old trick which will help you to create low cost but very realistic clouds.

click for larger version

Create a sphere (Subdivision Axis = 6, Subdivision height = 4), Duplicate them few times.

Select all spheres and go to Window > Rendering Editors > Rendering Flags, in the flags window select all the shapes in list and turn off double sided. This will make them more transparent, especially at the borders.


Important :
The spheres must have a high degree of overlap or the spheres will be visible. They must NOT be scaled too much along one axis or you will see artifacts.


Create a Lambert shading group, a ramp texture (without texture placement), a cloud texture, a sampler info utility and a reverse utility.




connect cloud1.outColor to lambert.ambientColor,





Connect the ramp1.outColor to the reverse1.input



Connect the reverse1.output to the transparency of the lambert node. We reverse the cloud color, because we want the clouds transparent where they are colored black.






Connect the sampler info facing ratio to the U Coord of the ramp,



Set the type of the ramp to URamp and change the interpolation to exponential up. Map the Cloud to the top tab and configure as indicated. (bottom tab just black).






The Ramp, using the sampler info facing ratio as an Input, will modify the Cloud so that the borders of the spheres will be transparent (black becomes white through the reverse utility node, thus totally transparent). If the U Coord (connected to the Facing Ratio in this example) of a U Type Ramp is 0, the output color will be the bottom color of the ramp, if its 1, the top of the ramp is the output color.

Delete the texture placement of ramp



click for larger version


finally your shading network will look like this



Now apply this shader to spheres we created, and put 1 point light inside the spheres for the scattered light, and few lights outside of these spheres, you can also experiment with light color.

you can download the my scene file here cloud.ma (Maya 2008 version)



click for larger version

Comments

Dashboard_avatar
Mar 12, 2010
Post id: 10481
Report this comment to moderators [SPAM]

Do you have the download of that cloud.ma?

Dashboard_avatar
Jul 07, 2010
Post id: 11726
Report this comment to moderators [SPAM]

What does " Map the Cloud to the top tab" mean? How is that done?

Dashboard_avatar
Jul 18, 2010
Post id: 11850
Report this comment to moderators [SPAM]

that means you select the top color of the ramp then click on the checker icon next to selected color option and apply cloud1 shader to it

View mayonesio's profile
May 13, 2012
Post id: 16313
Report this comment to moderators [SPAM]

very usefull, thank you very much!!!!!

Write a Comment

You must be logged in and have verified your email address to leave a comment. Login or create an account