Sign in to follow this  

Questions about how to do decals (blast marks etc.) in a game engine.

This topic is 2953 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have questions about how to do decals (blast marks etc.) in a game engine. Basically I need to have bullet holes, blast marks, blood splatters etc. happen in real time and am having difficulties finding information on the subject on the internet. The decals need to be mapped to more than one triangle/plane etc. for example, wrapped around an arbitrary mesh (terrain/model etc.) and not just the mapping of a quad to a plane. Mapping a blast mark to an arbitrary mesh becomes complicated. The only solution I can come up with on my own right now is to: 1) Determine what object(s) collide with a sphere representing the blast radius at the time of collision. This could also be a cube for footprints etc. Basically a geometric region in the world that could affect the decal. 2) Then, render the object(s) that that geometric shape collides with to a depth buffer from the point of view of the trajectory of the missile (or as needed) at the time of collision backed up by ... say ... a predefined depth. 3) Use this depth buffer to construct a fine mesh of triangles/uv coordinates etc. using the depths from the depth buffer for their depths/vertex positions. These should be offset to avoid z fighting. 4) Render decal meshs AFTER rendering the objects in the scene. I cannot find information on this ANYWHERE. If anyone has information on this or links to tutorials I would greatly appreciate it. Jeremy

Share this post


Link to post
Share on other sites

This topic is 2953 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this