|
 |
|
DDS images are saved incorrectly sometimes |
« View previous topic :: View next topic » |
Author |
Message
|
cmusch |
Posted: Tue Feb 19, 2008 11:30 am Post subject: DDS images are saved incorrectly sometimes |
|
|
Joined: 02 Aug 2007 Posts: 33
|
Hi!
Our level export plugin saves all textures used in a level as dds (via the SDK functions). On two occasions now, it happened that the exported dds file was incorrect. The 2x2 mipmap level was entirely blue (0x000084).
Sadly, the error is not reproducible, so when exporting a map again, everything is fine. Do you have any idea what could cause this behaviour?
thx
chris |
|
Back to top |
|
 |
ALicu |
Posted: Tue Feb 19, 2008 12:11 pm Post subject: |
|
|
Joined: 12 Feb 2007 Posts: 1327
|
Hello,
Yes, it is a known internal bug. It is caused by the image library (DevIL) we are using when saving images. Unfortunately the fix is not that easy (since it is in an external library). We will eventually fix this, as we plan to change the image library altogether.
In the mean time there is a workaround. This bug is happening only for DDS images. And such, starting with version 1.10.21, we've also introduced an alternative DDS compressor (based on NVidia compressor) which is slower (sometimes way too slower) but always produces correct results.
As you can see from iImage interface, a new function was added: CopyToEx. This has an extra parameter, save_parameters, which, in DDS case, should point to a sDDSSaveOptions structure. Inside this structure set compressor to C_DDS_COMPRESSOR_ADVANCED and quality to C_DDS_QUALITY_NORMAL. If you have a 8xxx Geforce (or newer) and set gpu_acceleration on true you should get good speed, otherwise it is pretty slow on CPU.
By default, CopyTo, is using the standard processor which in general produces correct results, is fast and high quality. But sometimes the bug you've mentioned is produced.
Alternatively, you can choose to export in other formats and then manually convert to DDS (using a batch for example).
Regards,
Adrian L. |
|
Back to top |
|
 |
cmusch |
Posted: Tue Feb 19, 2008 2:44 pm Post subject: |
|
|
Joined: 02 Aug 2007 Posts: 33
|
Thanks for the quick response. Luckily, we indeed have a Geforce 8800 in our artist's computer.
regards
chris |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|