Texture LOD

Blitz3D Forums/Blitz3D Programming/Texture LOD

Naughty Alien(Posted 2007) [#1]
..or something like that...I want to be able to apply few different textures on to my geometry, regarding distance from camera..so, I did it, but of course, texture 'poping up' and its noticable...is there any way or some function in code archives I didnt find, that can do smooth transition, texture regarding, similar to EntityAlpha or something??


Dreamora(Posted 2007) [#2]
This already happens automatically, Mipmapping replaces the texture with lower sized versions depending on distance, at least on all textures that do not use the VRAM flag as the VRAM flag is for dynamic textures where mipmap generation on each change would be to costly.

If you want to change textures on the fly, you will need to use brushes. But smooth transition is not possible unless you clone the geometry and let the "higher detail" effectively fade out ... -> cost to high for the effect


Although, you naturally could use different layers and the like, a highly complex system. But I do not believe that it will be faster than just relying on mipmapping nor look better due to the bilinear filter of B3D


Matty(Posted 2007) [#3]
I use a technique for this in my games that use sprites for characters. It is probably similar to this:

Find the size of the model in screen units (using cameraproject with the corners of the bounding box) and use the texture which is closest in size to the size of the object in screen pixel units.

I don't know how you can avoid some level of popping though.

My system uses textures of size 256x256 down to 32x32 (although I downsample them myself when drawing them rather than simply storing a copy of the texture for each LOD desired).

If you are using it on level geometry or characters then doesn't mipmapping cover this?

I have to do it myself with my sprite system...what are you intending to use it for if you don't mind me askng?

EDIT - Dreamora posted at same time...mipmapping is your answer.


Naughty Alien(Posted 2007) [#4]
I will give it a try..basically I wanted to load 2 textures, and change them regarding camera distance...im not sure how much mip mapping increasing performance, but I thought it will be faster if mip maping working over texture what is changed as a lower res already and when camera came closer, I swap it and show pretty much detailed texture...I mean..I am not sure..just looking for solution/suggestion..


Naughty Alien(Posted 2007) [#5]
im using it in level geometry..very nicely done light with radiosity renderer in MAX...so im trying to safe it as original much as I can..


Matty(Posted 2007) [#6]
As Dreamora says you are better off letting the card handle it with mip mapping.


Dock(Posted 2007) [#7]
If you want to hand-author mipmaps you can do so with DDS textures and the Nvidia texture exporter. (or at least you can get much sharper mipmaps than B3D's solution)


Dreamora(Posted 2007) [#8]
And much shorter loading times as the mipmap generation is the slow thing during load (as well, you will get some FPS increase if you use many different textures as DDS remain compressed in VRAM and makes them faster to be switched in when needed for rendering)