Painting Walls

Blitz3D Forums/Blitz3D Programming/Painting Walls

Baystep Productions(Posted 2005) [#1]
Is there any code for painting something to a wall. Like decorator, but in game.

I'd like to have the floor and wall display a burn mark for explosives and stuff without dealing with the conventional particle way with sprites (common in bullet holes)

This way the burn will conform to the corners.


Any ideas? And yes I've used the search. Thanks.


jfk EO-11110(Posted 2005) [#2]
the common way is decals. Sprites, aligned to the wall. As you said you want something diffrent. If (and that's not likely) every wall in your game is using its own texture, then you could draw directly to the texture buffer. Although this isn't very fast (especially if you don't use Flag 256, while at the other hand the usage of flag 256 disables mipmapping and makes things slow in general), it would allow to have the holes, traces whatever right on the textures. An other method would be to draw to the lightmap texture, assuming your walls are lightmapped and use conventional 2nd layer lightmapping (not vertex lighting of something hybrid).

So, basicly, if I was you, I'd try to draw to the lightmap, and if the speed is too slow, I'd use sprites noneless.

Anyway, this may be useful:
http://www.blitzbasic.com/codearcs/codearcs.php?code=515


poopla(Posted 2005) [#3]
http://www.blitzbasic.com/codearcs/codearcs.php?code=392
Simple example.


Baystep Productions(Posted 2005) [#4]
Thanks guys, I'll work on those!