View Full Version : PFlow ShapeFacing rending issue

01 January 2011, 09:40 AM
I use Shape Facing for my partiles which look at a camera.
I have to render my anmition for 8 direction by rotating the camera so I wrote a script like this
for batch render.

select $Dummy01
rotate $ (angleaxis (45*iDirection) [0,0,1])
render outputwidth:......etc
//Dummy01 is the parent of the camera

The problem is particles won't look at the camera after each rotation.

I will appreciate if anyone can help......

01 January 2011, 06:35 AM
I cannot reproduce your problem.

*I created a default PFlow.
*Created a Free Camera.
*Added Shape Facing, picked the Camera.
*Added a Light at the Camera's position and linked to the Camera so the particles would always have "headlight" at them.
*Linked the Camera to a Dummy01.
*Rendered using the script with 45 degrees rotation of the Dummy.

RESULT: All rendered images showed the particles looking at the camera.

Can you post a simple example scene that does not work?

01 January 2011, 01:17 PM
Bobo, Thanks for you quick replay...

I think the problem is in this step.

*Rendered using the script with 45 degrees rotation of the Dummy.

I have to render eight direction of my animation so I have a for loop in myscript:

for myDir = 1 to 8 do
select $Dummy01
rotate $ (angleaxis (45*myDir) [0,0,1])
render outputwidth:......etc

If I render one direction there's no problem.

01 January 2011, 01:38 PM
simple file is here............

01 January 2011, 04:35 PM
Nope, I used EXACTLY the same script you posted, with the FOR loop which you did not post initially.

I opened your scene and it renders correctly using the script (all particles always facing the camera on all 8 images), except for the lighting which does not look right (some images have black RGB, but the Alpha clearly shows correctly facing particles).

If you read my initial answer, you will notice that I linked a light to my camera to keep a headlight at the particles and make them visible all the time. If the black frames were your problem, that will fix it. If your particles REALLY don't align to the camera, it could be a bug in your version of Max (I was testing in 2010 64 bit).

01 January 2011, 08:47 AM
problem solved.

The script have some problems. It was wrote by one of my colleagues, he made it too complicated... I can't figure out the problem until now....particles just do not facing at the camera

I wrote a simple script and run it, It renders correctly....

Bobo, Sorry for bothing you! Thank you very much!!!

CGTalk Moderation
01 January 2011, 08:47 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.