Bullet marks on wall
Bullet marks on wall
Anyone know how to do this? Ignoring for a moment that you'd need a texture layer for the bullet and your wall would probably have normal texture coords + lightmap and irrlciht only allows 2 texture layers, how couldo one set the bullet texture so that it appeared in the right spot in the wall.
Only solution I can think of is finding the vertices where the mark is supposed to be (probably not a quick task) and changing the 2nd set of UV coords so the texture will be displayed there (all vertices other than ones where bullet should be are set with UV coords outside range and is set to not tile textures for coords outside range(not sure if irrlciht has method for that or if would have to add one)).
That is not a very fast operation, does anyone know anything better?
Only solution I can think of is finding the vertices where the mark is supposed to be (probably not a quick task) and changing the 2nd set of UV coords so the texture will be displayed there (all vertices other than ones where bullet should be are set with UV coords outside range and is set to not tile textures for coords outside range(not sure if irrlciht has method for that or if would have to add one)).
That is not a very fast operation, does anyone know anything better?
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars
thanks, that would probabl ywork fairly well
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars
anyone knwo how professional games do it? I believe it's with a seperate texture layer, but I"m not really sure.
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars
yes, that is what I was thinking originally. It just seemed that everyone was telling me to use sprites, which would be a bit easier but would probably not look as good.
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars
sprits where used in some earlier games, but they do lead to problems such as the bullets holes appearing to be detached from the walls at some angles. Decals is one way and i think flipcode.com has a tutorial on this. Might also be able to do it with a shader but as irrlicht doesn't yet support shaders its not really an option.
-
- Posts: 124
- Joined: Sun Jun 27, 2004 11:02 am
- Contact:
Quake 3 (Plus most Q1 and Q2 engine mods) makes a decal out of polygons then uses the surface normals to attach it onto the level mesh. Check out Q1 or Q2 engine mods for code. No games that I know of use textures. They all use polygons. (Which is why most games have decal limits, lots of decals = lots of polys)
2.8GHz P4 with HT - 512MB DDR - ATI Radeon 9600XT 256MB - Windows XP - VC++ 6 and VC++ 2003
Dark Reign 3 Home Page: http://darkreign3.notwhatyouthink.org/
Dark Reign 3 Forums: http://notwhatyouthink.org/darkreign3bb/
Dark Reign 3 Home Page: http://darkreign3.notwhatyouthink.org/
Dark Reign 3 Forums: http://notwhatyouthink.org/darkreign3bb/
thanks. I guess I'll have to investigate both types and see which one works best
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars
DECALS
OK.
But if a decal is made of polys...
Imagine that we are making rocket decal(which is surely big )
And we are shooting in the edge of a wall.
But in this case some part of our polgonal decal will be out of triangle!
Should we make the decal out of many*many polys,and for each poly check collision with the triangle?!
This is not the ideal way...
But if a decal is made of polys...
Imagine that we are making rocket decal(which is surely big )
And we are shooting in the edge of a wall.
But in this case some part of our polgonal decal will be out of triangle!
Should we make the decal out of many*many polys,and for each poly check collision with the triangle?!
This is not the ideal way...