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.




 








Wednesday, 18 January 2012

Smoke Tail


Smoke Tail:


A smoke Tail Test combining Krakatoa and FumeFx. There are about 3 million particles in this small shot and this is straight out of the 3DsMax.
For colour, I 'd Normalized Velocity of the particles while using a gradient map using the Explicit mapping channel mode.


Tuesday, 3 January 2012

Walkman Morphing

Hi Everyone,

This animation is an experiment to look in to the possibilities of "Vertex Colour Shading" feature provided by ThinkboX Frost and KCM. I have used Real Flow to prepare a simulation of a paint splash which gets transformed in to a Sony's Walkman logo, the simulation has some issues with the particle drops bursting up in  the space.
Anyway, following section will explain my process of creating this animation:


Real Flow Simulation:
I made use of Real Flow Container to subdivide my particles inside Real-flow  which made me break down the flow and this allowed me to have more control over my particles throughout the scene. This was achieved by making use of Filters inside the Real Flow. Following are the parameters for the fluid:


Resolution:-3.0
Density:-5000.0 (This is an important parameter as I used this to control Vertex shading of my Fluid)
Viscosity:-7.0  (Increasing this  parameter above or equal to 10 caused inter-particle collisions leading to              abnormal fluid behaviour)
Surface Tension:-50.0

The SIM:





(Hmm the simulation is missing the big spherical dot which is done separately and then loaded into the scene by using Krakatoa PRT Loader.)
The simulation is done by using Magic Daemon in Real Flow.

Using  Frost to Mesh Particles:


Step 1-Loading Real Flow bin files into Autodesk 3DS Max2012 by using Krakatoa's Prt Loader.





















Step 2-Using KCM for creating a Mapping channel:


I used the Magma Flow editor to normalize the density of my particles, so that the values lies in the range of 0 to 1. This was used as a value to colour out mesh later while shading the mesh created in Frost.
















Step 3- Using Frost to create a Mesh:


To mesh the particles was a bit difficult job as the animation itself contains fluid moving up against the gravity. As I wanted the mesh to have a paint splash effect, I used following settings in order to achieve the results, one can take this further by tweaking parameters mentioned below:

Meshing: Zhu/Bridson

Zhu/Bridson parameters:
Blend Radius:4.5


Particle Size: 0.2


Meshing Quality:
set to Relative to Max. Radius with values:
Render:10.0    (tranforms the mesh at rendering time making it more smoother by subdivision)
Viewport:1.0

A good mesh is always a best values given by Zhu/Bridson's Blend Radius and Particle Size.

Here is the mesh result:

















Step 4:- Shader Creation
I made use of the Mapping Channel 2 created in Magma Flow to shade the mesh. The material is a common Vray Material with Gradient map applied to its Diffuse and Refraction parameters, both of which are using Mapping Channel 2. The mapping channel contains values ranging from 0 to 1 as retrieved from the Step 2, hence the areas which are less denser will show light orange colour and will have refraction prominent.

Following is the screen shot of the Material  used by me:-


               

base material                                     refraction map                                  diffuse map

Step 5:-Rendering
    Render is a 1920X1080 image which is using :

Three Point lighting rig, all of which are area lights ( which cost me heavy rendering time, since I later knew that for area lights shadows, reflection,refraction etc are calculated per light based :(   )

Adaptive DMC as Image sampler
    - which is the best adaptive Image sampler for rendering animation
    -since this sampler uses the average of the sample values collected for a pixel hence unlike it's counterpart  "Adaptive Subdivision" it doesn't require all of  subdivisions/samples to store inside the memory making it  memory efficient.

Indirect Lighting:
Irradiance Map  was the best choice for the primary bounce sampler(GI SAMPLER ALGO) among all other samplers as it provides different presets which automatically configures this sampler.
Beside this one can check the Show Samples  to confirm if there are enough samples for the scene.

I used Brute force  as my secondary bounce sampler.

Suggested reading :


Vertex blending thread:
http://forums.thinkboxsoftware.com/viewtopic.php?f=89&t=4932

About Vray 2.0:
http://www.spot3d.com/vray/help/200R1/index.htm

Here is my Animation, as this is my first time rendering with Vray and Frost C&C are most welcome:





Ohk the most important part of the entire animation is The Rendering TIme which took around 2days and 4 hours :( , which is insanely high, or might be appearing too high to me.