1/11/2014

MAYA FLUIDS TO PARTICLES & KRAKATOA MY 2.3 & PLEXUS 2

Hi everyone, 

In this tutorial i will show you; 

- How you can convert a Maya fluid to a particle system 
- How to use the new Magma Channel Editor that comes with new Krakatoa MY 2.3
- How to render with Krakatoa 
- How to export Maya particles to After Effects 
- How to use the new Plexus for AE with exported Maya particles  

Using these we will create a stunning fluid like plexus animation that can be used as Mograph, data visualization or anything you can imagine. 

Here is the final result:






It will be a long tutorial so i divided it in 3 parts. If ready let's begin. 



PART 1: Converting Maya fluids to Maya Particles and rendering with Krakatoa MY 

Krakatoa MY (http://www.thinkboxsoftware.com/krakatoa-my-overview) is a powerful particle rendering engine that recently adapted to Maya from 3ds Max. It is able to render fume fx fluids inside 3ds max but to be able to render Maya fluids we need to convert them to maya particles;

To begin with, we will create our fluid. It is simple maya fluid and it can be anything you want. also it doesn't have to be a very detailed fluid since we will never render it. 

So create the fluid you want and cache it because things gonna get darn slow :) 

here is my fluid; 




Next thing to do is to convert this fluid into a particle stream. So we first create a particle emitter and make it a cylindrical volume just like the fluid emitter and place it exactly to same position with the fluid emitter. 

The important thing is to keep particle emitter inside the fluid box. 

We will first select our fluid shape (or just the fluid box) then the particles (not the emitter) and use the Dynamics > Fields > Affect Selected Object(s). This will ensure that the fluid will drive the particle source. From now on i will call them Fluid Particles to differantiate from other particle sources. At first, fluid particles will behave crazy but if you use the particle settings below they will start to follow the fluid. If you are not still happy with the particle motion you can alter it a bit by decreasing the conserve or you can use a gravity field like me. 

(The emitter is set to 300000 particles/second to get a nice density in krakatoa)

Here are the particle settings:






Here is the Fluid Particle after using the affect objects: 





Now we will load the Krakatoa MY 2.3 Plug-in and start to use Magma features. 

First of all we select the fluid particle and click the magma button on Krakatoa shelf 





 Then in Magma editor build the following graph 





The input values 10f and 50f are the float numbers that are adjusted by the maximum speed value of the particles but you can always fine tune them to your liking. 


NOTE: Krakatoa MY 2.3 is still in beta phase and you may not access it but you can do the same in Krakatoa MY 2.2 by following this simple tutorial at http://www.thinkboxsoftware.com/kmy-mapping-by-velocity-length/

Then create 3 spot lights and adjust the placement to your liking 


Here are the Krakatoa Render Settings: 




What you will get is the following render. Krakatoa MY is incredibly fast at rendering particles even with dof and motion blur.






PART 2: Exporting Maya particles to After Effects

After Effects and its plug-ins (element 3d, Plexus) can utilize 3D objects and can create great visuals but to use the maya particles as 3d objects we need to export them in a way that AE understands their 3D locations and motions  



Now that we converted the fluid to particles and rendered them with Krakatoa now it's time create another particle system and find a way to export them 


First we will create a new particle emitter and place it to the same position as previous emitters and use the same "affect selected objects" feature to advect particles with fluid. But this time we will use a 150 particles/second in emitter options and a usefull particle limit in particle options. I used 800 particles because it gives a nice look in plexus and higher values mostly crashes AE.   

Also name your second particle system to "AE particles" to avoid confusion.

Here are the AE particles: 




!!!!! IMPORTANT STEP !!!!!

Now here is the critical step to be able to export these AE particles to After Effects and use them with plexus. 

First of all allow your AE particles to be played to the end of your timeline and be sure that all 800 particles are emitted and on the 3D space. if they are not they wont be used. 

Then select the AE particles and run this script to create 800 locators. 


float $test = 1; int $particleCount = `particle -ct -q particleShape2`; for ($test = 1; $test < $particleCount; $test++) { $newLocator = `spaceLocator -n "null_" -p 0 0 0`; $expressionStr = ( "float $locP1[] = `getParticleAttr -at position particleShape2.pt[" + $test + "]`;" + $newLocator[0] + ".translateX = $locP1[0];\r\n" + $newLocator[0] + ".translateY = $locP1[1];\r\n" + $newLocator[0] + ".translateZ = $locP1[2];" ); expression -s $expressionStr -o $newLocator -ae 1 -uc all; }




This Script will create 800 locators and name them null_0,null_1 etc. because AE recognizes the null name and gives them the 3D properities. 

NOTE: This script is the work of Digital Tutors Forum staff ChrisG and is located at http://www.digitaltutors.com/forum/showthread.php?20590-Atom-Expression-Help

Now delete everything besides the locators and the render camera and save this scene with a usefull name like To_AE or For_Plexus 

Now we will jump to After Effects and will start to use the plexus 2. 




PART 3: Using Maya particles inside After Effects and PLEXUS 2

Plexus 2 for AE is located at http://aescripts.com/plexus/ and it is a great plug-in to create data visualization and mograph like visuals. Plexus uses 3D objects in the scene and we will exploit this feature by using maya particles 

Now open the After Effects and import your scene in. You will see that you now have a new comp named after your maya file and inside it a camera and 800 3D null objects. 

Now create a new solid and add plexus effect to it. Add a Layers Plexus toolkit and use 3D Layers as "object type" and nulls as "layer type"  



  

Now create another 300x400 comp and create a text layer and use the following expression to create a random number that is decreasing with time. This will simulate the lowering fluid temperature. You can actually use anything you like .






Then use the textured sprite option in the Plexus point renderer setting to bind the numbers to points 






You can also see other Plexus options there that i used to create the desired effect. Notice that i used the Camera Settings to create the dof and here are the camera options 






Now that everything is done you can render the comp or edit it a little more if you like. What you will get is what you see as my blog background. 

You can also see the final result here: https://vimeo.com/83545577

Thank you for reading this long tutorial. I hope these techniques used here gives you new creative ideas. 

3 comments:

  1. Hi. this is a beautiful tutorial but unfortunately i couldn't make fluid like tutorial .
    can you help me please .

    ReplyDelete
  2. Hi Esmatullah, to create the fluid in the tutorial you can create a 3d fluid box with an emitter and set the emittter to a volume. position it and increase the divisions a little bit and you will have some smoke.

    ReplyDelete
  3. here is my tutorial using fluid maya not plug in http://videotutorialmaya.blogspot.com/search/label/fluid

    ReplyDelete