Tuesday, 7 February 2012

Dry Ice Aka Crawling some effect

Hi,

Last week I was wondering whether one can use Pflow<->FumeFx<->Krakatoa for organic effects like smoke. Although FumeFx provides rendering and simulation of most of the effects however for a specific need one can not underestimate the potential of scripting in PFlow and faster rendering capabilities of krakatoa.

I have a machine with 6Gb of RAM and i7 950 processor, well while rendering the simulation -of 97 million particles- the simulation, laughed at my system configuration. Okay so here is my method to create a crawling smoke like effect.

Pflow:-
  In order to create this effect I needed a system where particles can be generated from a source in such a way so that they spread out with some varying speed and posses random position along their path.

Gravity force is used to pull down the generated particles in the first event and once  particles were generated a deflector is used to collide my particles against with. The collided particles were tested and were send to the next event where I'd wind taking over the motion of the particles by applying turbulence as an effect. There are three wind fields with spherical shapes in order to spread the effect of the wind in a spherical gradient.

In order to limit particles along the surface a script test was used to delete any particle that moves above a certain height. Particles with high speed are passed on to the next event where a vortex is applied to give a motion to the particles at high speed. Once again any particles that was moving above a certain height along Z-axis is deleted.

Pflow_Hierarchy:




An expression to avoid particles moving up:









Fume-FX:-
All of the parameters inside FumeFx were configured in such a way so that it follows the basic sim from Pflow. I started with turning down Gravity to 0.1 and Smoke Buoyancy to -10. The value of turbulence was  kept relatively low(0.5), and velocity damping came handy in controlling the speed of the simulation which was set to 0.01. The scale of the turbulence was set to 5.0 and the phase of the turbulence was changing after every 20 frames. This was responsible for the swirling smoke type behaviour, lastly the simulation was done with Spacing equal to 1.0 and the resolution of he entire simulation was:450x450x200.
The final cached simulation was somewhere around 112GB which was too much on a 500 Gb disk which i have, but fortunately I was able to manage that.

A small glimpse of the fume sim:



Krakatoa PrtFumeFx Emitter: 
ThinkBox Krakatoa allows a voxel based simulation rendering from a simulation engine like FumeFx by providing a PrtFumeFx emitter. This emitter can be used to further subdivide fumeFx voxel based particles in to smaller subgroups however in my case since the simulation was having over half a million particles it was impossible for me to do so. Besides this, one can partition particles by using krakatoa to increase particle numbers. PrtFumeFx object can replace Voxels retrieved from the FumeFx into particles besides this one can use the "Align FumeFx source with the PrtFumeFx emitter which makes particles moves in the same manner as they were simulated in FumFx.

Particles were shaded by using Krakatoa Channel Manager by normalizing velocities of particles.
A small video clip of the render which this time I rendered at a very low resolution because of the limited resources can be seen below:








More on partitioning and PrtFumeFX can be found here:


About PrtFumeFx emittter:
http://www.thinkboxsoftware.com/krak-prt-fumefx/

About Rendering with FumeFx simulation with PRTFumeFx emitter:
http://www.thinkboxsoftware.com/krak-fumefx-direct-rendering/

Last but not the least I realised that my machine(6Gb RAM) cannot handle anything above 90 million particles.
So here is what I concluded out of this simulation:
While rendering a simulation containing 94,030,240 million particles, with a partitioned particle file size of over 1.8Gb( for a frame), krakatoa does a fairly good job and renders it out in 4:08 seconds which however demands a Ram of 5.11 Gb.
Krakatoa inside  Autodesk 3Ds Max was not able to reallocate the memory to render more particles due to some reason which is still not clear to me. I consider it because of the 6Gb limited Ram capacity, which isn't enough to swap the cached files containing huge amount of paticles.




 








1 comment:

  1. Very nice post. We are the manufacturer of fluid mechanics lab equipment /instrument supplier exporter provider wholesaler dealer india.

    ReplyDelete