PDA

View Full Version : HELP! Flocking to one Director/Arrive then to another Director/Arrive...



Norka
04-26-2016, 08:37 PM
Um, first time flocker guys.. And I'm really, really wrestling a problem while going from Flock Generator to a Director/Arrive, then to another Director/Arrive... Using this tut: https://www.lightwave3d.com/learn/article/flocking-fruit/ I am able to get it sort of close, but my instances all leave D/A # 1 too quickly, almost all at same time... I would like them to leave D/A # 1 at a slower rate, kind of like the generator spits them out. Everything else in animation is basically perfect, except for this one part.

It would probably help to explain what I am doing: My generator is a large sphere off camera on left. D/A # 1 is a stand-in low poly of a logo. D/A # 2 is a large sphere to right off camera. So I want my instances to fly in, cover the basic shape of the logo, fade in logo, then instances start flying off to right (revealing the real logo), spreading away from each other (thus the large D/A #2 to right) while flying to right. I have been playing with all kinds of different settings. I have tried many tweaks to Weights envelops of both D/A #1 and D/A #2... AAAAHHHHH! MOTHER-FLOCKER!! :cursin:

Anyone have any ideas? Please?

MonroePoteet
04-27-2016, 09:27 AM
One approach which might work for you is to have the D/A#1 "release" Agents towards D/A#2 by varying D/A#1's Weight after D/A#2 becomes influential. Attached is a sample scene with one approach.

The Envelope on the Weight of D/A#1 and the variance of the Agents is key. The variance of the Agents allows them to react more independently. The Envelope on the Weight has an Oscillator Modifier (in the Modifiers tab of the Graph Editor) which oscillates the Weight between frames 175 and 300 and was fine-tuned to release agents slowly by changing the Cycle Time and Wave Size. This causes the Agents to become "restless" and if they escape the influence of D/A#1 during the oscillations, they fly toward D/A #2. At frame 300, it stops and all remaining Agents go to D/A#2.

Or, you can manually keyframe the D/A#1 Weight envelope to come-and-go as approprate to releasing agents at the desired rate.

Good luck!
mTp

Norka
04-27-2016, 10:01 AM
Thank you sooooo much! I am going to play with this and report back in a while.

Norka
04-28-2016, 02:08 PM
Monroe, unfortunately that was not at all what I was shooting for. Ended up going with an Avoid Director ball causing instances to explode away from logo, which, in the end, is cooler looking and was quite easy to do. I was still able to learn some stuff from your example. Though, you had everything bass-ackwards (generator in center view etc). ;-) Thanks again.

MonroePoteet
04-28-2016, 02:24 PM
OK, glad you got it working the way you want. It was only intended as a sample scene for the "gradual departure" technique, which is how I (mis?)interpreted your original post: "I would like them to leave D/A # 1 at a slower rate, kind of like the generator spits them out."

mTp

Norka
04-29-2016, 01:40 PM
Okay.. Just sent final off to client.. but it is Friday afternoon, and I feel like playing with this a little more. I just tried baking instances, to see if I could export them as fbx or alembic in the state that they are at frame 200, and bring back into a new scene, then hit instances (now objects) with bullet fx forces... Long story short, this is not going as planned... Is this even possible? Like if you had a flock of birds (*any instances using Flocking) that you wanted to export their state at a certain frame and be able to bring that frozen flock into a new scene, to use Bullet on them (which does not appear to work with instances).

MonroePoteet
04-30-2016, 04:24 PM
I've successfully used Mike Green's Bake Selected Instancers Python script to bake instances at a particular frame:

https://www.lightwave3d.com/assets/plugins/entry/bake-selected-instancers/

It does not bake any sort of morph, transforms or other mesh distortions other than position, rotation and scale. It creates copies / clones of the geometry being instanced at the X,Y,Z,H,P,B of the current frame, with a Frame 0 key at the position of the base object. I then re-parent the cloned geometry to a Null, get rid of the Flock and Director, re-key frame 0 to the frame I captured for all clones, and then apply Bullet.

mTp

Norka
05-03-2016, 07:50 AM
Thanks so much Monroe! I was able to bake at frame 200 just like I wanted with Mike's script. Nice. I have to jump on something else for now, but I will come back to this asap and see if I can successfully hit my stuff with Bullet... But dang, things do slow down bigtime when you have 2000 baked instances (now objects) in scene! Maybe LW Next will make this child's play...