11

I'm trying to figure out a way to do "bullet holes" but actually apply the texture at the shader level? If I'm dealing with a model which doesn't have a "flat" face I'd like to be able to wrap the "decal" across the model. Anyone point me at a tutorial that will do something similar to this.

hairboat
  • 127
  • 1
  • 10
Bob dole
  • 111
  • 3

3 Answers3

10

"Flat" face is not a requirement for the decals at all. Here is a visual explanation of how you can project a decal geometrically onto a complicated object.

Also there is that one site which gets referenced quite often here, it has a DX 10 implementation of such decals, search for "volume decals".

EnoughTea
  • 2,545
  • 16
  • 16
1

Check out paged/virtualized texturing system such as MegaTexture. These could be used to replace decals by drawing into the texture pages as they get paged in.

http://en.wikipedia.org/wiki/MegaTexture

Luther
  • 979
  • 6
  • 9
0

What I had been imagining is determining during the "picking" determine the specific position on the model and pass that exact position to the sharer along with a bullet texture to apply. Of course this still results in the issue of "filing across faces. The geometric projection seems the best option.

Bob dole
  • 111
  • 3
  • 2
    If this is not meant to be an answer to your question you should either put a comment with the answer you are referring to or update your origional question. Also, if an answer was provided that solves your problem, you should mark that answer as "accepted" so that people know that it helped you. – Tetrad Aug 10 '11 at 06:18