Title: A suggestion on how to make the flamethrower. Post by: sp0kelset on February 15, 2006, 10:34:28 PM This isnt a very public related thread as im not wanting replys from "un-experienced" with source.
The thing is, I got an idea how we should make the 'flame'' of the flamethrower and I must write it all down so that others will understand its beauty. And so we can discuss it properly. Source works that way that if an animation that leads to another and dont stop on the same place(location) as the first it will do a little auto-animation so it dont just pops there as in other old games, it smoothly moves to the next animation. As my picture shows, from the end of the "attack1" animation to the beginning of the "idle01" animation: (http://www.skreck.com/files/animationhl2.jpg) By making a 3d cylinder, shaping it as a flame and colouring it yellow we will have our flame: (http://www.skreck.com/files/flame1.jpg) Just that its not going to be animated, and theres the tricky part... This grey lines represent the bones which the flame-model will have: (http://www.skreck.com/files/flame2.jpg) By making a small animation on 8 frames where each fram will represent one direction, fram1: up left, frame2: up middle, frame3: up right, frame4: middle left, (This one, which would be the fifth: the player aint moving his sight, meaning he's not looking around so the middle-middle animation will have an own idle animation that makes it look like a burning flame) frame5: middle right, frame6: down left, frame7:down middle, frame8: down right. (http://www.skreck.com/files/frames_expl.jpg) As the player is moving his aim in a sertain direction the 'code' will play a sertain frame of the flame-animation. For example: if the player would move his aim to the top right the animation thats played would be: "frame6: down left" But only while he is moving. when idling again the idle animation would be looping (if he's holding the trigger in that is). And for more visual effects there should be smoke in forms of particles that spawns all over the flame and hovers upwards rather violently. If there is some uncertanty I will try to explan, the risk that i forgot something while writing is quite big :P ps. the pictures wasnt really something I put any effort in... Title: A suggestion on how to make the flamethrower. Post by: Typheron on February 15, 2006, 10:49:28 PM its the modeling of what is effectibly a huge model flame for the 3rd person view.
it would need a "expanding" model where it would initally fire and a "burning out" model when you stopped firing as well as the main model, animated to move as you move and look arround. there are possable problems with looking and the direction of things, but im not sure how the source engine works with these things. Title: A suggestion on how to make the flamethrower. Post by: ChromeAngel on February 16, 2006, 09:05:16 AM There is also the issue that if you stand close to a wall and use your flamer the flame model will stick through the wall. Nice try.
Title: A suggestion on how to make the flamethrower. Post by: sp0kelset on February 16, 2006, 12:05:40 PM It could be tracing as far as it is and if there's a wall inbetween it could bend or shrink.
The expanding and burning out part isnt that hard really. Title: A suggestion on how to make the flamethrower. Post by: migb on February 17, 2006, 04:26:37 PM The solution has some issues. I don't know how people usually does flames in source, so I can't say whether your solution is better.
The model/animation solution is fine as long as you are fireing without hitting anything. But if you hit a wall, or a player, the flame will bend or wrap around the target. The 'shrink the flame-solution' would make it appear as is the flame disappears into or is absorbed by the wall. Maybe some ragdolling could be applied to the flames? Having 5 invisible balls in the flame, that controls how the flame bends. Title: A suggestion on how to make the flamethrower. Post by: sp0kelset on February 17, 2006, 08:46:01 PM so since when do you have any source experience migb?
Title: A suggestion on how to make the flamethrower. Post by: Rebellion on February 18, 2006, 09:27:42 AM Why dont you just use the HL2 flame? Or is there a problem with that?
Title: A suggestion on how to make the flamethrower. Post by: migb on February 18, 2006, 11:48:12 AM Quote from: "CyberMan" so since when do you have any source experience migb? I don't have SOURCE experience, but I have a lot of CODING experience, so I know that your flamer-solution will get into problems as soon as the flame hits anything. And that is why I asked if the ragdolling could be used, I didn't said it could. :roll: Title: A suggestion on how to make the flamethrower. Post by: DJ Arendee on February 19, 2006, 08:30:26 PM Ever see the flame in Unreal 2? So far using sprites that move along the wall seems to be the way. But unreal 2 had the flamethrower capacity built into the engine so it wouldn't lag online. I have no Idea what it will do to hl2. Hl2 has steam entities and smokestacks, so flames might not be that big of a problem. All you would need to do is make the steam entity work and move along the contour of a wall.
Title: A suggestion on how to make the flamethrower. Post by: migb on February 19, 2006, 09:37:53 PM I think the solution would be based on shooting multiple physic objects.
Each object could be represented by a sprite, as DJ was suggesting, or by a polygon flame. By using the in-game physics to make the flames rise in the air and bounce off walls, we would get a quite nice flame effect. :) But lag might be an issue, if lots of physic objects are needed to create a neat flame :( It is actually rather pointless to discuss coding here on the forum. The discution really belongs somewhere like http://www.hl2coding.com Title: A suggestion on how to make the flamethrower. Post by: Typheron on February 20, 2006, 11:58:29 AM problem with that is the enevitable lag that it produces, th more crap you have flying arround, the more lag you get.
Title: A suggestion on how to make the flamethrower. Post by: zenarion on March 16, 2006, 10:57:00 PM cant you make a flamethrower that actually works like a real one? or at least looks like it?
what i mean is it will shoot blobs of burning liquid that get stuck to things and burn. they do not have to be physic entities, just blobs that follow a certaing path at first, then get stuck to stuff. if they dont get stuck to anything close enough, they become falling entities, and fall until they reach the nearest brush. Title: A suggestion on how to make the flamethrower. Post by: The Vastator on March 17, 2006, 02:02:12 PM what? a real flamethrower "fires" a combustible liquid that gets ignited by a flame on the flamethrower...
Title: A suggestion on how to make the flamethrower. Post by: migb on March 17, 2006, 04:37:56 PM Quote from: "zenarion" cant you make a flamethrower that actually works like a real one? Short answer: No. Long answer: I really don't think Source supports animation of liquid that burns up while moving. It actually don't support liquid physics at all. The closest thing would be to make the weapon shoot liquid drops = physic balls which has a flame-animation stuck to it. Or to have a big flame that somehow changes shape depending on where the liquid drops are. But both solutions requires multiple physics calculations, which will cause the game to lag. And that is why CyberMan's solution probably will win out in the end. |