Jump to content

(Generic) [Discussion] Prop DemolitionSystem


Radagast.
 Share

Recommended Posts

I currently wonder about if it's possible to create a damage effect with attaching/detaching props only, may also be animation props, e.g. a wall crumbling.

Then we could either make the building/wall sink a bit into the ground ... or we make the complete upper part of buildings props, so that the roof could be removed, the battlements could be smashed ...

A formula example:

#props_still_propped = round(current_condition_of_entity * #props_total / 100%_health_of_entity)

e.g. consider 1 base obj + 1 prop object (the parapet) + 1 more prop (the battlements) (3 objects in total):

Once destroyed by 1/3 then the battlements get first replaced by the crumble-animation variant, then removed completely or even better make the crumble animation end with stones scattered across the ground (so no final remove is necessary until the building is build up agian. Of course this would not allow for stones being put to use in other places [for now].)

If the wall's condition is down to 1/3, then the 2nd prop is removed, i.e. replaced by the parapet-destruction animation.

On repair and buildup (along foundations) this process is then reversed.

Consequences:

Each upper-building or generally each entity attachment prop would need a build-up and crumble-animation then unfortunately (physics are not possible as it would require the entities to consist of many small objects, resulting in much too high polycount). Though I think we don't need animations necessarily at first. We could go with fire and smoke at first only. (those already get added for a short time on projectile impact, so no need to mod this, though I don't know if catapult fire is shown in buildings or ON buildings as we don't have walkable meshes). Then we can start adding the crumbling animations, for upper-building-attachments, i.e. props.

Related Patches:

#2243 Damage of Buildings (I would not limit it to buildings though. Why not generally entities, why should a tree not catch fire?)

#131 Allow actor changes on tech research. (as those changes has to be accounted for by the formula)

Also look at Stronghold II's image gallery.

Pyrogenesis is looking better by the fact alone that buildings are not strictly aligned with the same rotation. Once we have the unit scale variation patch of Sander in, it will probably be more and more tempting to not develop but actually play the game.

Hopefully the prop system can bring terrific demolition effects with few extra artistic workload.

Edited by Hephaestion
Link to comment
Share on other sites

Nice so we could have something like the total war series and even make the wall crumbles the only way to access a fortress like sanderd said the aim was that units may not be able to destroy walls. Don ´t know what he thought about buildings. But would be nice having units only interract with other units though we ´ll have to find a way to kick the @#$% of garisonned units. Maybe by pillaging buildings which would look nice if doors broke :)

About those scaling props does that mean we will be able to plant trees ? Like a prop scaling over time ? We ´ll need an animation for the timber man with waypoints but that could be awesome to implement because that would bring life to mini civs and allow some buildings like the blacksmith to be more living. Like in the settlers though units would be stuck in their buildings :)

  • Like 2
Link to comment
Share on other sites

Absolutely.

so we could have something like the total war series and even make the wall crumbles the only way to access a fortress like sanderd said the aim was that units may not be able to destroy walls. Don ´t know what he thought about buildings.

That's what I'd like too. Having units destroy walls is impossible already once we have the reworked armour-system.

Each upper-building or generally each entity attachment prop would need a build-up and crumble-animation then unfortunately (physics are not possible as it would require the entities to consist of many small objects, resulting in much too high polycount).

I must correct myself here, the build-up animation could be simply reversed too. This would look more realistic if units repair a wall .. and others destroy it at the same time. So the point-of-time/frame we are within the animation will be controlled.

This is what I like for the base objects at least. Or we simply stick with the come from the bottom .. it's quite cool already though at this point it will not yet have the top props like roof, battlements, .. attached, so it would look even more realistic.

For the roof and the battlements a separate and different crumble and build-up animation might be un-avoidable.

For the growing trees we could use the scale system Sander is working on if variation of the scale factor is possible with time. No idea which has better performance. Perhaps the animation, unless there isn't a loading data bandwidth bottleneck somewhere. As trees are not moving (as long as we don't want to include this too :D ) this might well be no problem.

In aoe 3 I was amazed by how the cannons blew the ships apart. Most of the time it was just triangles jumping out, so it was not very realistic, but it still brought something significant to the action.

Sound intresting too. Perhaps particles can fulfill this. Though having a generic plank and wood splint animation might be cool. We could prop it to wood-roofed houses too if hit by a catapult.

If we could scale props per object or on a per-prop-point basis, then we could scale the animation perhaps. So a bolt shooter will create less and smaller wood splinters than a stone-thrower of the mongols reusing the same animation as for the ships.

Link to comment
Share on other sites

I guess this can be done without much performance issues indeed.

But before we'd need to have "knockdown" animations (and maybe even "fly" animations if units are to be thrown through the air) as well as a system to handle this (I still don't see why it would be that resource intensive).

I think at least knockdown is planned (not sure).

The animations would be still a lot of work.

  • Like 2
Link to comment
Share on other sites

I guess this can be done without much performance issues indeed.

But before we'd need to have "knockdown" animations (and maybe even "fly" animations if units are to be thrown through the air) as well as a system to handle this (I still don't see why it would be that resource intensive).

I think at least knockdown is planned (not sure).

The animations would be still a lot of work.

Yup Indeed... But we would have to prop every building, making special foundations, walls, and roofs... also adding inside...

Absolutely.

That's what I'd like too. Having units destroy walls is impossible already once we have the reworked armour-system.

What about buildings ?

I must correct myself here, the build-up animation could be simply reversed too. This would look more realistic if units repair a wall .. and others destroy it at the same time. So the point-of-time/frame we are within the animation will be controlled.

This is what I like for the base objects at least. Or we simply stick with the come from the bottom .. it's quite cool already though at this point it will not yet have the top props like roof, battlements, .. attached, so it would look even more realistic.

For the roof and the battlements a separate and different crumble and build-up animation might be un-avoidable.

For the growing trees we could use the scale system Sander is working on if variation of the scale factor is possible with time. No idea which has better performance. Perhaps the animation, unless there isn't a loading data bandwidth bottleneck somewhere. As trees are not moving (as long as we don't want to include this too :D ) this might well be no problem.

Trees are moving ^^ with glsl ^^

Would be a nice addition to have timbermen buildings to explain why trees are sudenly growing back.

Sound intresting too. Perhaps particles can fulfill this. Though having a generic plank and wood splint animation might be cool. We could prop it to wood-roofed houses too if hit by a catapult.

If we could scale props per object or on a per-prop-point basis, then we could scale the animation perhaps. So a bolt shooter will create less and smaller wood splinters than a stone-thrower of the mongols reusing the same animation as for the ships.

I agree.

Moreover, maybe this should be discussed in the main forums not in the deepest of the mod section ?

  • Like 1
Link to comment
Share on other sites

I guess this can be done without much performance issues indeed.

Good, then we go this route.

But before we'd need to have "knockdown" animations (and maybe even "fly" animations if units are to be thrown through the air) as well as a system to handle this (I still don't see why it would be that resource intensive).

The mechanism we have already. The engine can even synchronise sounds to certain frames, that's really incredible. The Impact already leads to a unit losing health. So we simply check if
  • the unit is on a wall.
  • the projectile is a siege (big stone/bolt) and not a javelin, small stone or arrow.
Then we instead of wounding the soldier and playing the death animation, we play the fly animation (which also ends in the last frame with a pose that shows the unit laying on the ground). Also the unit will loose all health immediately. There is no wounded if you are hit by such big projectiles.

Me myself will try to help with the animations. It's enough to have two variants for units, so it's not too much workload as it's only for biped (currently there is only 1, though Mythos planned 2 more one stronger and one thin like a hair).

Yup Indeed... But we would have to prop every building, making special foundations, walls, and roofs... also adding inside...

The works related to the builing rework would significant. Despite mostly only having to separate upper and lower parts. Just like it is done for the units already that have the head separated.

If we have the tech patch of Sander in, we need to do this anyway. Then we can prop a tower onto a building by researching a tech. Or research a better or other kind of roof. So having the roof separate would be no bad thing.

The inside we could avoid by only giving the upper parts (=> the propped objects, i.e. the stones) the inside. The 2nd highest prop would get down with the base wall then step by step with decreasing health. Then in each lowering step we could add another prop as the previously one (parapet stones) is now laying scattered on the ground in its last animation frame.

So if another stone hits the wall again, we still had another animation for crumbling. If we could shift it, it would be even better.

We can go for the easier approach and not have the entire wall crumble first. Perhaps at a later point we will have/add ourselves the possibility to create an empty explosion animation just of bones. Then we could randomly populate the prop points with stones and this gave ultimate variation.

That's what I'd like too. Having units destroy walls is impossible already once we have the reworked armour-system.

What about buildings ?

Same is true for buildings. Walls are just an example.

Trees are moving ^^ with glsl ^^

If we create an actor for a tree and a treebeard mesh with animations, why should it not walk like other units. It's possible, 0AD is open source. Let's set us no borders.

Would be a nice addition to have timbermen buildings to explain why trees are sudenly growing back.

Don't reproduce trees in nature without those buildings? :D This could be an addon so. Still I plan on modelling reproduction /seeding of plants. The buildings could be units instead that take young trees from some places (where they have not enough light and are thus doomed anyway) and plant them where you wish. So a natural border might become possible. Also, if stones get a representation. (5 vertices each, a pyramid, for performance) the units could use those to pile up rocks where an attack is imminent.

The pathfinder will still collision avoid all objects. That's really amazing. This system of wildfire is highly capable.

In the old one there even were roads possible it's said somewhere. We can still have something like this by giving units an attraction to each other. Though first I would like to have changed textures where many many units walk over. (so each tile needs a up-counter that is decreasing by time - an ideal candidate for a circular buffer that gets filled in a constant interval even if no unit is passing over the world tile.)

Edited by Hephaestion
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...