Jump to content

Recommended Posts

I've started experimenting with making blood issue forth when a unit dies. I've committed a map for testing, and I committed changes to the Marian Legionarius and the Persian Anusiya so that they show a blood decal when they die. Both use different prop points, however, for testing purposes.

The Marian Legion's blood prop point is his chest prop point. The Persian's blood prop point is the root prop point. Both options present a few problems. The chest prop point puts the blood in a good place, but then stretches it strangely and the blood decal wobbles all over the ground as the unit's death animation plays. The root prop point places the blood in spots that don't look right (usually at the unit's feet). Neither option randomizes the blood actor's texture as it should.

Play the Blood Demo map to see this in action.

post-130-0-82603900-1303446058_thumb.jpg

Link to comment
Share on other sites

Hmm, that is very odd it would do that. I suspect the location of the prop point is what is giving you grief - not the difference in the models themselves. I bet if you put the roman blood to root it would work like the persian.

I wonder though if there might be a better way to do blood though than using the prop system. Something more "hardcoded" because it is always going to apply to certain classes of units (unless you turn off blood in the game settings).

Trouble with blood is that if the prop was based on the unit's prop point of the chest - the chest isn't always going to be parallel with the terrain. The root is, and will likely always look ok - unless your on a hill with elevation. Problem with that is, in the death animation, the unit doesn't always land on the center of his root (which may or may not be acceptable - perhaps close enough).

I think other games use the feature Philip mentioned - http://www.wildfiregames.com/forum/index.php?showtopic=14515 - Terrain decals.

I would recommend that it could automatically be applied to the center of the bounding box of the mesh after death on the terrain.

Link to comment
Share on other sites

Fixed the stretching. (It didn't like rotation unless it was around the Y (vertical) axis). But it still wobbles as the associated prop point moves and rotates, since that's what decal props are meant to do.

I don't think the current decal system is particularly appropriate for this - it's designed for a small number of large decals attached to objects (i.e. the bits around buildings), whereas this is a large number of small decals that ought to be stationary. Also, maybe it shouldn't be a single decal per unit - a unit could randomly emit patches of blood every time it's hurt, and the blood disappears after some time that's unrelated to the lifetime of the unit. Similar things apply to other effects like footprints. Also the blood should probably be a graphics option, so players can disable it for performance or child-friendliness or German-censorship-compliance or whatever.

Maybe it could work better like this: Have a file defining a decal type (like "blood" or "footprint" etc), which specifies the texture and the decal's lifetime and what graphics options it depends on. Have actors specify a decal emitter of a particular type, which can be triggered by the animation (e.g. a certain point in the walk cycle) or by the simulation code (e.g. when getting hurt badly), and each time it's triggered it will create a decal of the given type at the current prop location. The decals will stay where they are until expiring.

This should provide more flexibility, and it can be handled much more efficiently by the engine - it doesn't need to maintain a lot of data for each individual decal, it can just build a big array of every single blood decal and render them all at once with very little effort.

(This decal type/emitter thing sounds quite a bit like particle types/emitters, which is not accidental, and it'd be nice to converge them in the future, but they probably won't share much code at first so I think it's better to design and implement them separately.)

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...