View Full Version : crowds in PFlow
03-21-2008, 02:53 AM
so i have a crowd of static stood people instanced in pflow watching a concert in the middle of a stadium is there a way to get the meshes to be rotated all looking at one central target? with out having to do seperate sections for each angle? there may well be an easy problem but it's late and my brain is fried! thanks
03-21-2008, 10:32 AM
I gave it a shot with a script operator, but the behavior is still a bit weird, probably due to my still mediocre math skills:
on ChannelsUsed pCont do
pCont.useOrientation = true
pCont.usePosition = true
on Init pCont do
on Proceed pCont do
count = pCont.NumParticles()
targetObject = Dummy01
for i in 1 to count do
pCont.particleIndex = i
orientationZ = atan ((pcont.particlePosition.x - target1.pos.x)/(pcont.particlePosition.y - target1.pos.y))
pCont.particleOrientation = [0, 0, orientationZ]
on Release pCont do
And attached is the set up scene. Like i said the behavior is still a bit wonky, but you get the idea... Feel free to correct the shoddy math used in the process
well damn, seems anselm nailed this one :D
03-21-2008, 10:33 AM
03-21-2008, 11:27 AM
thats fantastic thanks, nice to wake up to!! I was about to try and tackle it myself.
So its pretty simple, all done with the find target control by speed settings? is that correct?
03-22-2008, 09:13 PM
So ive been putting my crowds in to the stadium for my project and going by your method in plfow it all looks great in my view port, but when i render the image it gives me something different. It's kind of as though they are in their frame one position. They move accordingly to look at the target in the view but not in in the render.
strange but true!
any tips to solve this cause other wise its perfect!
03-23-2008, 12:32 AM
Just a guess - the scene could be using a Box#1 operator. If you have Box#1 demo version only, it will work in viewports but not during render - as explained during Box#1 demo installation.
03-23-2008, 12:45 AM
not a bad answer but im not using a demo and im not using anything from box1! just 5k worth of max.
03-23-2008, 01:12 AM
if your scene is not under any NDA please attach or send the scene to olegs(email@example.com) or my(firstname.lastname@example.org) email adress and we will see what we can do.
03-23-2008, 01:32 AM
yeah its wierd i cant send you my scene as its for an agency and they'd freak at me but i looked at the scene you sent me and attached my own mesh rendered it and its working fine so not sure what ive done with my project scene??
something daft no doubt.
03-23-2008, 01:32 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.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.