View Full Version : Texturing Fluids
I'm new to Maya, at least the fluid effects part since I'm more into technical presentations of mechanical stuff and products, and I would very much appreciate some help on this.
I'm using a 2D fluid with a height map and I'm trying to texture the fluid. I just can't figure out exactly where to apply the texture/shader to the fluid.
I've found the options to make the texture to be static or move with the fluid etc so I figure there must be a way(with Maya there always seems to be way). And I DO read the manual but I guess I just can't interpret this part. There are plenty of references to texture the fluid but I can't seem to find the proper one.
Again, I would greatly appreciate any help on this.
07-23-2003, 06:51 PM
In the texture section of the fluid, turn on opacity mapping and use the built in texture attributes. That is if you want to map the height. If you want to map the color use the color mapping. If you want to use an image, you could load the image into the fluid using the paintFluids import tool.
Thanks for the fast answer,
As you suggest I have already mapped the height using the paintfluids import tool so there is not a problem. The effect I'm after here is similar to the effect you showed in the 'understandingt fluideffects' DVD, with the maya logo formimg and dissapearing in a red carpetlike fluid.
So the one thing I have yet to do in order to accomplish that is to assign (lets say a velvet-) shader onto the actual surface of the fluid. Probably you didn't use a shader but rather a colour....
The trickiest part so far was to make a 'flat' top on the top of the fluid as if it was smoke reaching an 'invisible' ceiling but i managed to pull that one of by adjusting the incandescencelevels (i think that was it at least).
If you want to map the color use the color mapping
I will try this when I get to my office but does this still apply for a shader? Is it possible to assign a shader to the surface?
On the subject of importing bitmaps to the hieghtfield of the fluid, I'm having problem whith the coarsness of my fluid. The bitmap is simple, greyscale and very smoothed(blur in ps) but when applied to the surface the surface becomes coarse. I have increased the resolution and am also using smooth shading but the coarseness prevails.
Come to think of it perhaps one could lower gravity, turn off turbulence and let the fluid smooth itself out for a short period and then start from there. This I'll have to try. Any other suggestions?
07-23-2003, 08:36 PM
In terms of smoothness, make sure to use the smooth render interpolation( this will not show in the hardware display ).
The courseness may also stem from the rising of imported images to fit the fluid grid size. I think this resizing is simple integer scaling, not done with filtering, so if your fluid resolution is different from your image it can cause aliasing. Running the simulation one timestep with a bit of diffusion and then setting initial state, as you suggested, might help. Or you could resize the image in photoshop to the same res as your fluid before importing.
You can't apply a shading network shader to the fluid, but rather need to use the build in surface settings on the fluid.
A different workflow would be to use a fluidTexture2D as a displacement texture on a plane(note: you do not want to have heightfield on if doing this ). If doing this you would be free to texture as desired.
You can get a flat top pretty easily in the fluid( the problem is more avoiding it). Grid densities in the range 0-1 map into the opacity graph(you can increase the effective density using the density scale to see this effect). Density values beyond 1 get the righthand side value of the graph, so if you have density values beyond one in your fluid you will get flat tops. To better render these, you should make the righthand value of the opacity at least a little less than 1.0 to avoid sampling problems along the fluid boundary.
Thanks alot, this really helps me out. The fluidTexture2D as a displacementmap would work wonders, it just never occured to me.
As for the smoothness I've tried with both smooth interpolation and with the same resolution on bitmap and fluidcontainer with no better result. I will work some more on this though.
01-15-2006, 06:00 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.