Tuesday 21 February 2012

Fracturing -A fringe Title Test

Hi,
   This is a shot which I did to practice a bit more with PFlow in Autodesk 3Ds Max:




A brief  Shot Description:


 This shot which I decided to experiment with is inspired from one of my favourite and famous american TV show named-"Fringe".

 A small link to the original shot is mentioned below-
                                                 
     http://www.youtube.com/watch?v=fM1bzVVrgNk


Since, being a series involving Investigations around mysteries, all these Title shots encompass every small detail which a typical Science-Fiction show would require. In my opinion, this shot which involves fracturing of a text "FRINGE"  has some indirect connotations about the show itself which are noted down by me:

1. Integration of Debris in to a single element :- points towards  an approach where conclusion is made after going through every small relevant detail.

2.Addition of smoke, Fingerprints and spotlight in the background :- connotes to the mystery being looked closely , especially related to some crime.

3 Lighting and Position of the Text :- emphasize on the "FRINGE" text which is being the centre of attraction which is  supported by the compositional value of the Text itself.

OHK! well there is something about the saturated Blue colour giving it a cold look and besides that the camera movement also plays an important role, any ways here are details about my procedure:-

Shot Requirements and Tools used-


* Particle-flow in Autodesk 3Ds  Max for Fracture Simulation for Particles.
*A fracturing script by "Martin Breidt" from ScriptSpot a link is mentioned below:
http://www.scriptspot.com/3ds-max/scripts/mbfracture

*A Particle Flow script to assign geometry shapes to the particles by Bobo- I will be adding a snapshot of the script later and a script written by me which triggers fracturing from right to left.

*A basic Spotlight rig to lit the scene and Foundary Nuke to composite the entire shot

A  Description:




Simulation


Pflow Set-up:-
                 To start with I used Martin Briedt  fracturing script which has quite nice functions to detect whether the geometry to be fractured has any open faces or isolated vertices which can cause issues while fracturing.
Besides this the script allows one to have a more control over the subdivision of polygons causing smooth faces of the fractured objects.


An event flow window's snapshot:



To give a specific motion to fractured elements instead of using Reactor/Phsyx I decided to go with the Pflow. So, initially I took Bobo's script to assign these fractured geometric shapes to my particles. The script has a check condition where the assignment of shapes, indexes and age of the particles are set before the frame 0. A small snapshot of the script:-





Next Step was to  trigger fracture motion from right to left for this I wrote a small script  which checks the number of particles inside an event and send them to the next event where the Forces take over the control of the entire motion. Since being new to scripting in the Pflow initially, I made a mistake of not using indexing to check the particle inside an event which resulted in computer crashes due to infinite loop :(


Self_Analysis:


"Well when I realized what was going on with the scene my computer had crashed numerous of occasions, and I figured out that 3Ds Max implicitly passes an integer with value 1 to the particles which are checked for some condition inside the script. So, when a particle with index 1 is passed to the next event Max will still look for the particle with index 1 in the same event and if this is executed inside a loop it will result in a CRASH  :-x"



Here is a small snapshot of my script:



Finally in the Fracture simulation I used a Particle Float number to control the influence of forces  on the particles. This requires a two step process, in which first of all the Force operator is required to be told about the use of the script float value this is known as Script wiring and can be initialized as shown in the snapshot-

















In the script on has to flag on the use of the  "ParticleFloat channel",
here is a small snapshot where I am controlling the influence of forces like gravity on the particles depending on their respective sizes.




For more information on the script wiring and other stuff please check the link below:
 http://docs.autodesk.com/3DSMAX/14/ENU/MAXScript%20Help%202012/





A Simulation PlayBlast:-






A Rough Comp Test:






The smoke is prepared by using Pflow driven FumeFx simulation a small glimpse of the animation is
shown below:

Test sim:

Final sim:














The simulation is rendered with Vray, with a very basic material having a cellular bump on it.







Compositing:

             The Background with fingerprints and dust marks in the original  shot, is moving along with the camera. Instead of rendering it out I used a 2d solution where the background is fixed at it's position however scratches and finger prints are moving on top of the 2D background.

The spotlight effect is done by using a roto paint mask which is used to over blow the Background image and is animated from left to right.

A nuke tree for compositing:-






To conclude:
  I had a hard time while lighting these fractured Objects due to the sliced faces  which under normal light set-up were giving over exposed regions with value greater than 1.0, so I used the event based lighting by adding events in to specific spotlights and excluding rest.

I still feel that I should have done a bit better with the colour,lights and the end transition where it stops suddenly.



















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.