Well, I'm in the middle of the process of creating the wreckages for SWS.
It really is a pretty awful job, having to make multiple-stage wreckages for every unit you have produced.
In order to speed up the process, I've worked out a means of using a number of premade 'scarred' layers, opacity and blending options to very quickly give premade textures a 'shelled out' look.
One thing I was wondering was whether it would be possible to make this process procedural-based within the Spring engine.
What this would mean would be to have textures overlayed (with a certain amount of alpha) on other textures when a certain event occured. This would work vaguely similarly to how groundscars are currently used on maps.
The result of this would allow me to make a handful of 'wreckage overlays', and then when units die, simply have the wreckage model load the original unit texture, and then overlay the specified 'wreckage overlay'. This would cut out a significant amount of workload from my end, as well as reducing the processing-hit in terms of simultaneously loaded textures (as the overlays could be reused across multiple units), as well as reducing the filesize of my mod (~5-10 texture files compared to ~100).
An offshoot advantage of something like this would be the ability to have units dynamically show battle damage as the battle wears on. So, say you produce a "battle damage overlay" texture, when a unit/structure is at say, 90% health, the battle damage texture is overlayed on the unit/building at 10% opacity. (Ideally this damage would be optionally reduced/removed during repairs by working in the opposite manner)
That way, you would have a visual cue of how damaged units are, as well as having your battle-weary armies look battle-weary. I'm sure people can think of all sorts of other visual things to do if they have the ability to dynamically change textures according to in-game actions.
Please note that yes, I have investigated the possibilities of doing this in lua, but it seems that while vaguely possible, the efficiency of doing it so would make it unfeasible, making a hard-coded option preferable.
Wreckage Shortcut [texture overlays]
Moderator: Moderators
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Not directly related to the first post, but related to wrecks.
It would also be cool if wreckage 'inherited' relative piece positions and rotations of the base unit model when piece names match. That is, if the tank has a turret piece and the wreck also has a piece named turret, then wreck's turret should be turned to the same degree a unit's turret was when it died.
It would also be cool if wreckage 'inherited' relative piece positions and rotations of the base unit model when piece names match. That is, if the tank has a turret piece and the wreck also has a piece named turret, then wreck's turret should be turned to the same degree a unit's turret was when it died.