Terrain Blurr

Blitz3D Forums/Blitz3D Beginners Area/Terrain Blurr

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Removing mipmapping by ClearTexturefilters will make the texture flicker IMHO. It isn't a real solution since it will only make the texture a little sharper but it cannot add details.Additionally, it's rendering slower than mipmapped ones.

Ok a quick guide:

take a landscape texture 1024*1024 for the terrain. Then create a new 128*128 texture, eg. in an app like photoshop or gimp. First set the forground color to 127,127,127 (mid grey) then fill the texture with this color. Then add a Noise effect or so to it. Not too much, but also not too subtile. Save this as noise.bmp.


In blitz use it like this

tex1=loadtexture("myterraintex.bmp")
tex2=loadtexture("noise.bmp")
scaletexture tex2,0.05,0.05
textureblend tex2,5

entitytexture terrain, tex1,0,0
entitytexture terrain, tex2,0,1

Now you can go much closer without to get blurry textures. Of course, this is only an illusion, caused by the additional fine grain on the big texture. Blendmode 5 will work almost like blendmode 2, but it won' t make the underlying texture darker as long as the noise texture's average color is mid grey.

BTW you will have to scale the textures relative to the terrain size, but you may use the scaling relation between the two textures I just described.