View Full Version : Bake Flock Animation

09-20-2013, 12:03 PM
Hi all,

I'm trying to bake out a flock animation but I can't get it to work. LW crashes...
I saved the Filecache with the final animation and I am trying to get out an obj sequence
into after effects with IL_SaveTSeq+

anyone got experience?


09-20-2013, 01:11 PM
I've used ParticleScan from here to bake Flock animation.

09-20-2013, 01:21 PM

Do you know if it is possible to export the particles as obj sequence?

09-20-2013, 01:25 PM
They would have to partigons to do that. I'm not sure Flocking gives you the option to generate the agents as geometry. You can attach geometry as instances or via the Flock Motion motion modifier.

You could save your Flock simulation as a pfx file and then apply that motion to a partigon emitter.

- - - Updated - - -

Hi all,

I'm trying to bake out a flock animation but I can't get it to work. LW crashes...

Flocking actually has a built in button to save out as pfx.

09-20-2013, 01:40 PM
117218Ok I scanned the motion and have the pfx transfered to a partigon Emitter.
I run the IL_SaveTSeq+ it scrubs through but doesn´t save anything...although before it did with a test object.

can you see if it works for you?

09-20-2013, 01:46 PM
It worked for me. You probably didn't save out your Emitter object before running that lscript. You need to save your partigon emitter to an actual object file first.

09-20-2013, 02:03 PM
Thank you very much! Bad News is Element 3D doesnt seem to support it. It reads obj sequences (I used the script to reave the lwo to obj) but somehow the particles won't show up. =/
So I have to find another way.

Thanks a lot for your help!

09-20-2013, 02:08 PM
I was able to load up one of those exported lwo files, export as obj and then bring it back into Modeler. So it looks like obj supports this mass of polygon points. I don't have Element3D so I'm not sure where the disconnect is.

I repurposed that lscript you're using to make a more robust one.

The objs that my script makes won't be different than what IL saves out so if the problem is with Element then my script won't be of any extra help.

09-20-2013, 02:36 PM

I made two screenshots. First one shows the obj sequence (only got 56 frames here because it crashed during the export) the info in the left upper corner shows no information at all.
The second screen is from a simple sphere with information in the corner.

So my guess for now is that maybe element only takes connected polygons.

Im gonna try it with 1 point polygons straight out of modeler as obj to confirm it.

Yep. 1 point polys seem not to be supported.

09-20-2013, 06:12 PM
Yep. 1 point polys seem not to be supported.

Most other 3D pkgs besides LW consider 1- and 2-point polys as "junk geometry" and either discard or throw up upon encountering them.

09-22-2013, 01:47 AM
It won't help here, but I just tried Utilities>Plugins>Additional>Particle2Partigon on a flocking object and it actually made partigons that flocked without having to save a .pfx and apply it to a partigon emitter.
I also learned that the negative line value trick in the object edges panel does not work with particle blur turned on.

09-22-2013, 11:45 AM
I opened 10 Frames of the obj Sequence and manually selected all points and hit p and resaved it.
Then I opened the obj sequence in element and now it's reading it and since the points are not visible but only used as position placeholders for other objects it now works fine.
Since Element 3D is somewhat limited in letting objects fly from one pose to another (it's possible but more like in a linear way) it is nice to be able to use LW flocking system.
Now I have to look for a solution for not manually connecting the dots ;P

09-23-2013, 01:20 PM
When you say select all are you manually clicking on each one or lassoing around the bunch? If so, I can maybe speed you up a little. If you open the statistics panel (w) and (making sure you're in point selection mode (ctrl+g) you click the + next to "Total" you'll select all the points with one mouse click.

Beyond that I think you're in lscript/python territory which I know little about. :/ If we had a macro recorder or LScript commander in Modeler, it'd be pretty easy to make a script to at least 1) select the points 2)make polygon 3)save object (.obj in this case) 4)close object. Then you'd just have to load an object, click a button (assuming you mapped the lscript to a button). I'm sure something could be made to batch an entire folder too, but again. The ability to do that is outside of my toolbox for now. :)

09-23-2013, 02:37 PM
No I didn't Click each point ^^
I lassoed the whole bunch and hit p.
It doesn't matter in what order you select them they just have to be connected for Element to be noticed.

Yeah a macro recorder would be great...I Need to find the time to check it out how it can be done.
In general it should be an Easy task since it is really only opening a sequence connect the dots and resave it.

09-29-2013, 10:15 PM
It's probably too late now, but I did stumble across a Modeler script that does what you want: LF_PntToMesh (http://www.vuescripts.com/_A/index.php?aid=44). You can add it as a plugin, then add the plugin to the menu somewhere and then just "load - click - save" a bunch of times. :)

09-30-2013, 02:45 AM
Thanks for the link!
I am trying to write my first Lscript and I got it working for the part to select the points, make a poly out of it save it and close it.
The only part I can't seem to figure out is how to load an object sequence (*.lwo or *.obj)

Here's the current script status:

thisModel = Mesh(0);
currentPath = thisModel.filename;
pntCnt = pointcount();
if(pntCnt == 0)
error("No points found.");
lastPntPos = pointinfo(points[pntCnt]);
for(currPnt = 1; currPnt <= pntCnt; currPnt++)
polygon = addpolygon(points);


I put up a thread in the Lscript forum. Maybe someone can help me or point me in the right direction.