PDA

View Full Version : Instance and Flocking



sebrady
02-06-2013, 06:21 AM
In the 11.5 addendum it says you can use instancing with flocking. I cant get it to do what I think it should do. I add a sphere in Layout. I instance it 10 times. I add a Goal director and animate it moving around. When I make the sphere a flock, I get tiny dots NOT all the 10 spheres created by instance.........I am confused. Can someone set me straight.

nickdigital
02-06-2013, 06:39 AM
I think you need to add a Flock item, get it to animate how you want and then apply your spheres as instances to the Flock item. From your description it sounds like your setup is backwards. When you say you instance your sphere, what is the instance generator?

Spinland
02-06-2013, 07:13 AM
You need to ad your generator as item and select the object you want to instance. In instancer you need to add the same object and set type to particles.

sebrady
02-06-2013, 10:14 AM
Flocking
1. animate flock and goal as desired
2. add a fish model
3. add instance to the FLOCK
4. select the fish from the dropdown
5. select particles on the right side
6. set fish to local not world

BTW.......my upper left quad screen sometimes goes black......just like the graph editor, I close graph and reopen, that fixes it.......for the layout upper quad, I try to ping it by switching views or turning other things off and on, it finally gets back to normal........Newtek....here is a software bug in 11.5 you can fix for us.

greg.reyna
02-12-2013, 06:10 PM
How do I offset the action of an animating object, so the entire flock isn't moving in synch?

Thanks,
Greg

dwburman
02-12-2013, 07:06 PM
the windows blacking out sounds like a possible video card driver. I haven't noticed anything like that other than windows going black briefly when switching VPR on/off in some scenes.



If the animation is keyframed, I think there is an offset tool or something in the instances controls, but not sure exactly where. If the animation is using an .mdd or geocache file file of some kind, you'll need to clone your object a few times and put an offset in the mdd loader.

jameswillmott
02-12-2013, 08:04 PM
How do I offset the action of an animating object, so the entire flock isn't moving in synch?



If the animation is keyframed, I think there is an offset tool or something in the instances controls, but not sure exactly where. If the animation is using an .mdd or geocache file file of some kind, you'll need to clone your object a few times and put an offset in the mdd loader.

D.Burman is exactly right.

greg.reyna
02-15-2013, 03:53 PM
I'm not getting it.

Instance Generator / Offset is used to offset the relative position of a fish object's 64 instances. I'm not seeing how to offset the object's 20 frame animation cycle, so the tail flaps aren't in synch. At first I tried load from scene to bring one 20 frame cycle of animation into the 'instancing scene', but I couldn't see how to repeat the cycle. Then I created a scene where I copied & pasted 10 repeats of the cycle, and used load from scene to bring that 200 frames of repeating animation into the instancing scene I'm working with now. I'm using a path director. I also tried Time Offset at Weight 100%; Scale 100%; Offset 35%. Maybe this isn't the right way to go about this.

dwburman
02-15-2013, 05:13 PM
You should be able to set your animated channel to repeat in the Graph Editor so that the animation doesn't just stop.

In LW11.5 there is a Time Scale and Time Offset control on the Instance Generator that is supposed to control the time of that object being instanced. You may need to use a texture to vary the offset between those objects in the 'group' of instances. I haven't played with this yet, so I don't know for sure.

Spinland
02-16-2013, 04:00 PM
Wow, that time offset stuff looks very useful, and I wished I'd noticed (and thought to experiment with) it when I was doing some flocking butterflies recently. I just ended up making multiple copies of the .lws and manually offsetting the movements in the dope track.

Live and learn.

greg.reyna
02-19-2013, 08:17 PM
Thanks! The mdd process worked perfectly, but then I tried to duplicate the same thing with keyframe animation and just couldn't get it to work. I cloned the fish 3 times, then set Time Offset the appropriate seconds value (eg 5 frames = .16) for each clone, but it didn't work. I'm not complaining, I'll use the mdd process. For anyone else who needs help with it, this is what I did.

-Loaded scene that contained only one cycle of fish animation, frames 0-19.
-Opened Object Properties/Deform/Add Displacement and added MD Baker
-Changed the directory to my Motions folder. On my Mac it looked like this:
/Applications/NewTek/LightWave3D11.5/Content_flocking/Motions/fish35.mdd
-MD Baker settings are at default (Bake Mode is Subdivision Only)
-Opened fish35 in modeler, renamed it to fish35_nobones, then deleted all skelegons
-Moved fish35_nobones into Layout, cloned it 3 times, and spread the fish out side by side.
-Opened Object Properties for fish35_nobones (1) and loaded deform/add displacement/md reader
-Opened fish35.mdd, set End Behavior to Loop, and Apply Cache to Object Space
-Did the same with the other 3 clones, increasing Frame Offset each time.
-Opened Flock_Master, added new Generator, set Count to 2,2,2, and Size to 5,5,5
-Opened Object Properties/new_flock/Instancer & added Instance Generator
-Dbl-click to open it, added object fish35_nobones (1), change Type to Particles
-Offset tab, set min to 1,1,1 and max to 8,5,6 to spread the fish out
-Returned to Flock_Master window, added Goal Director, and moved it into distance
-Press Calculate All Motions
-At this point I had to add more lights and re-position the camera
-Return to Instance Generator window and add the other 3 clones. After adding each one, click on it, go to the Offset tab, and enter the same min & max as set for the first fish.
-Press Calculate All Motions--Voila! :)

dwburman
02-19-2013, 11:16 PM
Yup. That works. :)

FYI, typically the .mdd would go in either the Dynamics or VertCache folders... or at least that's my understanding of how LightWave intends the folders to be used. The Motion folder is for saving motion paths (.mot files).

That said, there's not really any problem doing it the way you did it unless you're working with/for other people and then they will probably tell you where they prefer you save files. :D


By the way, it looks like in order to get time offset working, your instance Items have to be set to Parent mode (instead of World or Local)

111734

greg.reyna
02-23-2013, 09:24 PM
Ah, that explains why the first mdd file didn't get saved, I haven't created either of those folders. I think the default is the VertCache folder.
Nice to know that time offset works.

Thanks!

dwburman
02-24-2013, 08:52 PM
Yeah, I think the newer tools save to VertCache by default, but ClothFX (which also uses .mdd) defaults to Dynamics.