PDA

View Full Version : Particles (TP) colliding with objects triggering an event


Creature
11-29-2005, 12:38 AM
What I'm trying to do here is have particles (with a cube asigned as shape) trigger the visibilty of an object when the particles hit one of the objects.

Can you tell me what I'm doing wrong here? The PDeflector node does not seem to accept the output of the Hierachy node in a correct way. PDeflector is set to EventOnly btw. The Hierachy node itself is working right. I tried the whole thing with a single cube triggering the visibility before turning it into a particle setup and all was working fine.

I also tried to use the standard Xpresso Collision node feeded with the ParticleGeometry object as the colliding object instead of PDeflector/PPass.

Or am I doing something completely wrong here?

Again, basically what I want to do is make a object visible once it's hit by a particle (taking the shape of the particle in account).

Srek
11-29-2005, 05:40 AM
Hi,
you are trying to create an invalid iteration here. Both the Hierarchy and the PPass nodes are iterators, but they are not correctly dependent on one another.
Your setup looks like this
for i=1 to 20
for n=1 tp 30
next i
next n

It just does not make sense.
For this to work you have to trigger one of the iterators by the other.
Incidentialy it won't help you much if you get it to work, since the second part of the setup won't work either.
You have a multitude of possible results from which most give false while some give true and this all on one frame. It will be completely random which check is done last on the frame and is actualy visible on rendertime then.
Cheers
Björn

Creature
11-29-2005, 10:23 AM
Oh, it never occured to me that the PPass is a iterator.

Can you think of a way how particles can trigger the visibilty of objects aranged as childs of a Null? Or am I doing the whole thing in a wrong way?

Creature
11-29-2005, 10:31 AM
Ah well, since a fast sollution was needed I was able to do it post using the Proximal Shader which created a mask for compositing in Digital Fusion.

But just out of curiosity - if anybody has an idea on how to do it with TP, just let me know.

Srek
11-29-2005, 10:42 AM
Overcoming the iterator problem isn't to hard, just use the PPass number of particles output port to enable the iterator by checking if the number of particles is greater zero. This way there is a defined dependency between the two the PPass beeing the outer and the Hierarchy node creating the inner loop.
The other problem of multiple particles having control over the state of an object is more difficult, it will need some COFFEE node setup to accumulate all informations from one iteration. I'm sorry, i have no example on a setup like this.
Cheers
Björn

CGTalk Moderation
11-29-2005, 10:42 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.