Page 1 of 1

Removing mesh stain (Use bleach?)

Posted: Sat Mar 17, 2007 12:18 pm
by Killswitch
I searched around and couldn't find any info. Is it possible to remove mesh stains caused by blood/fire/explosions? (Just for a certain area.)

One possibility I was thinking (though haven't tried it yet) is having a model animation. The first frame would be no model at all (Ok, really a model with no triangles). The second frame could be a model that removes all mesh cells. Then with scripting, make the animation go to frame 2 then back to frame 1. I'm guessing this would "reset" the mesh with the original colormap (although I'm just assuming - it could just reset the mesh with stains). Of course, this would have to be in such a way that the player wouldn't see the change (or the potential "hall of mirrors" effect).

Or does someone have an easier/better idea?

Posted: Sat Mar 17, 2007 1:55 pm
by Graydon
I'm quite sure if you used that method you'd just reset the mesh with stains. There's only a couple of ways I can see going about this, one more practical than the other.

The first, poorer idea, is to re-index you colourmap at 256 colours. This should effectively remove all 16 colour slots for mesh stains, and explosions and scars _shouldnt_ mark the mesh. However this is meshwide, not area specific.

Here's the second idea, and it revolves around the fact that you dont have any water on your mesh. You create a media type that doesnt wobble, doesnt reflect, doesnt splash. You set the area in question as media. You'd have to edit any explosive projectiles that would otherwise be extinguished, to not extinguish, but 'water' cant be stained, so I figure that'd be your best option.

Posted: Sat Mar 17, 2007 1:59 pm
by ozone
Well you may be able to paint the TERRAIN as media without it actually being set as media on the reflection map...

***EDIT:hmm nope just tested this...doesnt work

Posted: Sat Mar 17, 2007 3:31 pm
by Fury IX
Maybe you could make a projectile that stains the mesh grass green and have one explode on an area of bloody grass, overstaining the blood. I have no idea if this is possible...

Posted: Sat Mar 17, 2007 5:34 pm
by Killswitch
It's not that I don't want stains. I do want the ground riddled with burn marks and blood. I just need the mesh reset to original colors at a certain time.

Fury, that sounds like a possibility. Hmm...

Must try trial and error.

Posted: Mon Mar 19, 2007 6:22 pm
by Datax
I don't think the effect you're trying to accomplish is possible. Once the mesh is stained, it's stained until you reload the map.

There may be a trick you can use to work around it. One might be to use a grass-green for the blood color and then "paint over" the stains in a given area with blood (though it would make other battles look very strange). Another would be two switch between two visually identical areas of the map with an OBMO. Another might be to substitute projectiles with very carefully chosen graphics (the image of a stain rendered at the right scale and angle) for stains, and then delete them with the usual tricks.

Without more information about the context of your map, I don't know whether to recommend any of these. From what little you've told us, I'm going to go out on a limb and say the effect will be more trouble than it's worth, and that you should try to do without it either by disabling stains altogether or by putting up with the stains when you'd like to erase them.

Posted: Mon Mar 19, 2007 8:49 pm
by iron
If it suits the level, you could always divide your map (I'm presuming its a solo) into two levels. For instance, if the "resetting" occurs due to a time lapse, eg "six months later...", then having it load the map afresh in a new level could well do the trick. Also it lets you fit in more/better scripting with less chance of bugs.

Posted: Wed Mar 21, 2007 1:26 am
by Graydon
Or with magma's new limits, you could make two maps on the same mesh, two identical, side by side, and MoveMarker everything over (any relative body parts and whatnot)... Mimmick the displacement, terrain, reflection, and scenery, and you've essentially got yourself a fresh canvas to play with.

Posted: Wed Mar 21, 2007 11:19 am
by Killswitch
I think that may be the best way to go. The overhead map is not used so the player should not notice the "jumping" of location.