Saturday, August 16, 2008

Material Hit Effect

hi, this week i fix my projectiles hit effects so they support per surface material effect,
until now, i had only one impact effect per projectile for all surface types, this was very unnatural when you hit water surface because it was applied the same effect on it, so you saw decal rendered on the water, yes - very strange so now if you hit glass surface the effect will be different when you hit stone or liquid surfaces, depending on what you defined in the weapon script.
here is a screenshot that shows the effect on stone, glass surfaces:

left: stone hits, right: glass hits

3 comments:

Squid said...

Hi orenk2k (sorry I don't know your real name)! Your blog is very interesting to read and it seems your engine is becoming a real monster (in a good sense ;) ).
I interested in your delacs. How do you make them? Are they just a quad oriented parallel with the surface it's attached to? Or something more special?

orenk2k said...

hi, my real name is oren :)
as for the decals, they are just a rotating quads orthogonal to surface normal.
the extra feature that makes them "special" and perfectly on any surface (even curved one) is that they clipped against the surfaces touching the decal bounds.
you can make it by just looping the surroundings (which is very slow) or you can use some spatial representation of the scene like bsp, kdtree, octree etc, which is very fast.
of course you also need some fast polygon clipper, but that another issue.

Squid said...

Thanks Oren! :)