1
$\begingroup$

I've seen questions and videos around the place on how to do these, but all the final products are exactly what I do not need: a plane with the picture of a bullet hole. If I've done that, what would happen if I shoot the very edge of an object? The picture would be sticking out in the middle of the air! Also, if I hit a round object or an object with curves, the same outcome would occur. I need a type of system where the bullet hole that is added can actually "wrap" the object it hits. For example, if I hit a corner of a cube, the bullet hole image should be on both sides of the cube. Also, If I hit an object on an area that has curves, the bullet hole should be curved too. How can I achieve this? Thanks!

$\endgroup$
  • $\begingroup$ You need some way to adopt the face normal, and a ray that continues afterward, adding holes where needed. there is almost no way for it to "wrap" a corner. $\endgroup$ – Scalia May 15 '15 at 2:31
1
$\begingroup$

You need the bullet hole to modify the texture applied to the material. That way it will never stick out!

An interesting approach may be to have multiple U,V vectors per object, and in the fragment shader, detect how close a fragment is to each of the U,V vectors, and if close enough, draw a bullet hole (maybe darken pixels as a function of distance between current U,V, and bullet hole U,V)

I am not sure how this is normally implemented in games however ;)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.