PDA

View Full Version : Basic Butterfly



KeenanCrane
09-18-2003, 09:52 AM
I'm trying to do something really simple - I have a butterfly made of two polygons (in separate layers) and I want to be able to rotate one of the wings and have the other one rotate the same angle.
Any ideas?

Keenan Crane
[email protected]

KeenanCrane
09-18-2003, 10:08 AM
Ok, I solved this problem using "follower." Now my question is - how do I create multiple instances of my butterfly with all the properties still in tact? If I try "cloning" it just clones the current layer.
Thanks,

Keenan Crane
[email protected]

meshmaster
09-18-2003, 10:25 AM
go to another layer and import into that layer... or deselect all on the layer, copy go to another layer and paste.

KeenanCrane
09-18-2003, 10:52 AM
Sorry, I meant in layout. I'm trying to replicate the heirarchy of object layers in the layout so I don't have to set up the motion parameters for each instance of my butterfly.

It turns out "Follower" doesn't work quite right, either. While the left wing does follow the orientation of the right wing, it doesn't work out when I try to then rotate the whole butterfly in another direction (the wings no longer connect).

Does Lightwave layout have a way to "group" objects so that you're transforming the coordinate system of the group and not individual members? Or what's another solution?

Thanks,

Keenan Crane
[email protected]

jb_gfx
09-18-2003, 11:31 AM
You need to have a correct hierarchy organisation!

I like to set it up directly in modeler so it's easier to manipulate my objects at a later time.

Assuming you have your butterfly composed by 3 parts, body, l_wing and r_wing. In modeler you open the layer windows and parent both wings' layers to the body. While you are at it give them correct names that will help to keep your scene clean.
Still in modeler you place your pivot points at the correct place for each layers (look for center pivot at www.flay.com it is very helpfull for that).

Now when you load your butterfly in layout, both wings are parented to the body so no matter how you'll animate the body the wings will follow correctly (even if they have follower applied).

When you add the follower to one your wing, be sure to uncheck follow for every axis/angle you don't need. Normally you uncheck everything except Bank angle.

To clone one butterfly with all it's properties just select the main parent of your hierarchy (body) and use the "Clone Hierarchy" plug-in (Layout > Plugins > Generic Plugins > Clone Hierarchy).

NOTE: If you already animated the wings when you clone the hierarchy the animation will be cloned too so you just need to offset and/or scale it a bit in grapheditor..

KeenanCrane
09-18-2003, 11:57 AM
Thanks, that's helped a lot.
One problem - when I try to run Clone Hierarchy I get the error message "Line 38, illegal index value [0] provided." I have the parent in the hierarchy selected as you said. Any idea why this is happening?
Thanks again,

Keenan Crane
[email protected]

P.S. I also had trouble renaming the object layers. In the Scene Editor the option to rename the layers is grayed out. I can rename lights and cameras, however.

jb_gfx
09-18-2003, 12:33 PM
Hum strange I never got into this error.

As for renaming layer in layout you could try the rename item function (Items > Replace > Rename Current Item). To tell you the truth I never use these functions since I setup my names and hierarchies directly in modeler.

If you want you still can send me your scene + objects and I'll try to see where the problem come from. Just tell me and I'll PM you my email address.

Rory_L
09-19-2003, 12:45 AM
You can always do a load-from-scene to get another copy. Or you could do it with particle replacement.

Cheers,

R

iluvatar
09-19-2003, 05:50 AM
i once created a swarm of 250 swimming fish... made one fish, created a nice swimming effect with some expressions i think, opened up the motion panel for the fish and set heading and pitch to "align to path" so he always swims forward ;) now the great trick: create a particle emitter, put 250 particles at once in a frame, and use fxLinker to put a fish (or butterfly) on all particles. using some weird options at the particle emitter will hold the particles when moving the emitter, so they all move together... now because heading & pitch of the fish is taken from the path it moves, it auto-aligns to the path of the emitter... you can of course move the particles around with wind and other effects!

iluvatar
09-19-2003, 05:51 AM
forgot to tell the most important :p the fxLinker will copy the object for each particle, including all options applied to that object, so expressions / plugins etc etc...

ps: I don't know the follower plugin, but I would use an expression on one of the wings to make it move (use a sin-function or something) and on the other wing an expression to mirror the movement of the first...

pps: to solve the layers-problem: put the whole butterfly in one layer and use morph targets to let it fly... morph targets ARE copied by fxLinker!

KeenanCrane
09-19-2003, 10:08 AM
Originally posted by Rory_L
You can always do a load-from-scene to get another copy. Or you could do it with particle replacement.

Cheers,

R

This did the trick - thanks!

Keenan

KeenanCrane
09-19-2003, 10:11 AM
Originally posted by iluvatar
i once created a swarm of 250 swimming fish... made one fish, created a nice swimming effect with some expressions i think, opened up the motion panel for the fish and set heading and pitch to "align to path" so he always swims forward ;) now the great trick: create a particle emitter, put 250 particles at once in a frame, and use fxLinker to put a fish (or butterfly) on all particles. using some weird options at the particle emitter will hold the particles when moving the emitter, so they all move together... now because heading & pitch of the fish is taken from the path it moves, it auto-aligns to the path of the emitter... you can of course move the particles around with wind and other effects!

Yeah, particle systems are definitely the way to go with flocks like this. I wonder if anyone knows of one that specifically does flocking/"boids" behavior (instead of more random particle motion)? I've written one in C++, but I've never learned LScript.
Thanks for the ideas,

Keenan

iluvatar
09-22-2003, 01:03 AM
as english is not my language, so could you (or anyone else) explain what flocking/"boids" behavior is? if this is the way a real swarm of fish swims, i had one ;)

KeenanCrane
09-22-2003, 10:55 AM
Originally posted by iluvatar
as english is not my language, so could you (or anyone else) explain what flocking/"boids" behavior is? if this is the way a real swarm of fish swims, i had one ;)

Here's the page of the guy who came up with the method:

http://www.red3d.com/cwr/boids/

There are a lot of ways to model flocks. This one's pretty cool because the flocks are autonomous, but still fly around obstacles intelligently, etc.

iluvatar
09-24-2003, 02:07 AM
aaahh... nope, hadn't had the time to program that one :p but I've heard about it before, and seen the animations before, but didn't remember the name "boids behaviour"... but is this really so hard to program?

KeenanCrane
09-24-2003, 07:20 AM
Originally posted by iluvatar
aaahh... nope, hadn't had the time to program that one :p but I've heard about it before, and seen the animations before, but didn't remember the name "boids behaviour"... but is this really so hard to program?

Not at all, I just haven't learned LScript :p
Maybe someone's already done this for Lightwave?