"Fluid angle"


#1

I am using a maya fluid container rendering with the hard surface renderer. I created a mel script to emit fluids based on the volume filled by a nurbs surface. Here is the problem, when the initial state is set by the script a staircasing effect is created between the voxels. At first I figured this was because each voxel was being emitted with a hard 1.0 density value. So I added a sampling attribute to the script, but this did not fix the problem. When the simulation is played out, it seems the simulator internally fixes the problem and smooths out the results. I need to find a way to set the fluid “angle” as it were to smooth out the results myself on the first frame, to fit the nurbs model better. As far as I can see there is no mel function to do this, but maybe I missed something. Perhaps a C++ solution is out there?

-Zac


#2

Yeah that’s one of the problems with fluids… you have really only one option. You can turn your resolution way up. that sucks, I know, esp with hard surface.

You cannot get rid of the stair step on the first frame, it the nature of the beast (w/o turning up the rez). Think of the fluid as a picture, with out good anti-aliasing. if you have a picture with a resolution of 40 x40 pixels then you will have a rough edge on a circle in that picture.

You can, however, get rid of the stair step on the second frame and on by caching the fluid at a high over sampling but that will still give your first frame the stair step.

Is there another way to get the look you want? comp trick or something. I don’t think it’s your programming. If you convert your fluids to polys you can see how it’s literally building the surface based on the voxels.

– Dave


#3

Thanks for the reply destruct007. I eventually got the effect I wanted by emitting into a high-res container, upping the threshold, running for a few frames upping the oversampling like you said with diffusion on and no other dynamic parameters set. Then cut down the resolution and repeat until it looks smooth.

However, I’m still looking for a coding solution if anyone knows of one. (Is Duncan around?)

-Zac


#4

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.