Milkshape Animations
by Daniel Neilsen · in Artist Corner · 03/24/2003 (9:26 pm) · 38 replies
Hi guys,
I have done a couple of tutorials in milkshape animations using bones but I seem to be stumped on a couple of points that I thought someone might be able to help em out with.
1) Is it possible to change or alter a texture in an animation? eg. Could I change a brakelight texture to a different brakelight texture?
2) How do animations such as weapon fire flash animations get done? They have no physical parts so bones wouldnt work and the flash dosnt exist previous to the fire animation anyway.
If anyone can help (or even provide an example) I would be most appreciative.
I have done a couple of tutorials in milkshape animations using bones but I seem to be stumped on a couple of points that I thought someone might be able to help em out with.
1) Is it possible to change or alter a texture in an animation? eg. Could I change a brakelight texture to a different brakelight texture?
2) How do animations such as weapon fire flash animations get done? They have no physical parts so bones wouldnt work and the flash dosnt exist previous to the fire animation anyway.
If anyone can help (or even provide an example) I would be most appreciative.
About the author
#2
What I am calling the weapon "flash" is the yellow star shaped fire that spits out the end of the gun when it fires.
or maybe it is just scalled down really tiny and when the weapon shoots, it is scaled up to proper size?? (can you change the scale of things between frames??)
03/24/2003 (10:52 pm)
I think I can handle number 1 now, thanks to your explanation but I am still not sure what to do for number 2.What I am calling the weapon "flash" is the yellow star shaped fire that spits out the end of the gun when it fires.
or maybe it is just scalled down really tiny and when the weapon shoots, it is scaled up to proper size?? (can you change the scale of things between frames??)
#3
03/24/2003 (11:17 pm)
Yes, you can rescale things from frame to frame, but I dont thing thats what you need to do, Im expeirmenting with lights now for you.
#4
2. you can set keys for lights so the light is off until a certain frame, then it is on, then at the ending frame is off again.
3. texture the muzzle object with a flame or orangish sparky looking texture and a transparency map. you could also make it emissive (the value which makes it glow, not sure what its called in milkshape)
4. add light- spot- (or local) set it Relative to - facing other- other: object1(whatever the flash object's name is)
Set the size of light to just that object.
Give that a try
03/25/2003 (12:35 pm)
1. Make a muzzle shaped object to be used as the gun flash.(object shaped the way the flashes coming from a gun look)2. you can set keys for lights so the light is off until a certain frame, then it is on, then at the ending frame is off again.
3. texture the muzzle object with a flame or orangish sparky looking texture and a transparency map. you could also make it emissive (the value which makes it glow, not sure what its called in milkshape)
4. add light- spot- (or local) set it Relative to - facing other- other: object1(whatever the flash object's name is)
Set the size of light to just that object.
Give that a try
#5
03/25/2003 (12:40 pm)
The Muzzle Flash is a sprite that you have to associate with an interation point on the model. I doubt that's the exact term but theres some sort of "attachment" point where that flash would be located, then in your coding somwhere, you would have to specify that given sprite would be used when the firing action takes place. Now this all is based on my knowledge of making Half-Life mods.. so I dont know how up-to-date those methods are, nor how accurate they really are, but that may help some
#6
@Chris: Have you actually done this in milkshape mate? I didt even know you could add lights in milkshape. I cant seem to find any command to do so?
Do you (or anyone else) happen to have a basic example you could email me? (mailto: dneilsen@ozemail.com.au)
03/25/2003 (12:57 pm)
@Ken: Dosnt work that way in TGE. At least all the models I have ever seen have got a fire animation and the flash is part of that animation.@Chris: Have you actually done this in milkshape mate? I didt even know you could add lights in milkshape. I cant seem to find any command to do so?
Do you (or anyone else) happen to have a basic example you could email me? (mailto: dneilsen@ozemail.com.au)
#7
03/25/2003 (3:33 pm)
oops, i assumed you had lights in milkshape. ill make an example and send it to you when i get a chance, probably not till tomorrow though cuz i have a bunch of home work
#8
03/25/2003 (3:42 pm)
Thanks chris,
#9
03/25/2003 (4:08 pm)
Chris could I have those examples also?
#10
03/25/2003 (4:29 pm)
sure thing, np daniel
#11
To do a muzzle "flash" you can either attach and trigger a particle emitter in script as is done with the "rifle" in the demo.
Or you could scale the "flash" in the animation program across one or two frames to make it only visible sometimes.
Basically make the "flash" polygon however big it needs to be and then scale that polygon down so all the points overlap thus making it "dissapear" and then when you scale it back out it re-appears. typical "old school" trick for hiding and showing things from way back.
Personally I would use the "bolt on" technique and animate the "flash" as a separte .dts shape and attach it to the muzzle point via script that way you can share the "flash" amoungs models easier. Combined with a particle emitter at the same spot it makes a pretty convincing effect.
03/25/2003 (4:35 pm)
Torque supports something called "VISIBILTY ANIMATION" but only in the 3DStudioMax version of the exporter.To do a muzzle "flash" you can either attach and trigger a particle emitter in script as is done with the "rifle" in the demo.
Or you could scale the "flash" in the animation program across one or two frames to make it only visible sometimes.
Basically make the "flash" polygon however big it needs to be and then scale that polygon down so all the points overlap thus making it "dissapear" and then when you scale it back out it re-appears. typical "old school" trick for hiding and showing things from way back.
Personally I would use the "bolt on" technique and animate the "flash" as a separte .dts shape and attach it to the muzzle point via script that way you can share the "flash" amoungs models easier. Combined with a particle emitter at the same spot it makes a pretty convincing effect.
#12
As I only have the one weapon in the game I can just put it into the model file so it should be a nice simple procedure.
I dont suppose you have an example I could have a look at? I have tried a few animations but have not been able to figure out how to scale things. I can move things with bones, but thats about it.
03/25/2003 (4:40 pm)
ok that sounds like what I need to do Jarrod.As I only have the one weapon in the game I can just put it into the model file so it should be a nice simple procedure.
I dont suppose you have an example I could have a look at? I have tried a few animations but have not been able to figure out how to scale things. I can move things with bones, but thats about it.
#13
03/25/2003 (6:12 pm)
to scale in animation set a key frame when an object is scaled down then set another key frame with it scaled up. im not sure if you can do that with milkshape though
#14
03/25/2003 (6:21 pm)
It didnt seem to work when I tried it but, I may have been doing something wrong.
#15
03/25/2003 (6:28 pm)
well I don't use Milkshape, I am a LLLLLOOOOOONNNNNNNNNGGGGGG time Lightwaver circa 1990 era . . . I have looked at Milkshape a few times and the interface is just so klunky I never really got very far . . . Good Luck.
#16
03/26/2003 (5:32 pm)
what about the rifle in the demo, can you use that to see how it is? I cant get my lighting to work right for some reason now
#17
Its essentially a basic shape with a couple of nodes.
03/26/2003 (5:35 pm)
From memory, it dosnt have a fire animationIts essentially a basic shape with a couple of nodes.
#18
03/27/2003 (3:37 pm)
ok, ill try to get it to work, im off of school for a week so ill be able to, hopfully by tomorrow tho, srry for delay
#19
If I cant get it to work I may have ot use particle effects for the weapon flash but it wont look as good.
I dont want to have to learn 3dSMax and I cant afford it anyway
03/27/2003 (3:43 pm)
Thanks for your persistance Chris.If I cant get it to work I may have ot use particle effects for the weapon flash but it wont look as good.
I dont want to have to learn 3dSMax and I cant afford it anyway
#20
You can model two of the same thing and just swap them in animation. For instance:
1. Make a brakelight (box).
2. Duplicate the box and then hide the duplication.
3. Texture one box as the 'off' brakelight and texture the other as the 'on' brakelight.
4. Just hide one and reveal the other in animation.
You can tackle this in the same manner. Just hide the muzzle flash in the first key frame. Then unhide it and do an expanding (or rotating) animation for the others. Don't make the muzzle flash too sophisticated as the transparency won't sort and it'll look ugly. Just a flat dual sided plane should work well.
03/27/2003 (3:49 pm)
Quote:1) Is it possible to change or alter a texture in an animation? eg. Could I change a brakelight texture to a different brakelight texture?
You can model two of the same thing and just swap them in animation. For instance:
1. Make a brakelight (box).
2. Duplicate the box and then hide the duplication.
3. Texture one box as the 'off' brakelight and texture the other as the 'on' brakelight.
4. Just hide one and reveal the other in animation.
Quote:2) How do animations such as weapon fire flash animations get done? They have no physical parts so bones wouldnt work and the flash dosnt exist previous to the fire animation anyway.
You can tackle this in the same manner. Just hide the muzzle flash in the first key frame. Then unhide it and do an expanding (or rotating) animation for the others. Don't make the muzzle flash too sophisticated as the transparency won't sort and it'll look ugly. Just a flat dual sided plane should work well.
Christopher Braun
1. Not possible but you can change to another copy of it thats textured differently in the next frame. Or, if it were a brakelight, you could turn a light on and off behind a semi transparent material.
2. Gun flashes can be done by shining light onto a transparent surface thats shaped in different ways(ex. half a sphere)but when you put the light on it, put it right up to it, not from a distance. This will make the object its shining onto distort the light. Ill expieriment some and tell you what I got to work best for a gun flash.
Also, for brakelights I believe you could set up a bone that had the second object that was textured differently connected to its end so it could be hidden in the main object(car for example) then spun around to replace the other one, while the other one (the other brake light) is spun into the car to be unseen, that would make it look like it changed texture. Just make the movement all in 1 frame so when viewing it it happens instantaneously and not over a slow period. If any of this was confusing let me know and I will try to clarify.