Anim8or Community

General Category => General Anim8or Forum => Topic started by: TheRetroZombie on December 05, 2009, 09:34:49 pm

Title: flashing lights...
Post by: TheRetroZombie on December 05, 2009, 09:34:49 pm
I want to be able  to make flashing lights, like a gun firing, in a animation.
Title: Re: flashing lights...
Post by: lucasfilmer on December 05, 2009, 11:01:50 pm
do you want to be able to do it in anim8tor? because i have some awsome video software
Title: Re: flashing lights...
Post by: ENSONIQ5 on December 06, 2009, 12:07:20 am
Light brightness and colour can be keyframed like any other light attribute, so building a light that flashes is pretty basic.  A better way of controlling this would be with a script, since this would allow you to adjust the flash timing.

However, lights themselved are not rendered, they just affect objects around them.  To build a weapon flash effect create an object in the shape of the flash, give it a strong emissive value in a bright yellow or orange colour, and keyframe (or script) its 'Visibility' controller to match the flashing light.  With both a light and a glowing object animated to 'flash' in unision it appears as if the glowing object is illuminating the surrounds.

Place the light in the same physical space as the flashing object, so the illumination looks right, but make sure you uncheck the 'casts shadows' attribute of the object, so it doesn't block the light.  A little experimentation and fiddling of colours and other light settings will be required to make it look right.

Having a couple of slightly different shaped 'flash' objects, triggered apparently randomly, will give a more realistic appearance to the effect, since no two flames (or plasma flares) will be identical.
Title: Re: flashing lights...
Post by: TheRetroZombie on December 09, 2009, 09:20:27 am
ok. I just want a simple flashing light. I know how to cast shadows and stuff. Just want to know how to make the light flash. So all i do for each keyframe is to turn of the shadows and turn them back on in the next keyframe?
Title: Re: flashing lights...
Post by: Alpha2 on December 09, 2009, 05:44:08 pm
You trying to make a muzzle flash.

The light you create at the end of a weapon is just going to be that, light. It will have no physical existence. so you have to create the shape for your muzzle flash with polygons, place it in the scene in front of your gun and turn off the "cast shadows" then for each frame of the flash you have to turn on and off not only the light but the visibility of the polygon.

That's how I understand it. Kinda makes things difficult because it means if your character/weapon is moving as it fires you have to re position the muzzle flash and light for every frame that it fires as it moves.
Title: Re: flashing lights...
Post by: ENSONIQ5 on December 09, 2009, 08:36:17 pm
Setting the gun as the "parent" of the muzzle flash object eliminates the need to reposition the muzzle flash object.  The object considers the parent object's position (and orientation if set up this way) as the object's zero point, or origin.  Animating the position of the flash object will move it relative to the parent object, rather than to the "world".
Title: Re: flashing lights...
Post by: TheRetroZombie on December 10, 2009, 09:14:39 am
k, thanks guys.
Title: Re: flashing lights...
Post by: Alpha2 on December 10, 2009, 04:52:50 pm
Ensoniq5 I'm not sure I understand that.
Let's say you have a character, and the gun is a separate element. I dont see how you parent the gun specifically to the hand unless you attach it there in the figure editor, much less making the gun the parent of the flash so that it follows it.

Well okay I managed to make the gun the parent of my muzzle flash in the scene editor but I cant attach it to his hand.
Title: Re: flashing lights...
Post by: ENSONIQ5 on December 10, 2009, 08:48:10 pm
Unfortunately the parent/child thing can't be applied to a Figure's individual bones, only the whole Figure.  This does indeed mean that the gun's position/orientation will need to be individually keyframed, unless the bone in the Figure's hand is defined as the root bone, which could make animating the Figure rather awkward.  Unless anybody else has a workaround?
Title: Re: flashing lights...
Post by: ADSohr on December 11, 2009, 08:13:05 am
make the gun a separate object and make it the parent of the flash? then just move the gun so it follows the persons hand. this would give more flexibility in positioning the gun as well
Title: Re: flashing lights...
Post by: TheRetroZombie on December 11, 2009, 09:24:31 am
i think just make a moddle of the muzzle flash a seperate model. Make the gun attached to your model.
Title: Re: flashing lights...
Post by: Alpha2 on December 11, 2009, 12:31:22 pm
Either way forces you to reposition either the gun or the flash which gets excessive the more a character moves around. For example just having a character pick up his gun and fire from cover would have you plotting about a dozen points and then having to re-angle the gun on every one of those points and you'd still see frames of it clipping through the hand. You'd probably end up having to key frame every frame of the movement, that's way more work than it needs to be for such a simple action.

Seems to me it'd be easier to keep the weapon in the hand and just have the flash free float and appear in front of the gun when you fire. this way you only have to reposition it when it fires. It doesnt solve the problem and is still an annoyance, but after looking at any other ways of doing it it seems the lesser of the two evils unfortunately. AAARGGHH!!! Frustrating 
Title: Re: flashing lights...
Post by: ENSONIQ5 on December 11, 2009, 09:11:57 pm
There might be a solution using scripts.  It is possible to retrieve an object's attributes within a script and apply them to another object (which I assume is fundamentally how the parent/child relationship things works), and it might be possible to access a bone's attributes this way.  I stress the word MIGHT.  I will have a bit of a play with this and I'll forward the results shortly.
Title: Re: flashing lights...
Post by: hf003 on January 28, 2010, 01:51:10 pm
The real problem is that individual bones of a figure cannot be used as the parent for other objects that can be made invisible at certain times of the animation. I am thinking of a character that throws a ball, the ball would be in the hand for a short period of time. During that time, the ball should move along with the hand. When the ball is released, it should follow some other independent path. Here is what I did.

1. First, I created the ball as usual in object mode and converted it to mesh.
2. Then I made a morph target for the ball and called it "disappear".
3. I selected all points in Point Editor and shrunk the ball so small it disappeared off the screen.
4. I then went to figure mode and added the ball to the hand bone - positioning it where it would be when the hand is holding it.
5. Then I sequenced throwing the ball.
6. In Scene mode I first enabled the "disappear" morph target of the figure to make the ball disappear from the hand.
7. I then added another ball object into the scene and made it fly through the air along a path where it met up with the hand at some point in the animation.
8. Once the ball was in the hand, I reversed the "disappear" morphs for the two balls such that the boned ball is visible and the other ball invisible. Now the ball moves wherever the hand moves.
9. At the point where the ball is supposed to leave the hand, I again reversed the "disappear" morph targets of the two balls such that the ball can once again follow some independent path.

I used "Step" option when I added the keys to make the balls appear and disappear.

I hope this helps. Being new at using Anim8or, I cannot be certain this method is the easiest way of doing such a task.
Title: Re: flashing lights...
Post by: hihosilver on January 28, 2010, 09:51:00 pm
That is definitely the easiest method in my opinion.  Some people create 2 figures, but it's much more difficult that way, and your way is definitely the easier one.  Hopefully in future releases parenting objects to bones (or vertices!) will be implemented, but there is a very long list of desired features and we take them as we can get them!