Am 21.07.2012 um 11:56 schrieb Harald Johnsen <hjohn...@evc.net>:

> Mathias Fröhlich a écrit :
>> 
>>  
>> ...
>> But that means we could at the point where the warning happens compute the 
>> mipmap levels on the cpu in the loader thread. osg::gluScaleImage could be 
>> used to do this I think (or something similar not requireing a context). 
>> This one is an imported version of the original glu function that is 
>> included in osg for running on an EGL stack which no longer provides GLU.
>> That is take the image scale this to the 1st mipmap, take the 1.st mipmap 
>> and scale this to the 2. mipmap and so forth.
>>  
>> This would have the advantage that the png's do not deviate from the dds 
>> files over time.
>>  
> 
> gluScaleImage does the usual job of blurring the texture to compute the 
> mipmaps.

How does that look with textures that should fit seamless? I'm really not sure 
if this has to be taken into account, but when I use automated blurring (with 
any algorithm) I always get the same problem, the images/mipmaps loose and you 
will see structures and lines in the renderer because the textures do not fit 
seamless anymore. That's something ugly I also encountered in flightgear now 
with new texture work showing up, but maybe this is some texture work done with 
gimp/dds and automated mipmap creation, wrong compression or whatever, I don't 
know exactly. But would be really nice to see the result of automated/built-in 
scaling.


> The advantage of pre computed mipmaps (inside .dds or not) is that we can use 
> better algorithms (http://en.wikipedia.org/wiki/Bicubic_interpolation or 
> http://en.wikipedia.org/wiki/Lanczos_resampling) to generate them.
> Perhaps gluScaleImage could be upgraded with some more algorithms ; the 
> original code was trying to be fast but this is perhaps useless nowadays if 
> the code runs in a separate thread.
> 
> 

Speaking with experience from RL work it depends heavy in which direction you 
scale. Bicubic might be good for scaling up and when you don't have to much 
details in a textures, when you scale down and have much detail in a texture it 
might be better to use "simple" bilinear, or sophisticated lanczos? I just 
started to use lanczos with gdal for tiff scaling and the result is promising.

Cheers, Yves

> HJ.
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to