PDA

View Full Version : convert noise to density


ndeboar
11-30-2007, 12:44 AM
Hey,

I'm whiping up some clouds using fluids, and then making some god rays pass through (i know, the client wants it).

I want to convert the perlin noise texture to density so i can dynmaicly control them (based on the default clouds scene). Is there any way of doing that?

Cheers,

Nick

Als
11-30-2007, 02:19 AM
Maybe this:

http://www.youtube.com/watch?v=-ak6ncsTFTw


Als

apoc519
11-30-2007, 02:39 AM
someone else asked a similar question and i came up with this. Maybe it will suit you too

Maya 8.5 scene (http://www.pauljewell.com/cgtalk/cloudSwirl.mb)

Duncan
11-30-2007, 05:11 PM
There is a mel command "bakeFluidShading"(shipped with maya) that samples a fluid into a second fluid, where the second fluid has no lighting and is simply a grid of density and color. You could adapt that script to do what you want, although one needs a VERY high resolution fluid to capture the high fequency texture detail.

Another technique is to make the coordinate method "dynamic grid" and push the uvw coordinates around the grid( the same way density is pushed). (velocity also needs to be set to dynamic grid and the coordinate speed should be generally close to 1)

To do god rays you might consider editing the leftmost opacity indice such that its value is slightly non-zero. This will add some opacity everywhere in the fluid container, like a little fog. Where the light is shadowed by denser parts of the fluid it will cast shadows into this fog( similar to the way real god-rays work).

If you want the god rays to extend below the cloud layer, however, it might be inefficient to have dense parts only in the top of your fluid. Another method is to create a second fluid with no self shadowing, but receiving shadows from other fluids. This fluid could be a simple box with no grids and just a slight base level of opacity. The sun light would have to have raytraced shadows enabled for this to work. You can exaggerate the god rays by making the color value for the fluid greater than 1.0 ( this allows the fluid to be more transparent ).

Duncan

Als
12-04-2007, 11:00 PM
Trying to answer first part of the question, I've copied the first cloud fluid to another one, switch that one to be surface instead of volume, and use that as a shadow casting on, stoping the rays (without raytracing with depth shadows) while in other parts not being visible in rendering, maybe that's usable for you. It works for still, but haven't tried it moving yet...


Als

ranxx
12-11-2007, 03:50 PM
hey Apoc, I really like your setup, but I don't understand it. Could you explain how you setup this scene please (and more specifically how you are emitting the noise pattern into the density with the plane).

thanks

-ranxx

someone else asked a similar question and i came up with this. Maybe it will suit you too

Maya 8.5 scene (http://www.pauljewell.com/cgtalk/cloudSwirl.mb)

CGTalk Moderation
12-11-2007, 03:50 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.