XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : simple expression, CollisionU &V , Strange results!!

12-15-2010, 01:27 PM

exploring some of the per particle attributes, I started with a fairly old tutorial from Digital Tutores ( advanced shading network ) wherein a simple paintBall gun shoots toward a simple surface .

but for a reason, the following expression which is supposed to return the collision U & V coordination of colliding particles returns very strange results . I don't know why .. here's the expression:

global int $numOfCollisions;
global vector $colUV[];

if (particleShape1.collisionU > 0)
print ($numOfCollisions + " " );
print ($colUV[$numOfCollisions]+".\n");
( the red lines are just for debugging purposes)

the result should be like this :
1 0.323566 .4562236 0
2 0.652356 .5986664 0
but this is the result the above expression which is not normal:

1 0 0 0
2 0 0 0

I'm using Maya 2011 64bit sp1 on 64 7 windows.
thank you in advance

12-20-2010, 08:57 PM
should be at the end of the expression. Currently you are incrementing the array index then printing the current value inside that index which is going to be zero of course :)

CGTalk Moderation
12-20-2010, 08:57 PM
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.