Page 1 of 1

nearly impossible to manage multiple texture resolutions

Posted: 22.12.2002, 23:46
by timcrews
Greetings:

I know that a re-organization of the Celestia directory structure has already been discussed in other posts, and that Chris has already acknowledged that there is a problem with the management of multiple resolutions for various textures. But since a fix for this problem isn't going to appear in 1.2.5, I was hoping for a constructive discussion of how to work around the problem in the meantime.

In my case, I would always opt for the highest possible resolution, especially for Earth and Mars. Load time doesn't matter to me. I am also very excited about the results obtained by dynamic bump-mapping and specular maps as they are applied to Earth and Mars. For that reason, I would normally choose an 8K or 16K main texture, 8K bump texture, and 2K specular texture. (Until the night-lights-on-the-day-side problem is fixed, I only find the night light feature to be distracting.) But with this combination of textures, my GeForce 4 TI4200 with 64M DDR is only able to accomplish 2 or 3 fps animation in the full planet view. (BTW, is my 256M of main memory slowing me down here? If more memory will get me good frame rates with these textures, then the rest of this discussion is a moot point for me.)

This, and only this, is the reason that I need any support at all for multiple resolutions -- because I want to be able to use a somewhat lower resolution for the full planet view (whatever I need to achieve 20 or 30 fps animation), and then switch to the highest possible resolution as I zoom in to the surface to explore.

So, on to the practical difficulties:

---------------------

Issue 1: All files must have the same name

All of the versions of a file at various resolutions have to have the same file name, and consequently the same file type. Unfortunately, all of my hires files are .dds files, and all of my medium resolution files are .jpg or .png files. I have to choose one type or the other. Given my setup, I understand that .dds files are the best choice (other than bump-maps, which apparently don't do well with .dds).

So, if I want to be able to switch between hires and medres versions of a texture, I may be forced to convert all of my .jpg files to .dds. (And there are a _lot_ more medres .jpg files than there are hires .dds files, so there are a lot of files to convert.) I have tried converting them, without success. Using the Photoshop plugin, I have tried opening .jpg files and then saving them as .dds, but a dialog pops up with a _lot_ of options that I don't know what to choose. When I chose what seemed to make sense, Celestia did not like the result -- it just displays a smooth untexture ball where my planets should be.

So here is a question: What setting should I use when converting .jpg to .dds files?

When I try to convert .png files to .dds files, I get an "unsupported file type" error.

Alternatively, I could convert my few .dds files to .jpg files. Again, though, I am left with some questions. I don't know what MIP maps are, for one thing, and all of the big .dds files have MIP maps. And any 8K or 16K .dds file generates an error when I try to open it, and I can't open any more .dds files after that until I reboot.

-------------------------

Issue 2: Must make same choices about main / bump / specular map combination.

In hi-res mode, as I mentioned I like to use a detailed bump map (dynamic) and specular maps. Bump maps that aren't at a high enough resolution make mincemeat out of previously decent main textures. So, for hi-res, I would not use a combined main/bump/specular map .dds file. But most .dds files (at least the ones in the texFoundry) come in the "combined" flavor, where all three maps are included in one file.

So, if I want to support both high and medium resolution textures, somehow I have to come up with medres files that have separate main, bump, and specular textures. And I don't know of any sources for such files.

-----------------------------------

I guess that's it for now. I do have Adobe Photoshop and the NVIDIA plugin, so I could perform file conversions if I only knew how. I am an experienced software engineer, so even a brief helpful hint would probably get me going. I am very motivated to get this working. (But even with skill, knowledge, and motivation, I might be stuck since the plugin seems to be choking on large textures. If anyone knows why, I would be glad to know.)

Thanks in advance for any helpful advice.

Tim Crews

Posted: 23.12.2002, 00:49
by selden
Tim,

From discussions in other threads, I have the impression that the Photoshop plugin is rather buggy. You might want to consider using the command line convertor (nvdxt) instead. By default, though, it wants a .TIF input file.

For what it's worth, I found the NetPBM command line utilities useful in doing various image manipulations and conversions while producing individual .DDS files for use with Frans Blok's RGB Mars maps. See http://www.lns.cornell.edu/~seb/celestia/blok/ for some of the results.

Also, I've found that large DDS cloud maps seem to be responsible for slowing my Ti4200 to 4fps. When I replacie them by equivalent .PNG images, the framerate stays up at about 30fps.

I hope this helps a little.

Posted: 23.12.2002, 12:31
by Don. Edwards
NVDXT.EXE also accepts images in the .TGA format just for general info. I have never tried using a .TIFF before myself. All the instuctions I have gotten from Fridger and Rassilon have said to use .TGA.

Posted: 23.12.2002, 13:00
by selden
Don,

I'll be darned. I must have read "targa" and seen "tiff" and never thought anything about it. All my NetPBM scripts use TIFF as the intermediate format and work just fine.