Damage Effects

Damage Effects

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Damage Effects

Post by bobthedinosaur »

How hard would it be to make some kind of shader that can overlay burn marks(like ground scars) to specific piece on the unit's model (s3o)?
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: Damage Effects

Post by bobthedinosaur »

is there a reason for no replies? ie: dumb idea, not interesting, can not understand, ect... ?
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Damage Effects

Post by Warlord Zsinj »

I remember suggesting something similar a little while ago.

Infact, what I wanted was a damage system that would slowly increase the opacity of a 'damaged' overlay texture, and then when health =0%, the engine would stop the unit, play an explosion, and then simply display the overlay texture at the maximum opacity (80% or whatever). So, unless you specified a custom one, we would have engine created dynamic corpses, which would be pretty cool, imo.

Lack of answers is most likely due to lack of enough interested people to help out. There's not many people who can do this sort of thing, and most of them are otherwise engaged, I suspect.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: Damage Effects

Post by bobthedinosaur »

not a bad idea, that way the turrets or other peices of some units will retain their last angle so they look more natural
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Damage Effects

Post by Das Bruce »

Dynamic corpses would be nice but that isn't going to be the best way to go about it, a lot of them would look silly without deforming or at least moving the model around, dead peewee standing up?
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Damage Effects

Post by Warlord Zsinj »

I think it'd look fine to see dead peewees standing up, but yeah, as I said, there's nothing stopping people from putting custom wreckages in as is currently the case. For the majority of units, especially buildings, tanks, etc, it'd look great.

Also, with that system you could animate in a certain behaviour that only occurs when the unit is killed that makes it fall over (death anims are already possible), and then the engine takes over and freezes it + colours it at the end point. So you just pose the corpse as part of the animation, rather then having to import a totally new model + texture, and it's no problem at all to have the death anim end-point and model line up, because the engine is doing that all for you (currently it is very difficult)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Damage Effects

Post by Argh »

Doing this is really very easy, so long as you don't want a "damage effect" that's super-specific to the impact, etc. And the CPU costs would not be extremely heavy. I should probably put a demonstration of this into World Builder, if I can find the time.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: Damage Effects

Post by Pressure Line »

as long as you dont do it like MW4 bob, and make it so that units just start turning black from weapons fire :/
Archangel of Death
Posts: 854
Joined: 28 Jan 2005, 18:15

Re: Damage Effects

Post by Archangel of Death »

@Pressure Line: The only practical choice is to overlay a texture (eg: MW4's black scorches). Sure, it might be possible to come up with a better looking texture to overlay (maybe, it can't just look good on its own but also along the shift from not there to there, at different sizes, and when in surrounded by other ones), but doing anything fancier (I'd love actually having modeled internals and plating with piece by piece destruction!) it just takes too much power for an RTS.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Damage Effects

Post by Argh »

No problem, it'd just show "dents" and "scratches". Making it specific on a per-unit basis would be a more of a big deal, of course, but who really wants to bother with that anyhow?
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Damage Effects

Post by Warlord Zsinj »

Could be interesting to get some sort of more advanced layer interaction rather then simple transparency, such as a hard light / multiply type filter - but I don't know how complicated that would be to do on a per-unit basis.

vaguely relevant google search result

You'd be able to have a situation where you'd be creating scars on a unit that are very strong, without having the texture replace the other texture.

Another option is to allow an alpha layer on the overlay texture, but I think using a proper filter while harder to control would produce much nicer results...
Post Reply

Return to “Lua Scripts”