Page 1 of 1

XnView now writes DDS format

Posted: 03.10.2005, 17:46
by t00fri
Hi,

in case some of you are not yet aware, the latest XnView 1.80.3 version of XnView now writes dds format besides reading it. There are no options available (I think), but the images look OK.

Bye Fridger

Posted: 03.10.2005, 19:01
by Boux
Thanks alot for the tip :D
It is useful to have another program handy.
My experience is that mileage may vary a lot with DDS export/import according to the app you are using.
For example, Photoshop and PaintShop Pro do not always behave the same.
Maybe XnView will be a judge of peace, sort of.

Posted: 03.10.2005, 20:22
by maxim
Thank you, very helpful hint.
I didn't use xnview very much, so I wasn't aware of the newest features.

maxim

Posted: 04.10.2005, 14:55
by cartrite
Thanks for the tip,

Your a life saver. XnView can open my problem World Wind dds files without any problem. And convert them too. I got them to open with the gimp but I had to change some flags for pitch and linear size with a hex editor to do it. Thanks Again.javascript:emoticon(':D')
Very Happy

cartrite

Posted: 04.10.2005, 14:58
by cartrite
Hi again,

I wanted to test something.:D

cartrite

Re: XnView now writes DDS format

Posted: 05.10.2005, 19:22
by DaveMc
There must be something a little buggy with the XnView write routine, dds files saved with it can't be read by Irfanview's dds plugin. They can however be read by Photoshop and PaintShop Pro and look good in Celestia so this is no big deal.

Posted: 05.10.2005, 22:58
by fsgregs
Fridger:

I have been trying for some time to find a program to resize dds files and save them as a smaller size. I, therefore, immediately went to XnView and downloaded the latest version (1.80.3).

I then opened a dds cloud texture with it. It opened fine. I then tried to save it (without resizing) to another place on the hard drive by clicking "Save As" and choosing "DDS" as the file format. It seemed to save OK. However, when I opened it, I found this:

http://albums.photo.epson.com/j/ViewPhoto?u=4333456&a=31914917&p=72934181

I tried saving a regular planet texture. Same result.

HELP!

What is going wrong? :(

Frank

Posted: 05.10.2005, 23:15
by t00fri
fsgregs wrote:Fridger:

I have been trying for some time to find a program to resize dds files and save them as a smaller size. I, therefore, immediately went to XnView and downloaded the latest version (1.80.3).

I then opened a dds cloud texture with it. It opened fine. I then tried to save it (without resizing) to another place on the hard drive by clicking "Save As" and choosing "DDS" as the file format. It seemed to save OK. However, when I opened it, I found this:

http://albums.photo.epson.com/j/ViewPhoto?u=4333456&a=31914917&p=72934181

I tried saving a regular planet texture. Same result.

HELP!

What is going wrong? :(

Frank


But a cloud texture needs an alpha chanel in order to handle transparency. That requires to save in DXT3 format (RGB+A). For the same reason, clouds cannot be JPG format (RGB only), but must rather be PNG (RGB+A).

I suppose XnView just does DXT1. Since I could not find a respective switch, this issue seems pretty obvious to me. Probably it will take another XnView version before DXT1,3,... formats are available for writing.

Check it out by saving images that DEFINITELY use RGB layers only, like a very simple JPG texture. That works for me, at least.

There is more XnView cannot do yet at the dds front: it does not write mipmaps together with the main texture. That is however quite essential for speedy displays.

Bye Fridger

Posted: 06.10.2005, 19:27
by fsgregs
Thanks Fridger. Could you recommend a free software program for Windows that does save in DXT 3 format? Is there any?

Frank

Posted: 07.10.2005, 02:57
by selden
Frank,

Nvidia provides free command-line DDS creation utilities (and photoshop plugins) at
http://developer.nvidia.com/object/dds_utilities.html

Posted: 11.10.2005, 23:00
by Trajan
Hello!

I'm a new member. Last year i have written this script (batch for winxp):

Code: Select all

@echo off
cls
echo [ Create VT-Map for Celestia
echo ===============================================================================
echo.
set /p source=Enter path and name of sourcefile             :
echo.
set /p x=Enter x [Pixel]                               :
echo.
set /p y=Enter y [Pixel]                               :
echo.
set /p tilesize=Enter tilesize [Pixel]                        :
echo.
set /p target=Enter output directory                        :
echo.
set /p format=Enter output format (png, dxt1c, dxt3 or dxt5):

set /a var=%y%/%tilesize%
set /a level=0
set /a col=0
set /a row=0
set /a u=0
set /a v=0

:level
if (%var%)==(1) (goto:makedir) else (
   set /A level=%level%+1
   set /A var=%var%/2
   )
   goto:level

:makedir
md %target%\level%level%
goto:step1

:step1
if (%u%)==(%x%) (
   del %target%\level%level%\temp.tif
   goto:eof
   ) else (
   nconvert -quiet -out tiff -o "%target%\level%level%\temp.tif" -crop "%u%" "0" "%tilesize%" "%y%" "%source%"
   set /a u=%u%+%tilesize%
   )

:step2
nconvert -quiet -out png -o "%target%\level%level%\tx_%col%_%row%.png" -crop "0" "%v%" "%tilesize%" "%tilesize%" "%target%\level%level%\temp.tif"
if (%format%)==(png) (goto:step3) else (
   nvdxt -file %target%\level%level%\tx_%col%_%row%.png -%format% -nomipmap -outdir %target%\level%level%
   del %target%\level%level%\tx_%col%_%row%.png
   )

:step3
set /a v=%v%+%tilesize%
set /a row=%row%+1
if not (%v%)==(%y%) (goto:step2) else (
   set /a v=0
   set /a row=0
   set /a col=%col%+1
   goto:step1
)

It use nvdxt.exe and ncovert.exe (a part of xnview). Both files must be in the same directory with the batchfile. It's very fast! I have test it with 16k-textures. Maybe it works with 32k and up.

Save your texture from Photoshop or Gimp. If you use an alpha channel, take a format like tiff. Then execute the batchfile and enter the values.

Hope you find it useful! ... and sorry for my bad english.

Trajan

Posted: 29.12.2007, 06:44
by crespowu
Great tips! Thanks a lot,it helps me much.