You are on page 1of 36

-Tutorial -

NextLimit Real Flow 3 - Cinema 4D R9 - XPresso Crash Course


(most theory can be applied to other apps - esp Thinking Particles 3DSMax)
This is a complex tutorial, iI you want something easier to star out with
http://www.project1media.com/tutorials/rIbin.htm
.MISSION.

Are you a glass halI empty or glass is halI Iull kind oI guy?

Well Ior arguements sake, you have a glass with 50 H
2
O, content
and a pill that's going to;
a) Make the water Fizz viloently
b) Make the water cloudly.
We're going to combine the physical accuracy oI Real Flow
and un-cover some oI Cinema 4D's hidden gems.

LETS BEGIN
Create a new Iolder Ior your RealFlow project and Save to begin.
You'll have several Iolders Ior exported content later on.

A Standard Cinema 4D Glass and a simple geometry pill.
Ensure to triangulate both models and ...


Export the Geometry to RealFlow via - Plugins -Next Limit - SD-SceneExporter

In real Ilow, change the APP to Cinema and the Scale to 0.01


Import SD into RealFlow.

Select both geometry objects with the Tool
and on the right hand side in your preIs, you need to change
all 4 oI the 'Dynamics' to match this setup.


Now select the pill by itselI and change the single property 'Dyn motion' to Yes
This allows the pill to Iall.

Now iI you hit ACTION, nothing will happen.
So hit Save instead.

Select a 'Gravity' Deamon Irom the 'Deamon List'


Open up the 'SceneTree' and 1) select Gravity 2) ADD All
and now both objects have Gravity.


II you hit 'ACTION' now, the pill will Iall into the glass.
Pretty crap huh?


Hit 'Reset' and then hit 'Lock'

We've locked the scene now, which stops any oI the geometry Irom moving
as we don't need motion until we have the glass atleast 50 Iull.

Save


Select a Circle01 Emitter Irom the list.



And place it by the glass. BeautiIul, you're on Artist!



Select Collision Irom the 'Deamon List'

II you've been paying attention!
Open the 'Scene Tree' and 'Add All' again
The 'Collision' and 'Circle Emitter' shiIt over to the right.



Circle Emitter still selected, change the Resolution to 3 and the Density to 100
DeIault is 1. But 3.0 at this scale give us more particles per part oI water Ior
smoother results.
OK. Save the scene and Press 'ACTION'
It'll take some time to Iill, but you'll want to do a couple oI things.

AIter 10 seconds only 2000 particles entered my glass, but it already appears to be a
quater way Iull.


Hit 'Action' again. (to pause - O NOT Reset)
and change the 'Max Particles' number Irom the deIault to 200 or more beyond the
current number oI 'Num Particles'


Hit Action and the solution will begin to settle.
II it's looking good, increase the 'MaxParticles' to Ior example 5000 and wait again.

The solution will bounce around Ior a while.
*Take a mini nap*


It's not perIect, but it'll do..
By Saving now, you do not need to run this simulation again.

(This step is Ior explanation only)
Turning 'Lock' oII and hitting 'ACTION' allows the pill to Iall into the liquid,
the physics calculate the weight and it Ialls slowly to the bottom.

At this stage, 'Reseting' will make me re-run the entire simulation again..
Hitting Revert Irom the File menu will take me back to the Glass halI empty stage.

.OK.
!#T 2
Timing and the Curve Editor.
IM!O#TNT NOTE:
Now that we're getting into the Iinal stages oI RealFlow work
you'll want to export your particle simulation as a *.bin sequence
and your dynamics simulation as an *.sd Iile.
This is a simple task:
Open 'Export Central'



They'll end up in here Ior import into Cinema 4D later on.

~~~~~~~~~~~~~~


My testing earlier shows that the Pill hits the glass on Irame 25.
What I want to achieve is; As the pill Ialls in,
the Internal Pressure oI the liquid becomes so much
that it boils over the top oI the glass.



With the Curve Editor Open, double click the 'Circle01.Int Pressure'
and also move the key IrameIrom 0 to25 (Irame 25 is where the reaction will begin)
I'm going to Iake the 'bubbling over' eIIect by increasng the 'Int.Pressure' Irom 1 to 50
over a period oI 2 seconds (60 Irames)
Which technically should make the water bubble over the top.
But will require some experimenting.
Running into several issues with my own calculations in Real Flow.
II the Internal Pressure simply isn't creating enough oI a reaction,
you can pause the simulation ('ACTION') and move the white bar to a
later stage in the animation to set a manual keyIrame Ior the 'Int.Pressure'.
The grey space has not yet been calculated, so aIter setting your key, return the white
bar to the last calculated Irame; i.e 103
You can comIortably over-write the last Irame. It will ask you Ior conIirmation.



Here I've set my own key to 30.72 at Irame 140.

The Iinal settings Ior a dramatic exit was IntPressure 200!!
I could have spent much more time tweaking the 'Curve Editor', but sometimes
simple keyIrames are enough.


This result is okay Ior tutorial purposes, you may spend a Iew hours
trying to get something to work in a convincing manner.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~
!#T 3
Getting everything back to Cinema
Bringing RF Solutions into Cinema 4D is quite a simple task.
I've explained it once beIore here, so you can skip most oI this other tutorial
and read the essentials aspects oI loading rI bin sequences into xpresso.

http://www.project1media.com/tutorials/rfbin.htm

Bringing the Dynamics *.sd Iile is as easy as pie also.


Locate the *.sd scene in your Iolder.


and the Pill will now have the same Animated properties Irom the Real Flow Scene.

Follow the other tutorial, but don't bother with the Metaball technique just yet,
It will only slow you down.
II you get stuck here, read the other tutorial twice..
II you get really stuck, you can mail me; inIoproject1media.com or
stuartlynchhotmail.com MSN.

!#T 4
Creating a convincing look and feel with X!resso
HopeIully by now you have a working/viewable particle system in Cinema 4D.
The next stage is to use the power oI xpresso to make some Iiner details.



Your scene should look something like this


and this


Copy only the Glass and Pill into a new scene
as the *.bin sequence will distract you.


Create a Null Object Irom Objects Menu
Add an 'XPresso' tag (right click - Cinema 4D Tags - XPresso)

Double click the node-box shown above
To open the XPresso Editor


Add a 'PMatterWaves' Node (right click)




In the Basic Properties Ior the 'PMatterWaves'
Copy these preIs and hit play in the viewport.



These are the particles Ior the Pills Dissolve bubbles.
They currently exit the glass and start too early, we'll Iix that soon.


Right click in the Xpresso Editor and Create a New Node 'PGroup'
(Note - I will reIerence New Nodes as text Irom now on.
All TP Nodes mentioned can be Iound in these 6 subgroups)


Connect the 'PMatterWaves' Particle Birth output
to the
'PGroup' Particle input.
(right clicking the blue or red square reveals other input/output options)



Open the 'Thinking Particles Settings...'



Add a new 'Particle Group'


Rename the new group "Bubbles"
And right click and view the settings Ior this group.
Change the Color to Blue.


Drag the 'Bubbles' group into the 'PGroup'
Press play in the viewport to see the eIIect.


You shoudl have Blue Particles.



In the Xpresso Editor, create 2 new TP objects 'PPass' and 'PDeIlector'
Pass the bubble group into the 'PPass' node

This says; pass the Bubbles Group over to the PDeIlector Node.
We're going to create a deIlection to prevent the bubbles Irom escaping.



Select the 'PDeIlector' Node and copy Irom the glass geometry Irom the 'objects'
menu
into the empty space above labelled "Object"
ModiIy the other settings also, most important, change 'DeIlector Type' to Object.
This calculates the geometry.


Pressing play now reveals these results.
(Note, There's an error in my *.sd Iile, which makes my scene glitch, shit happens
likely cause is I Iailed to simulate a single Irame at some point )



The next step is very simple.
1. Create a 'PPass' Node
2. Create a 'PShape' Node.
3. Drag 'Bubbles' group into 'PPass' Node.
4. Create and scale down a sphere - Reduce 'segments'
5. Drag the 'Sphere' geometry directly into the 'Pshape' Node.

We're telling XPresso to pass the Bubbles Particles into Sphere instances.



From the Plugins Menu - Thinking Particles
Select 'ParticleGeometry'
Then copy your 'Bubbles' group into the 'Particle Group' option



You've now used TP to create the Bubbles needed.
You can scale the 'Sphere' object down iI the bubbles render too large Ior your liking
Or create another node 'PPass' into 'PSize' and scale them down in XPresso.

Once you're happy, apply a tranparent material to the 'Particle Geometry'

One Last Issue

The particles come on too soon and requires a simple Iix.



Right click in Xpresso Editor
1) Create 'Time' - Irom New Node - XPresso - General - Time
2). Create 'Compare' as shown above
3). Drag the compare output to point 4. And choose option 'ON'



Select the 'Compare Node'
Change the Date type to Time
Function to "~" 'greater than'
Input 2 00:00:08 (The time where the pill hits the water)


Note: With a little tweaking, you can keyIrame the 'birth count' in the 'PMatterWaves'
node to
quickly increase Irom 0 to 1000 in a matter oI Irames, to create a convincing eIIect.

"..Phew.."

!#T 5
Making the pill vanish - The easy way.



Firstly I apply an 'Explosion' DeIormer to the pill.



I key Irame over a period oI about 2 seconds, only a slight explosion, just to break it
apart slightly.



The next part oI that equation is to create a material than gradually Iades away
completly
frame 45



Move the white close to the black and add a new KeyIrame
frame 120


I've done the same with Alpha channel, but the reverse colors apply here.

That's it for the pill effect.

!art 6

Cloudy Effect.

'Proximal'' in Cinema 4D is a material eIIect aIIected by the position oI a null object
or geometry.
In this case, I want the pill to create a "greying" oI the water as it slowly melts away.

To make liIe easy Ior now, create a new cylinder similar in size the position oI the
liquid in the glass.
as Iollows;


Create a new Transparent material and turn oII the color channel.
Set the Fresnel to 1.5
and Hide the Glass Geometry (Do no delete)


1) add a Luminance channel to your material
2) Create a 'Fusion' channel
3) In the 'Fusion' channel create a white color in the Blend Channel
and a 'Proximal' EIIect in the Base Channel

Change the Mode to Multiply (is set to Normal above)



A) Add the 'Pill' Geometry to the Objects list in the 'Proximal' shader properties
B) Change the settings to the ones shown.
You can see Irom the results (LeIt) that the Luminance is having an eIIect
on the color oI the water. It is relative to the position oI the pill.

You will have to keyIrame the 'End Distance' over time Ior the eIIect to spread
throughout.
This requires quite a large amount oI time spent experimenting to get a perIect result.

My result
Frame 30 - End Distance 0
Frame 120 - End Distance 100

We don't need to the cylinder once we're done.
The eIIect needs to be applied to the Metaball Geometry in the Iinal render.
Simply use this texture Ior the Iinal solution.
~~~~~~~~~~~~

!#T 7
inishing up.



The next task is to convert the RFBIN sequence into a metaball liquid.

AIter Iollowing the "importing to cinema" part oI the Metaball tutorial,
you should have a clear understanding
on how to bring in the RFBIN particle solution into XPresso
and converting those particles into Metaball geometry.

Again, that tutorial:
http://www.project1media.com/tutorials/rIbin.htm

"It's actually one oI the easiest parts, don't give up yet"

RealFlow will create a new Particle group Ior you called "RFGroup"
You will need to create another Particle Geometry object Ior the Liquid.



Remeber: keep your 'editor subdivision' at a high 'meter' length Ior metaballs,
otherwise you will be in danger
oI trying to view polygons in the Millions in your viewport.
Set the Render subdivsion about 1/8th the size oI the editor view,
which will give you 8x the current geometry.



Once you're happy. Light the scene and render.

ill update with a new render soon)

You might also like