Decals
Blitz3D Forums/Blitz3D Programming/Decals
| ||
I know there's plenty of code around to place a quad with a bullet hole texture on it in the archives and various threads. How about actually placing a dot3 normal texture of a bullethole onto the mesh texture itself as opposed to positioning a quad there? |
| ||
I suppose that could work. Maybe you could use the paintmesh example in the \samples directory, or use the PickedUV example from the archives for that ? |
| ||
you can do it two ways: 1. (easy): create a sprite and align it to the picked normals with the decal texture on it 2. (hard): create copies of the needed level tris and apply a texture which is u/v clamped for bullet decals, is the first one good. for blood like and grenade decals, you will need the second one |
| ||
" How about actually placing a dot3 normal texture of a bullethole onto the mesh texture itself as opposed to positioning a quad there? " Your mesh will then require a whole texture layer for the bullets. This will be as big as a lightmap, if you want the whole level to be "shootable". Access to such a big texture (eg. when drawing a bullet hole) may be very slow, even with flag 256. Additionally this requires all meshes to be mapped this way, where decals usually make use of simple Linepicks, regardless of the picked mesh. |