• Advertisement
Sign in to follow this  

making a hole in the wall

This topic is 4292 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

hi guys i am trying to make hole when a bullet hits wall or any thing such as car , ground , and anything so what i was thinking about is 2 things : 1- to get the texture pixel at which the bullet hits the wall and change the color of the texture pixels around the hit gradually from dark to lighter. 2- to render texture of the bullet to texture of the wall on the point of hitting . can anybody advice me which way to use and give some hint how to apply it ?? thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Changing the texture could be a problem, especially if the texture is used in other places or you wrap around, repeat the texture etc. For example if you hit a car and change the texture all other cars' textures will also be changed.

Adding a quad with a bullet texture above the place the bullet hit is a pretty standard way to do it. This is called decals, you can also do stuff like actually create a hole, like mentioned in the article 3D Decals (the article uses OpenGL, but if you know the basics of the stencil buffer you should have no trouble following, even if you don't use OpenGL). If you want more information search google for decals.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement