C4D: Playing with Thinking Particles 1
I've been messing around with Thinking Particles a lot lately. When you get the workflow, they're quite fun to play around with.
The first shows a ball flying towards a small cube-ish wall. It bounces off the floor and produces ThinkingParticles whenever it touches the floor. I also have a red texture that's tied to the speed of the ball. Here's the node tree::
|click to view larger|
So what's going on here?
First, I have a P-Storm in the bottom-left. That's the guy producing the particles. It's "Emitter Position" port (which determines where the emitter is) is tied to a "Dynamics Collision" node, which outputs information about dynamic collisions. You can see on the other side is two objects that it's monitoring: the sphere and the plane. So these nodes basically place the pstorm emitter where the plane and sphere collide. Simple enough.
The "ON" port on the PStorm determines when it's emitting or not. For this one, I'll work from the beginning. We have a "Dynamic Body State" node which is monitoring the Sphere object (top-left). It's outputting the velocity of the sphere in space. The reason I used this is because I only want the PStorm to emit if the object is moving faster than 250 units, and also to tie to the proximal shader that turns the sphere red, which will be based on speed as well.
So the Dynamic Body State outputs the velocity of the sphere to a "Spy" node, (A node that let's you spy on a the value going through, as in view it's value without changing it) then it goes to two nodes. A "Range Mapper" and a "Compare" node.
The Range Mapper maps the speed of the sphere to the intensity of the proximal shader. You'll notice the Constant node with Real(250), the speed I mentioned above. So the Range Mapper says if the speed is above 250, the it will output 100, if the speed is below, it lowers the intensity progressively. Handy!
The Compare node basically checks that the Dynamic Body State's velocity is greater than the 250 constant. If it is, then the PStorm goes on, if not, it stays off. Cool!
It may sound complex, but when you're progressively building the tree, it makes sense.
So you should be asking "If the Dynamic Body State is constantly outputting 250 (before the ball hits the cube at the end), how come it's not constantly emitting?"
That's because of the "Dynamic Collision" node. If there's no Collision, it doesn't produce any value, so the PStorm doesn't have an Emitter Position, and since it doesn't know where to emit, it doesn't. A bit of a fluke that one!
This is one of the simpler scenes I've been messing around with. Will upload a few more over time. Keep an eye on my Youtube channel for moar!
Like? Hate? Opinion? Comment below will be appreciated!