I was wondering if its possible to create a PFlow that takes a group of objects as its source, both the geometry of the objects AND their positions/rotations. Whenever I use shape instance on a group of objects I cannot work out how to make pflow take the objects original positions as the particles spawn point and rotation.
Announcement
Collapse
No announcement yet.
How to : PFlow from group of objects?
Collapse
X
-
How to : PFlow from group of objects?
Patrick Macdonald
Lighting TD : http://reformstudios.com Developer of "Mission Control", the spreadsheet editor for 3ds Max http://reformstudios.com/mission-control-for-3ds-max/
Tags: None
-
Yeah, you need to use a birth script.
Select all your objects, name them the same thing with an underscore and numerical increment.
Drop this into your birth script:
on ChannelsUsed pCont do
(
pCont.useAge = true
pCont.useTM = true
pCont.useShape = true
)
on Init pCont do
(
global ChunksArray = $pfloor_* as array
)
on Proceed pCont do
(
t = pCont.getTimeStart() as float
if t < 0 do
(
NumChunks = ChunksArray.count
for i = 1 to NumChunks do
(
pCont.AddParticle()
pCont.particleIndex = pCont.NumParticles()
pCont.particleAge = 0
pCont.particleTM = ChunksArray.transform
pCont.particleShape = ChunksArray[i].mesh
)
)
)
on Release pCont do
(
)
Replacing pfloor_* with the name of your objects.
Hide the originals and display geometry and they'll all be controllable through pflow.
-
you're not a gangsta your a gent...
Thanks for that!
One problem though, I can't seem to get it to work. I assume I still need to use a shape instance to tell pflow what particles to use?... and a position object?Patrick Macdonald
Lighting TD : http://reformstudios.com Developer of "Mission Control", the spreadsheet editor for 3ds Max http://reformstudios.com/mission-control-for-3ds-max/
Comment
-
Actually, I just found this similar script. http://www.scriptspot.com/bobo/mxs5/...nks_Basics.htm
There is one difference in the script compared to yours.
example:
pCont.particleTM = ChunksArray[i].transform
yours :
pCont.particleTM = ChunksArray.transform
The script on that page works in that I get the particles forming, but my objects are floating off the surface by quite a distance. I made sure to center pivots, and reset-xform before running the birth script, but the elements still refuse to sit in the original transform position.
Patrick Macdonald
Lighting TD : http://reformstudios.com Developer of "Mission Control", the spreadsheet editor for 3ds Max http://reformstudios.com/mission-control-for-3ds-max/
Comment
Comment