MAXON CINEMA 4D: Cinema 4D Forum Adobe After Effects Forum

Thinking Particles Problem

COW Forums : Maxon Cinema 4D

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Ashley Seibert
Thinking Particles Problem
on Oct 24, 2018 at 2:48:49 pm

Hello,

I'm a self taught 3D animator and the company I work for wants me to develop an animation where a rock slurry is introduced into a water filled tank. Some of the slurry will float to the top and the rest sink to the bottom, gather, and then empty when a valve is open.

I have been using Thinking Particles and Xpresso to animate rather than a plain emitter because I needed to control the speed of the particles (the basic emitter was too fast for my boss's liking). The problem I am having is the gathering of the particles at the bottom of the tank. I am using a deflector object in the shape of the tank to hold the particles. I have a small bounce on the deflector (20%). They do collect but they kind of just linger and disappear. I need them to gather and then fall out as if gravity is pulling them out of the tank. Any ideas or tips would be helpful because I am drawing a complete blank.

I realize that XParticles would be the way to go to fully control the particles but my boss will not approve the purchase so I am stuck with vanilla C4D R20.

Thanks,
Ashley


Return to posts index

Steve Bentley
Re: Thinking Particles Problem
on Oct 24, 2018 at 11:04:25 pm

A couple of approaches:
You can use multiple particle systems (the plain old emitter with force objects can get you pretty close to Xpresso and Thinking Particles but true, you have much more control with TP). Use one system for the floaters and one for the sinkers. You can assign different gravity to each (Oh and make sure to turn your global gravity off in the project settings so it doesn't come in to play and fight your gravity objects).

You can also use a deflector for the floaters to simulate surface tension. Just put a sub surface plane just below your water level and animate the deflectors intensity. If you choose "Front" for collision type, the particles could drift up through the sub surface plane but then not be able to get back through. With TP you have to have geometry so make sure to make all your deflector objects editable.

The trick with TP and multiple particle "groups" is to use the TP geometry object and then a PPass node and a PGroup node, so that both emitters can work together but be controlled by different forces. Warning - there are two Pgroup nodes (shakes head), you want the Standard one. Make sure all your forces and particles and the TP geometry object all have the correct group number assigned and they are all being fed from the PPass object - it doles out he particles the emitter has sent into the PGroup.

The other way is to render each particle set separately and comp them together. This approach might work better if you need to basically "freeze" time for one of the sets. There is a freeze TP node but sometimes you need the global system (in the project settings) to freeze or slow or reduce the jittering when things should be stopped for a certain effect. If you use the global one it will affect both systems so render them separately with different global settings.
Many of the settings to keep "particles at rest" from buzzing about are in the project settings under Dynamics and Expert.

Its pretty rare we use only one emitter to do particle job.
Does that help?



Return to posts index

Ashley Seibert
Re: Thinking Particles Problem
on Oct 25, 2018 at 12:44:04 pm

Hi Steve,

Thanks for getting back to me.

I am using multiple emitter systems in my scene. I have one for the slurry falling from the pipe at the top, two in the center, one going up and one going down, the one going up is to simulate the slurry separating and the smaller bits mixing around in the water, and the one going down is the one to gather at the bottom and then dispense. I have 2 additional ones where the little particles have reached the top of the tank and are gathering in a tray. I have attached my scene file, and some screenshots to illustrate what I am talking about.

I have turned global gravity off. Do I have to do that in general when working with particles? The emitters seem to drop the particles faster and further.

I do have a PPass and a Pgroup set up in Xpresso (I have attached a screenshot of my set up for that).

I ended up adding an addition deflector at the bottom of the tank, but the particles don't seem to have a self collision function so they are all piling into each other instead of mounding on top of each other. I was going to keyframe the deflector to turn on and off to simulate the tank emptying after the mound reaches a certain height.

Here is my project file:
12832_hydrodensityseparator.c4d.zip

Thanks,
Ashley


Return to posts index


Steve Bentley
Re: Thinking Particles Problem
on Oct 25, 2018 at 1:58:40 pm

I'll have to get more in depth a little later today, but just off the top...

When I opened the file the global gravity is actually turned on (edit/project settings/dynamics). Its usually best to just make the value 0 instead of turning off everything with the radio button. This may or may not affect the particles depending on how you are using them. I also noticed that very few of the particles were connected to their gravity nodes and some gravity nodes have no objects in the slot. (this and what follows may be intentional on your part so none of this is criticism). You can leave gravity on, but I just thought with floating being needed its best to kill it and use "local" gravity for each group even it means the gravity is negative for some.

There are some primitives in there. If they are part of a bounce system or dynamics they may not work or not work correctly. You can use primitives for particles in a simulation but I find when it comes to deflectors or bounce objects making them editable geometry is best, plus you can then you can trim down the geometry to only where the particles interact which speeds things up.

You might also find the scale is a little small. When things get too small the math gets less accurate since there are only so many decimals and some of the objects sizes are already in the <1 values so calculating the dynamics get tough.

Its really running slow so i'm going to go through it and see what's causing all the calculation slow downs (and that's after i've removed the sky rig and a few other things!). You can use a proxy for your colliding objects and particles or you can choose a simple bounding box for collision detection instead of the actual geometry of the particle which makes the math really simple and speeds things up. I also noticed there are connected deflector nodes but no deflector objects in the slot some cases.

In your expresso you can have the PPass node feeding many other nodes; you don't need one for every attribute. So instead of this:



you can do this:



The lifespan of the upper particles is only 5 frames - is that right? Is this frothing of some sort? If so you can also scale them over time (bubbles usually do that - the pressure drops as they rise through fluid and they get bigger before popping - its the getting bigger that makes them pop)

To speed things up you can turn off the enable button for each expresso in the attributes and just work on one particle set at a time - you can also make those buttons part of the HUD so you can see what's on and whats not right in the viewport and trigger them from there.



And something not related to the particles: I noticed you are using sketch and toon. The sky rig might be overkill for a shader like S&T. Plus it will increase your render times. If you don't need lines (the sketch part of S&T), often a cell shader will work just as well and it renders much faster than S&T. To be fair I don't know what look you're after but I'm old school: sure GI renders (the sky rig simulates a GI render) are great and a sky rig is quick to set up, but if you can light the scene with a few well placed lights and no GI, you can get it to look almost as good and the render times are fractions of seconds instead of minutes. With so much dynamic interaction going on you might want to speed things up where you can since the collision calculations could be costly time wise.

More in-depth later.



Return to posts index

Ashley Seibert
Re: Thinking Particles Problem
on Oct 25, 2018 at 2:13:30 pm

Oh I must not have saved after turning it off. I did set it to 0 and have been working with it. The gravity nodes were intentionally left empty. I was messing with them and couldn't figure them out so I was going to come back to them later if I had time or if I ended up needing them.

I will edit the primitives to geometry. That does makes sense to do. The disc at the bottom of the tank was where I wanted the particles to start gathering on themselves. As for the scale would you suggest scaling up the whole project?

I can edit out the sky rig. That is a rig that was given to me by another animator who has been helping out with the project. The S&T has to stay though. My company has some 3D animations created already that they wanted me to copy as closely as possible and those animations use S&T. If you go to https://www.vega.com/en/home_us/Industries and click the Chemical industry you will see an animation with yellow dots. If you click into those that is a good example of what I'm going for. This file I'm working on now is a test to see if I can replicate it.

I did not realized that you could attach multiple nodes to the PPass. That is good to know. I will edit my expresso to match.

The upper particles are supposed to simulate the tray/weir area filling. I need to flip those upside-down to be more accurate. They need to fall into that space and gather like at the bottom except on a smaller scale.

My file is really messy so I apologize. I am still very new to C4D. Mostly YouTube taught, so I have developed some bad habits I am trying to break. Thank you so much for all of your advice!

Thanks,
Ashley


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]