PDA

View Full Version : 2d fluid...instancing ?


mradfo21
11-22-2009, 08:26 PM
hey guys !

so i'm working on this shot of a 747 engine catching on fire, mid air.

due to the 800 mile an hour wind, a 3d fluid simulation will simply not work for this.

what i have instead done is simulated cloth to get the basic shape of the wind. i am then using realflow gas solver to generate a mesh of fire.

but as an area of R&D, i was reading about some of the fire made for the latest harry potter film, and they had used a 3d simulation to get the shape of fire, and then used many 2d fluid planes to get the actually rendered look (much faster). how would one try and accomplish something similar with maya ?

could i essentially... instance.. 2d fluid containers across a surface ?

HowardM
11-23-2009, 10:28 AM
where did you read that about Potter fire and which shots?
dnegs work was all simmed and rendered fluids, no cards or instances...

Cheesestraws
11-23-2009, 11:18 AM
It kind of sounds like you are talking about the system ILM used, but I don't think it works as you say.

I thought, and I only glanced over the paper quickly and listened to the Nvidia presentation on it in the background, that they were using a particle simulation to define the main movement of the fire. And then used both the multiple 2d fluids to simulate and render on top of that.

mradfo21
11-23-2009, 03:35 PM
howard i was referring to this article on christopher horvath, posted on cgsociety,

"
For the fire in ‘Harry Potter,’ he again stepped outside the existing set of tools to create a unique system that technical directors could use to run fast, art-directable fire simulations at 2K resolution, something unheard of before. He did this by driving a series of high-resolution 2D fluid simulations on data planes with a deep, low-resolution 3D fluid sim; he stacked the data planes one behind the other, all equally spaced, and all facing the camera.

The 3D sim provided the motion; the 2D sims provided the detail. Because the data planes extended in depth from the virtual camera lens, and because each used the same 3D sim for underlying motion, the fire looked as cohesive and fluid as if the crew had run a simulation entirely with a 3D solver, a process that would have taken weeks. Instead, the TDs could look at rendered output in less than an hour. The SIGKid artist had grown up to become the co-author of a SIGGRAPH technical paper."




http://features.cgsociety.org/story_custom.php?story_id=5215&page=2

azshall
11-24-2009, 01:05 AM
howard i was referring to this article on christopher horvath, posted on cgsociety,

"
For the fire in ‘Harry Potter,’ he again stepped outside the existing set of tools to create a unique system that technical directors could use to run fast, art-directable fire simulations at 2K resolution, something unheard of before. He did this by driving a series of high-resolution 2D fluid simulations on data planes with a deep, low-resolution 3D fluid sim; he stacked the data planes one behind the other, all equally spaced, and all facing the camera.

The 3D sim provided the motion; the 2D sims provided the detail. Because the data planes extended in depth from the virtual camera lens, and because each used the same 3D sim for underlying motion, the fire looked as cohesive and fluid as if the crew had run a simulation entirely with a 3D solver, a process that would have taken weeks. Instead, the TDs could look at rendered output in less than an hour. The SIGKid artist had grown up to become the co-author of a SIGGRAPH technical paper."




http://features.cgsociety.org/story_custom.php?story_id=5215&page=2

Hahhaha, the way that article is written is hilarious. "Data planes" and "virtual camera lens" :) ... Makes people who have no clue how CG works think its far crazier.

..ANYHOW..

What if instead of sprites he was using actual poly planes that were constrained to always face the camera in the same way a sprite in Maya does. Looking as to how Maya works with fluids its actually created shaders, there is also a Fluid Texture for 2D sims you may be able to connect as well. Reading the above definitely suggests there is more going on under the hood but its a start, I mean using constrained data planes :)

In a sense it sounds like a video game approach using cards and layering them with a simmed fluid texture.

The next thing is, are you guys physically animating this plane to actually be moving 800mph? If so, why? If its all in CG you can totally fake the feeling of motion and not really make it move at all. Even if you have to move the plane engine forward, 800mph in units is insane.

wizlon
11-24-2009, 11:21 AM
http://us.download.nvidia.com/downloads/GTC%20videos/Day3%20Keynote/500_nv_keynote_091002.mp4

mradfo21
11-25-2009, 06:28 AM
well we of course are not simulating the plane moving 800 mph.

my current method is to use cloth to simulate the motion of fast flickering flames (using an air field and noise) and then take that into real flow to generate gass particles off of the cloth sim. then meshing the result. using a shader i'm creating to then displace the flames further and shade them, i'm hoping to get an interesting result.

But if i could get some 2d fluid simulation going on for added detail i'd loooove it!

HowardM
11-25-2009, 02:07 PM
ahhh thats what youre talking about, nice video. :)

im sure you could do something like that using 2d fluids...

chrispy2001
11-26-2009, 12:28 AM
Looking at the video it seems like a very cool concept. So merely playing around i duplicated about 20 2d fluid setting them apart in increments then animated a fluid emitter running through them all and I did get some cool results with very fast processing times. (probably best for fire because it doesn't need the self-shadowing).

To get the effect that they were able simulate i emitted particles through the 2d fluids that would trigger the density. It worked but i think because i queried every particle's world position in relation to everyone of the 20 fluid boxes the processing times were no faster and maybe even slower than using a 3d container.

I was using a modified version of the script Duncan posted a while ago just with a for loop added to calculate the density required for the 20 2d containers:

vector $voxel;

//get value from added PP float attr "density" which I set to 1 in the creation expression
float $density = nParticleShape1.density;

//get paricle position
$pos = nParticleShape1.worldPosition;

$px = $pos.x;
$py = $pos.y;
$pz = $pos.z;


//get which voxel for each of the 2d fluid planes

for ($i=1;$i<=20;$i++)
{
vector $voxel = `fluidVoxelInfo -voxel $px $py $pz fluidShape"$i"`;

$vX = $voxel.x;
$vY = $voxel.y;
$vZ = $voxel.z;

//get particle velocity
vector $vel = nParticleShape1.velocity;

$velX = $vel.x;
$velY = $vel.y;
$velZ = $vel.z;

//add density
setFluidAttr -at "density" -ad -fv $density -xi $vX -yi $vY -zi $vZ fluidShape"$i";
//add velocity
setFluidAttr -at "velocity" -ad -vv $velX $velY $velZ -xi $vX -yi $vY -zi $vZ fluidShape"$i";
}

It seems like such a cool concept that i was wondering if there were folks out there who were much more capable mel scripters who could think of a way to speed the processing times up?

mradfo21
11-26-2009, 06:20 PM
interesting progress man !

any chance someone could show me where to snag that paper about implementing the GPU solution ?

CGTalk Moderation
11-26-2009, 06:20 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.