Ok, I'm stuck and need community help. :-)
I have a small B3D tank like program which uses blitz terrains and would like to apply damage to the terrain texture (not the actual terrain) when shells hit. Think: scorch marks or bullet holes.
My main world code works fine and I can navigate around and use camerapick to place spheres at the desired location of the scorch marks. I toyed with the idea of placing sprites at the damage location but was disappointed in the results. I'm guessing that I need apply a brush to the terrain texture but have not done this before and achieve unexpected results.
My terrain is a 512x512 bmp scaled to 1x40x1 to create a hilly terrain.
My texture is 1024x1024 png and scaled to 1024x1024 (looks better this way).
My test brush was created in code as follows:
I've tried various methods of applying myBrush to the terrain texture but I either end up with nothing or my entire terrain is yellow when I only want to add a scorch spot. What am I missing here????
For two days I've googed, searched blitzbasic + a few of the other sites but have not found a solutions.
Please help save my sanity!
-- x2
I have a small B3D tank like program which uses blitz terrains and would like to apply damage to the terrain texture (not the actual terrain) when shells hit. Think: scorch marks or bullet holes.
My main world code works fine and I can navigate around and use camerapick to place spheres at the desired location of the scorch marks. I toyed with the idea of placing sprites at the damage location but was disappointed in the results. I'm guessing that I need apply a brush to the terrain texture but have not done this before and achieve unexpected results.
My terrain is a 512x512 bmp scaled to 1x40x1 to create a hilly terrain.
My texture is 1024x1024 png and scaled to 1024x1024 (looks better this way).
My test brush was created in code as follows:
myTexture = LoadTexture("resources\test\texture_yellow.png") ScaleTexture myTexture ,0.0001,0.0001 ; myBrush= CreateBrush(255,255,0) BrushTexture myBrush,myTexture
I've tried various methods of applying myBrush to the terrain texture but I either end up with nothing or my entire terrain is yellow when I only want to add a scorch spot. What am I missing here????
For two days I've googed, searched blitzbasic + a few of the other sites but have not found a solutions.
Please help save my sanity!
-- x2