Author Topic: The GIMP Thread (or image editing for FS2_Open)  (Read 21398 times)

0 Members and 1 Guest are viewing this topic.

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
The GIMP Thread (or image editing for FS2_Open)
Welcome to The GIMP Thread!

This thread, as it's name suggests, is dedicated to using GIMP with FS2_Open modding as a focus. In other words, how to use The GIMP to make image files for the purposes of FS2 modding. Photoshop can be utilized much in the same way, but GIMP is a free program and very much sufficient for the vast majority of tasks required for making image files that FS2_Open can use, which is why I will be using that for instructions and what not - also, I have no experience with Photoshop at all. :p

The basic idea is to have a concentrated knowledge base about how to use GIMP for the community's purposes, rather than spreading the information all over the place in response to individual topics; goodness knows how many times the process of making planet textures, shine maps or the ever elusive normal maps has been described on the forums only to be asked again by a new modder in a month's time. I'm also going to stickify this thread and add new sections to this initial post as people ask questions about it.

So, let's get on with it.  :)


Image formats and types

FS2_Open can use the following image formats:


*DDS
 -Direct Draw Surface. Full of awesome and sauce. Use this whenever you can (except for work-in-progress editing - TGA is better for that purpose).
 -should always have power-of-two dimensions, e.g. 32x32, 64x128, 512x1024, 2048x2048 or the like.
 -to avoid strange issues with older graphics cards, make sure that both height and width dimensions are at or above 16 pixels. In other words, recommended minimum resolution is 16x16.
 -DXT compression reduces video memory consumption to either 1/6th or 1/4th compared to uncompressed texture of same resolution
 -DXT1 compression is for files with no alpha channel
 -DXT3 and DXT5 compression include an alpha channel
 -uncompressed DDS files can be used when the DXT compression is too hard on the image quality. u888 for RGB files, u8888 for RGBA files.
 -some effects can also use u555 and u5555 formats. These are much the same as uncompressed 24- and 32-bit files (u888 and u8888), but instead of 8 bits per channel they have five. This makes them a good options for, say, converting PCX weapon effects and such without getting horrid compression artefacts. They are larger than DXT compressed files, but smaller than full 24/32-bit files.
 -supports mip maps included in the image format itself
 -speeds up loading times as the GPU can use this image format directly without need to convert it to uncompressed bitmaps, as is the case with PCX and TGA textures.


*TGA
 -24-bit RGB or 32-bit RGBA files.
 -alpha channel for transparency when needed
 -excellent work-in-progress format
 -high video memory use
 -can be used for all modeling purposes to see how the stuff looks like - including normal maps.
 -do not be confused by apparently very small TGA files. The TGA format supports run length encoding, which can significantly reduce file size for stuff such as starfields and some other texture types; however this will not reduce memory consumption because the encoding needs to be decoded before the bitmap can be sent to the graphics card to use and show to you.
 -not recommended for final, distributed mods


*PNG (not generally supported yet)
-very recent addition to the code, refer to SCP documentation and wizards to find a build that supports this format
-lossless compression - small file size, often smaller than RLE compressed TGA
-supports 24-bit or 32-bit textures (RGB or RGBA)
-expected to replace TGA as a lossless, easy-to-use WIP file format for textures (native preview format on Windows OS, which TGA and DDS files lack)
-similar in terms of video memory usage as TGA; regardless of file size, the game considers these as uncompressed bitmaps and their memory use depends simply on resolution and amount of channels. A 10242 resolution PNG takes the same amount of video ram as a 10242 TGA or 10242 uncompressed DDS file, and in addition it uses more processor cycles to decode the compressed data into bitmap format.
-main usage purpose as a work-in-progress and interface file format
-not recommended as any in-game graphics format for final distribution of the mod, use DDS for ship textures, effects and backgrounds instead.



*PCX
 -native, retail-based FreeSpace 2 image format. Will work with the retail game assuming the stuff that uses it is also compatible.
 -limited to 8-bit aka 256 colours (or 255 if you use one colour for transparency support)
 -pure green (#00ff00 or [0,255,0]) is considered transparent as a rudimentary one-bit alpha channel
 -ANI file frame format - when you're building animation files for interface, you'll need to use this format for now.
 -should only be used for modding for Retail FreeSpace 2 or some of the interface art - mainly bits that are not yet compatible with more sophisticated image formats.


*JPG (technically)
 -Don't ask me why this format is supported. It's lossy compression-wise and uses the same amount of memory as uncompressed TGA, so there is no advantage whatsoever in using it.
 -If you use this for FS2_Open, Admiral Petrarch is going to demote you to a freighter pilot. Seriously, don't use this.

From these formats, GIMP offers native support for PCX and TGA files. DDS support is very good with this plugin, though I prefer saving images to TGA with GIMP, and later converting the files to desired format with NVidia's DDS Texture Tools, meaning nvDXT basically. AMD's Compressionator is a comparative product.

Whichever conversion method you prefer, you still need to know about what format to use for what purpose, which brings us to next section.



What files to use for which purpose?

Basically, most if not all files you make for FS2 modding should be DDS files. However, both DDS and TGA files are used in much the same fashion by the game, so the file format itself is not always as important as the form of the file.

By that I mean the following: Should the file have alpha channel or not? Should it be compressed or not? In case of PCX files, how can I make it have 256 colours instead of 16 million? These things are important to know; after your file is in proper form, you can easily convert between TGA and DDS formats for example.

To explain some of these things, a small introduction to the image files is in order I believe. Information is stored onto channels in image files. Each pixel has three, or in some cases four, channels or values that define how the pixel looks. The first three channels are of course the typical red, green and blue colour channels and they control the colour of the pixel. Each of these channels has a bid depth; typically 24-bit RGB files have eight bits per channel, meaning each channel can has values ranging from zero to 255. The fourth channel used in 32-bit images is slightly different. It is called the famous alpha channel and instead of controlling the colour values, it controls the opacity of the pixel.

In most cases, it's easier to think of alpha channel as a single, greyscale layer that defines the transparency of the colour layer. Basically, black is fully transparent while white is fully opaque.

Typical purpose for a 32-bit RGBA (red-green-blue-alpha) file in FS2_Open would be a transparent cockpit canopy texture, or a background planet bitmap. These require some parts to be transparent and some parts opaque, so alpha channel is a necessity.


Where to use an alpha channel:
 -transparent textures
 -shine maps (controls environmental mapping
 -normal maps (this arcane art will be handled later...)
 -planet bitmaps
 -squad insignias
 -some effects (dark smoke instead of glowing particle fog for example)

Where to not use an alpha channel:
 -non-transparent diffuse textures
 -glow maps
 -shine maps if you absolutely do not want environmental mapping at all
 -nebula backgrounds
 -star field texture
 -glowing effects - these use additive blending for transparency, ie. black sections of the texture add nothing to the background. Included are such effects as subspace vortices, weapon effects, beams, engine glows, many particles etc.


What DDS type should be used?

If, as you should, you are using DDS format, the need for alpha channel largely dictates which sort of compression you should select.

As described in formats section, DXT1 or u888 should be used when you do not need alpha channel. When you need alpha channel, you should use either DXT3 or DXT5 compression, or alternatively u8888 format - some types of effects suffer too greatly from the compression, and you'll learn to recognize these pretty soon; files with smooth gradients usually come out as blocky pixelated mess after DXT compression, so uncompressed DDS files have their uses. You'll need to balance quality with memory consumption. Sometimes uncompressed u8888 file of 512^2 resolution can look a lot better than a DXT5 compressed 1024^2 resolution file, so larger is not always better... and as these examples use the same amount of memory, you should pick the smaller uncompressed over the larger compressed. A perfect example of this are the warpmap effects, aka. subspace vortices.

As to whether use DXT3 or DXT5 format: When in doubt, use DXT5. The only meaningful difference between these is the handling of alpha channel. As described here, DXT3 is better suited for sharply defined changes in opacity - like the change from opaque text to transparent surrounding in name plates - while DXT5 is better suited for more gradual changes, like for example a smoke particle effect or planet's atmosphere blending into transparency.

Technically, DXT3 uses explicit alpha while DXT5 uses interpolated alpha. Whatever that means, you can go and find out here. Also, DXT3 uses the same compression for RGB data as DXT1, and in some cases DXT5 offers better compression results, so like said... when in doubt, DXT5 will work just fine.

And again, experimenting and comparing different compression results is recommendable. Not all textures compress as well as others on same settings.

Should mip maps be used or not?

Mip maps are a great thing that basically reduces texture aliasing, or "shimmering" when viewed from distance. You could consider them as Levels of Detail (LOD's), but for textures instead of models. The DDS format allows one to store the mip maps into the texture file in layers rather than forcing the game to generate them on the fly, and as far as I know, only the appropriately sized layer is used by the GPU at any given moment, which further reduces video memory use.

Because of their nature, though, they can be unwanted ballast in some image types. Basically, things that are never seen in smaller scale would not benefit from mip maps at all. Things like this would be skybox textures or interface files. Also, many effects do not gain any benefits from mip mapping - a good example of these would be glow points, engine glows and weapon effect textures.

As a rule of thumb, if the texture is used by a model (excluding skyboxes), it should always have mip maps. Consult your DDS conversion utility on how to change mip mapping settings; they should offer a way to turn mip maps on and off, and even adjust the filter that generates the mip maps from LOD0 layer.


Now that we hopefully know something about the file formats and types, we can get on with specific pieces of modding, and I encourage you to post questions about different sorts of topics and I'll add answers to the topics as they accumulate.


How to make good and proper shine maps?

FS2 Open shinemaps actually control specular reflections with their colour channels (red, green and blue) and environmental relections with their alpha channel. To take full advantage of this, you obviously need alpha channel and thus file format should be 32-bit TGA for working, and likely DXT5 compressed DDS file for distribution.

It's important to understand that the shinemap should NOT be a gray map. The colours are there for a reason, you know. Desaturating the shinemap tends to wash out a significant amount of detail from the diffuse texture. If anything, I've found that it is better to increase the saturation in the shine map compared to the diffuse map, but reduce the brightness significantly.

Environmental reflectivity should be applied as a mask after you are satisfied with the specular reflections. Basically, a black alpha channel will give that part zero environmental reflections, while full white alpha will make the part look like a mirror. By experience I can say that you will usually want a mostly black or at least very very dark alpha channel, but of course that depends on the ship's surface in question. Polished or chromed surface would be much more reflective, but not necessarily shinier. Same applies to cockpit canopy and other glass parts. I personally think that glass should not be white in RGB section of the shine maps. If you think about it, glass does not really have much of a specular reflection - it works more like a mirror. Something around 30-50% gray for the shine works great along with about 75-90% environmental reflections. For a mirror, you would likely want black shinemap and white alpha channel for full environmental reflections.

As a rule of thumb - shine map needs to be half as bright as you would think when making it in your image editor... but this is something you will only learn by playing with things, and with time you'll develope some sort of sense of what kind of shine map you want and how it will look in-game. :p

Here's a comparison of the diffuse texture of the GTC Fenris and the RGB part of the shine map below it:





As said, that is the RGB component of the shine map and it controls the specular reflection intensity and colour. The alpha channel in this shine map looks like this:



And when combined, it looks like this...



...or, as you see it in GIMP with default checker pattern background, it looks like this:





How to make good and proper glow maps?

Making a good glow map can be trickier than you would think. You can use glow maps to add baked-in lighting - the GTF Hercules is a good example of this - or to show the light coming from within the windows on capital ships, or for other purposes.

Glow maps work by adding the contents of the glow map on top of the diffuse texture, so you will not need alpha channel for these babies. You will also want all non-glowy parts to be full black on all occasions.

Also, you probably want to remember that if you have full white on the glow map, it will drown out ]everything below it. For example, if you first spend a lot of time and effort to add windows on the shine maps of a capital ship, making the have full white glow will completely waste all that as the glow map will shine through everything that the environmental and specular lighting might do with the windows. Instead, I would recommend keeping the glow map's intensity below 75-85% at almost all occasions. A good example of this is the GTC Fenris and Leviathan in the 3.6.10 MediaVP's (although the windows there are at about 95% intensity). If you open the ship lab (press F3 in main hall), navigate to either cruiser and look carefully as the ship rotates, you will see hints of environmental reflections through the glowmap even when they are activated. Turn the glowmap off from render options and you'll see how the windows work out without the glow map.

The Fenris glow map looks like this:



Besides, there's not much point to having such bright interior lighting anyways...


How to make good and proper planets?


Planet bitmaps will need an alpha channel. Otherwise, you'll end up with either a black box surrounding the planet, or the background stars shining through the planet. Other than that, the Celestial Objects Thread would probably be a better place to discuss planets, although I will probably add specific alpha channel management tips to this thread eventually, along with other assorted trickery.



How to make good and proper normal maps?

Ah, normal maps. There seems to be a lot of dread towards these things for some reason, even though they are reasonably simple to manage - you just need to understand what is going on, and things will start working. For making normal maps with GIMP, a normal map plugin is needed and can be aquired from here. You can also use stuff like CrazyBump, but personally I greatly prefer to control the process manually.

To begin with, a short description of normal maps and how they work is in order, as it will seriously help to reduce the amount of guessing needed in the process.

Normal maps, as the name suggests, do not adjust the texture itself but instead they affect the normal vector of the surface. Normal vector is simply a vector that is perpendicular to a surface at any given location:



The important thing that the normal maps affect is lighting. As the normal of the surface is affected, a shader will adjust the reflection of that part of the surface, which gives an illusion of a geometry change that is very impressive and, if the normal map is good, also very realistic and our eyes will accept it as added geometry detail with no questions asked. For example, in the following sample normal map, the normal vectors in three locations would look about like this:



So, normal maps can be used to affect the surface geometry of ships without adding any polygon detail to the model itself. The sides of the pyramid would look tilted simply due to lighting.

As every plane or surface has two axes (you can call them x and y, or u and v-axes, doesn't really change anything), the normal vector needs two channels to adjust it's direction on both axes. Typical normal map uses red and green channels for this. As you might have guessed, the middle tone in both channels means that the vector points straight up and thus surface normal is not adjusted. So, if both red and green channels have the value 128, the vector at that pixel is pointing straight upwards. Changing the values to either way will affect the direction of the vector accordingly. However, due to trigonometric realities, there has to be some upper limit to which the normal vector can be turned; it can not turn 90 degrees even if you use values 0 or 255 for the channels. In fact, if you do, you will introduce so called "black flecks of doom" to the normal map.

To begin creating a normal map, one must first make a height map. Here is a simple sample height map:



Quite obviously, dark areas are recesses and brighter areas are elevated areas. With lines and gradients, one can make many sorts of shapes, slopes, grooves and bumps on the height map.

After the height map is finished, it needs to be converted to normal map format. The normal map plugin offers many options, of which the most important are Filter and Scale. The Filter adjusts the algorithm that the plugin uses to read the height map. Basically, 4 sample gives a very sharp normal map and 9x9 gives softer normal map but higher gradient quality. Something in between usually works better, like 3x3 or 5x5, but each normal map needs to be experimented with to reach optimal results so there is no truths on which one to use.

The scale will affect the perceived strength of the normal map. Typically, fighter sized ships should have somewhat larger scale than capital ships, but this isn't an absolute rule either. GIMP normal map plugin outputs pretty good maps that look good in FS2_Open starting from scale 20 and going up to 40 or so, but like said, you need to define the values by yourself for each normal map.

This normal map uses 9x9 Filter and 20 units Scale:



As a result in the game, the lighting of flat plane would look about like this:



This is just a cheap bumpmap sample of the height map, but that's about how it would look like.

It's also important to note that despite the appearance of the normal map, the bright cyan on the "underside" of the pyramid doesn't mean that it's wrong. Humans tend to assume that light comes from above, and we interpret cyan as brighter colour so the normal map might seem inverted when you look at it in image editor. This is not the case; the normal map is perfectly fine with the default settings on GIMP's normalmap filter. You'll get used to it, but it might seem unsettling at first.

However, when you have the purplish normal map, you can not yet use it directly in FS2_Open. FS2_Open supports DXT5nm, or "normal map style" DXT5 compression, which means that the game does not read red and green channels that the typical purple normal maps use. Instead, they read information from green and alpha channels.

This means that to import a normal map into FS2_Open, you will need to transfer the red channel information into alpha channel. In addition, it's considered good form to fill the unused red and blue channels with black, but that is not truly necessary.

This can be done either by choosing to save the purple normal map into DXT5nm format, which automatically moves red channel to alpha, and usually copies green channel to both red and blue. It is a perfectly valid choice, but should you want to use uncompressed formats such as TGA or u8888 for increased quality, you will need to manipulate the channels by hand.

Fortunately, GIMP offers a pretty nice way to do this. As you have your purple normal map in sight, you will need to first add an alpha channel to the image [Layer -> Transparency -> Add Alpha channel], then Decompose the image to RGBA colourspace components:



Remember to select RGBA from the dialogue that opens, and it will split your normal map into four grayscale layers, one for each channel.

Copy Red channel information and paste it to Alpha channel. After that, select black colour and fill both Red and Blue channels with it. Then, Compose the image [Colors -> Components -> Compose], remember to select RGBA for the color model again, and you should be seeing something like this:




Now, when you are seeing this kind of result, you should be able to simply save it to any alpha-channel inclusive format, and FS2_Open should be able to use it as normal map. This includes TGA, DXT5 and u8888.

I'll address any questions that undoubtedly arise later, but as far as I can see, this is the gist of making normal maps. You can also use all kinds of tricks to add detail to the height map - like for example making some noise and then blurring it somewhat, which will give a somewhat "granulated" surface look - refer to the GVF Sobek normal maps in 3.6.10 mediaVP's for an example of that.

Also, you can make normal maps from multiple layers by stacking the layers on top of each other and making the colour 8080ff (flat purple) invisible, which will allow the details from lower layers to be visible while keeping the non-flat details of the upper layers overlayed on top of the lower one. This is beneficial if you need to deal with multiple scales and filtering options - for example, some small detail works better with 4sample and large detail better with 9x9, you can put them in separate height maps and combine thaem after you have applied the normal map filter to them... :drevil:


To be continued.




« Last Edit: January 20, 2010, 06:52:22 am by Herra Tohtori »
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Current projects: GVCa Tanen, Vasudan Imperium
    • Steam
    • User page on the FreeSpace Wiki
Re: The GIMP Thread (or image editing for FS2_Open)
PUT THIS ON THE WIKI.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: The GIMP Thread (or image editing for FS2_Open)
PUT THIS ON THE WIKI.

Will eventually do just that, but not quite yet. Forum thread gets more visibility and there's not much substance yet in it... but eventually I will put it in the wiki. In one form or another. For example, should the information be concentrated on the wiki, or should shine map stuff be with shine maps etc?
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Minecraft
    • Steam
Re: The GIMP Thread (or image editing for FS2_Open)
this is awesome Herra, keep this sticked I'll come here often...

I have a question though, see this:
-should always have power-of-two dimensions, e.g. 32x32, 64x128, 512x1024, 2048x2048 or the like.

I just made a texture for my model, a file of 512 x 512... I saved it on DDS DXT3 cause it has an alpha chanel (though I don't know if it's needed.. I'll ask this later on), but it seems the gimp pluging did not compress it, so.. 512 x 512 is a valid power-of-two right?.. I mean I know it's a power of two but since you did not mention it, still I got a 1.5 MB and some warning messages from gimp when saving and I'm not sure if I'm making something wrong or is the gimp plugin messing things up.
el hombre vicio...

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: The GIMP Thread (or image editing for FS2_Open)
I just made a texture for my model, a file of 512 x 512... I saved it on DDS DXT3 cause it has an alpha chanel (though I don't know if it's needed.. I'll ask this later on), but it seems the gimp pluging did not compress it, so.. 512 x 512 is a valid power-of-two right?.. I mean I know it's a power of two but since you did not mention it, still I got a 1.5 MB and some warning messages from gimp when saving and I'm not sure if I'm making something wrong or is the gimp plugin messing things up.

A DXT3 compressed, mip mapped 512^2 sized DDS file is 349680 bytes, so something is definitely going wrong.

Here's how the plugin dialogue should look like when saving to mip mapped DXT3 compressed format:



Also, unless you need transparent parts in the texture, you should use DXT1 compression and drop the alpha channel. Using alpha channel just increases memory load by 33% compared to just RGB colours...


Personally I prefer using command line utility (nvDXT) for converting TGA's to DDS files, and I only use the DDS plugin for opening DDS files with GIMP. Reasons for this are:

-batch conversion
-more mip map filter options
-more options in general.

Using command line utilities is something worth learning even if you're used to only using graphical user interface.
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Minecraft
    • Steam
Re: The GIMP Thread (or image editing for FS2_Open)
noted.. I'll see If I can get around to learn how to use the Nvidia utility.

about using alpha channel.. well I changed white to alpha because I was using a TGA exported from Blender which draw the lines of the model.
I left it because the 512 x 512 image is bigger than the actual section of the hull (drawn lines), can I just save it on plain DTX1 and make the borders (exceeded border sides which are now transparent) just white or gray or whatever?
« Last Edit: July 31, 2009, 07:24:16 am by Rodo »
el hombre vicio...

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: The GIMP Thread (or image editing for FS2_Open)
Of course you can. What you have in the non-mapped space on the texture doesn't matter at all, it just is there, and there's no reason to add a fourth channel just to make it transparent when none of it will be used by the model. :)

At least, assuming I understood the question correctly.
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline Rodo

  • Custom tittle
  • 212
  • stargazer
    • Minecraft
    • Steam
Re: The GIMP Thread (or image editing for FS2_Open)
yes, you understood me correctly.. this is great I'll save a couple of megs, thanks a lot.
el hombre vicio...

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: The GIMP Thread (or image editing for FS2_Open)
Niiiice work. :D
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Fury

  • The Curmudgeon
  • 213
Re: The GIMP Thread (or image editing for FS2_Open)
I received some private tutoring from Herra Tohtori soon after he first posted this guide, so here are useful nvdxt commands for further documentation.

Maps with mipmaps
nvdxt -file file.ext -outdir dds -32 dxt5 -24 dxt1a -16 dxt1a -8 dxt1a -quality_highest -sinc

Maps without mipmaps
nvdxt -file file.ext -outdir dds -32 dxt5 -24 dxt1a -16 dxt1a -8 dxt1a -quality_highest -nomipmap

Effects / interface
nvdxt -file file.ext -outdir dds -32 u8888 -24 u888 -16 u888 -8 u888 -nomipmap

Batch jobs are possible if you use -file *.tga for example.

Edit: Added an example how to use nvdxt to resize an image to 256^2 resolution, edit accordingly to what you're resizing, see above.
nvdxt -file file.ext -outdir dds -prescale 256 256 -rescaleSinc -dxt1a -quality_highest -nomipmap
« Last Edit: August 05, 2010, 09:21:28 am by Fury »

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: The GIMP Thread (or image editing for FS2_Open)
I received some private tutoring from Herra Tohtori soon after he first posted this guide, so here are useful nvdxt commands for further documentation.

Maps with mipmaps
nvdxt -file file.ext -outdir dds -32 dxt5 -24 dxt1 -16 dxt1 -8 dxt1 -quality_highest -triangle

Maps without mipmaps
nvdxt -file file.ext -outdir dds -32 dxt5 -24 dxt1 -16 dxt1 -8 dxt1 -quality_highest -nomipmap

Effects / interface
nvdxt -file file.ext -outdir dds -32 u8888 -24 u888 -16 u888 -8 u888 -nomipmap


Good rules of thumb, although technically you should decide whether or not to use DXT compression based on what is in the texture.

For example, warpmap textures are technically maps and you should mipmap them (because they are used as a model texture), even though it is usually understood to be an effect. Those look absolutely horrible with DXT compression and u888 should be used instead. Same happens with the 3D shockwave textures.

Similarly in some rare occasions, DXT compression could hypothetically be used for an effect file that doesn't have much gradients (if there are any such things).

Also, when ever you do use the DXT compression, remember to include the -quality_highest flag.


Additionally, some effect files can use the u555/u5555 format, which is uncompressed just like u888/u8888 but instead of using eight bits for channel, it uses five, hence offering 15-bit and 20-bit images instead of 24-bit and 32-bit like the full u888/u8888 format.

It can be useful in cases such as converting PCX files (which have only 256 colours) into DDS files, but DXT compression causes bad things to them. It isn't quite as effective in reducing memory load and you need to test if it actually works (it does not seem to work on ship textures, for example, but skybox starfield seems to be more recipient, as well as things such as primary weapon effects) but it does reduce memory to 62.5% compared to uncompressed textures like TGA, PCX or u888/u8888.

By comparison, DXT1 lowers memory consumption to approximately 16.7% of uncompressed RGB texture, DXT3 and DXT5 to 25% of the uncompressed RGBA texture. If my memory serves me right. :nervous:
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline Fury

  • The Curmudgeon
  • 213
Re: The GIMP Thread (or image editing for FS2_Open)
I would have used "nvdxt -file file.ext -outdir dds -32 u8888 -24 u888 -16 u555 -8 u555 -nomipmap" for effects/interface, but I wasn't sure it'll work reliably as an alternative to u888.

 

Offline PeterX

  • 27
    • Peter
Re: The GIMP Thread (or image editing for FS2_Open)
Why you´re not using Paint.Net? This program supports all in FS-SCP needed(suported) format of textures and pictures.
I use it for texturing models for Rule the Rail too. ...and i don´t have to convert anything.
Peter
If i can´t model any ship then i use "flying trains" :-)

 

Offline Fury

  • The Curmudgeon
  • 213
Re: The GIMP Thread (or image editing for FS2_Open)
Paint.NET is not cross-platform, lots of folks here use linux or mac. As for conversion, nvdxt allows precise control over conversion process, such as quality and mipmap type. Unless you're sure that whatever app you use to convert images to DDS does the job as well as NVIDIA's, I would use NVIDIA's tool as instructed here. Other than that, it should be fairly straightforward to adapt these instructions to whatever image editor you prefer to use.

 

Offline PeterX

  • 27
    • Peter
Re: The GIMP Thread (or image editing for FS2_Open)
Sorry Fury,
I´d forget to specify it for Win users. But if it were crossware then it will be a great tool for direct editing also for mac and linux.
Peter
If i can´t model any ship then i use "flying trains" :-)

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker
    • My old squad sub-domain
Re: The GIMP Thread (or image editing for FS2_Open)
Nvidia plugins = the best around :yes:
Your friendly Orestes tactical controller
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: The GIMP Thread (or image editing for FS2_Open)
I've personally had problems with the Paint.NET DDS plugin, usually have less issues with Gimp's.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: The GIMP Thread (or image editing for FS2_Open)
I use Paint.NET almost exclusively, but DDS conversions I usually leave to nvdxt.
Let there be light
Let there be moon
Let there be stars and let there be you
Let there be monsters and let there be pain
Let us begin to feel again
--Devin Townsend, Genesis

 

Offline Col. Fishguts

  • voodoo doll
  • 211
Re: The GIMP Thread (or image editing for FS2_Open)
For Photoshop users, I've found this tutorial quite helpful: http://cs.elderscrolls.com/constwiki/index.php/Normal_Maps_Basics

Everything that Herra explained applies here as well, the plugin is just slightly different.
"I don't think that people accept the fact that life doesn't make sense. I think it makes people terribly uncomfortable. It seems like religion and myth were invented against that, trying to make sense out of it." - D. Lynch

Visit The Babylon Project, now also with HTL flavour  ¦ GTB Rhea

  

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: The GIMP Thread (or image editing for FS2_Open)
How to use nvDXT to convert images into DDS format?

After determining what is required from the texture (compression or no, mip maps or no, alpha channel or no) you will eventually reach a phase where you need to convert the texture into DDS from whatever format you have been using for editing it and maybe previewing it in FS2_Open. How you choose to convert the file is up to you; popular choices include the DDS plugins for Photoshop and GIMP, but personally I prefer to use NVidia's DDS utilities. If you have NVidia graphics card that supports CUDA (that means GeForce 8 series or newer) you might be interested in GPU-accelerated version of the texture utilities, but I haven't really bothered checking it out yet as the standard, CPU-driven good old nvDXT has thus far worked out just fine, and it has the advantage of working even without NVidia GPU.

I am unsure if there is a Linux/MacOS version of nvDXT available officially, but the Windows version is downloadable from here: http://developer.nvidia.com/object/dds_utilities_legacy.html

Obviously, this is a command line utility and requires a certain kind of philosophy to use. Here is the instructions page that using nvdxt command with no arguments prints out to screen:

Code: [Select]
>nvdxt
Version 8.30
NVDXT
This program
   compresses images
   creates normal maps from color or alpha
   creates DuDv map
   creates cube maps
   writes out .dds file
   does batch processing
   reads .tga, .bmp, .gif, .ppm, .jpg, .tif, .cel, .dds, .png, .psd, .rgb, *.bw
and .rgba
   filters MIP maps

Options:
  -profile <profile name> : Read a profile created from the Photoshop plugin
  -quick : use fast compression method
  -quality_normal : normal quality compression
  -quality_production : production quality compression
  -quality_highest : highest quality compression (this can be very slow)
  -rms_threshold <int> : quality RMS error. Above this, an extensive search is p
erformed.
  -prescale <int> <int>: rescale image to this size first
  -rescale <nearest | hi | lo | next_lo>: rescale image to nearest, next highest
 or next lowest power of two
  -rel_scale <float, float> : relative scale of original image. 0.5 is half size
 Default 1.0, 1.0

Optional Filtering for rescaling. Default cube filter:
  -RescalePoint
  -RescaleBox
  -RescaleTriangle
  -RescaleQuadratic
  -RescaleCubic
  -RescaleCatrom
  -RescaleMitchell
  -RescaleGaussian
  -RescaleSinc
  -RescaleBessel
  -RescaleHanning
  -RescaleHamming
  -RescaleBlackman
  -RescaleKaiser
  -clamp <int, int> : maximum image size. image width and height are clamped
  -clampScale <int, int> : maximum image size. image width and height are scaled

  -window <left, top, right, bottom> : window of original window to compress
  -nomipmap : don't generate MIP maps
  -nmips <int> : specify the number of MIP maps to generate
  -rgbe : Image is RGBE format
  -dither : add dithering
  -sharpenMethod <method>: sharpen method MIP maps
  <method> is
        None
        Negative
        Lighter
        Darker
        ContrastMore
        ContrastLess
        Smoothen
        SharpenSoft
        SharpenMedium
        SharpenStrong
        FindEdges
        Contour
        EdgeDetect
        EdgeDetectSoft
        Emboss
        MeanRemoval
        UnSharp <radius, amount, threshold>
        XSharpen <xsharpen_strength, xsharpen_threshold>
        Custom
  -pause : wait for keyboard on error
  -flip : flip top to bottom
  -timestamp : Update only changed files
  -list <filename> : list of files to convert
  -cubeMap : create cube map .
            Cube faces specified with individual files with -list option
                  positive x, negative x, positive y, negative y, positive z, ne
gative z
                  Use -output option to specify filename
            Cube faces specified in one file.  Use -file to specify input filena
me

  -volumeMap : create volume texture.
            Volume slices specified with individual files with -list option
                  Use -output option to specify filename
            Volume specified in one file.  Use -file to specify input filename

  -all : all image files in current directory
  -outdir <directory>: output directory
  -deep [directory]: include all subdirectories
  -outsamedir : output directory same as input
  -overwrite : if input is .dds file, overwrite old file
  -forcewrite : write over readonly files
  -file <filename> : input file to process. Accepts wild cards
  -output <filename> : filename to write to [-outfile can also be specified]
  -append <filename_append> : append this string to output filename
  -8  <dxt1c | dxt1a | dxt3 | dxt5 | u1555 | u4444 | u565 | u8888 | u888 | u555
| L8 | A8>  : compress 8 bit images with this format
  -16 <dxt1c | dxt1a | dxt3 | dxt5 | u1555 | u4444 | u565 | u8888 | u888 | u555
| A8L8> : compress 16 bit images with this format
  -24 <dxt1c | dxt1a | dxt3 | dxt5 | u1555 | u4444 | u565 | u8888 | u888 | u555>
 : compress 24 bit images with this format
  -32 <dxt1c | dxt1a | dxt3 | dxt5 | u1555 | u4444 | u565 | u8888 | u888 | u555>
 : compress 32 bit images with this format

  -swapRB : swap rb
  -swapRG : swap rg
  -gamma <float value>: gamma correcting during filtering
  -outputScale <float, float, float, float>: scale the output by this (r,g,b,a)
  -outputBias <float, float, float, float>: bias the output by this amount (r,g,
b,a)
  -outputWrap : wraps overflow values modulo the output format
  -inputScale <float, float, float, float>: scale the inpput by this (r,g,b,a)
  -inputBias <float, float, float, float>: bias the input by this amount (r,g,b,
a)
  -binaryalpha : treat alpha as 0 or 1
  -alpha_threshold <byte>: [0-255] alpha reference value
  -alphaborder : border images with alpha = 0
  -alphaborderLeft : border images with alpha (left) = 0
  -alphaborderRight : border images with alpha (right)= 0
  -alphaborderTop : border images with alpha (top) = 0
  -alphaborderBottom : border images with alpha (bottom)= 0
  -fadeamount <int>: percentage to fade each MIP level. Default 15
  -fadecolor : fade map (color, normal or DuDv) over MIP levels
  -fadetocolor <hex color> : color to fade to
  -custom_fade <n> <n fadeamounts> : set custom fade amount.  n is number number
 of fade amounts. fadeamount are [0,1]
  -fadealpha : fade alpha over MIP levels
  -fadetoalpha <byte>: [0-255] alpha to fade to
  -border : border images with color
  -bordercolor <hex color> : color for border
  -force4 : force DXT1c to use always four colors
  -weight <float, float, float>: Compression weightings for R G and B
  -luminance :  convert color values to luminance for L8 formats
  -greyScale : Convert to grey scale
  -greyScaleWeights <float, float, float, float>: override greyscale conversion
weights of (0.3086, 0.6094, 0.0820, 0)
  -brightness <float, float, float, float>: per channel brightness. Default 0.0
 usual range [0,1]
  -contrast <float, float, float, float>: per channel contrast. Default 1.0  usu
al range [0.5, 1.5]

Texture Format  Default DXT3:
  -dxt1c   : DXT1 (color only)
  -dxt1a   : DXT1 (one bit alpha)
  -dxt3    : DXT3
  -dxt5    : DXT5n
  -u1555   : uncompressed 1:5:5:5
  -u4444   : uncompressed 4:4:4:4
  -u565    : uncompressed 5:6:5
  -u8888   : uncompressed 8:8:8:8
  -u888    : uncompressed 0:8:8:8
  -u555    : uncompressed 0:5:5:5
  -p8c     : paletted 8 bit (256 colors)
  -p8a     : paletted 8 bit (256 colors with alpha)
  -p4c     : paletted 4 bit (16 colors)
  -p4a     : paletted 4 bit (16 colors with alpha)
  -a8      : 8 bit alpha channel
  -cxv8u8  : normal map format
  -v8u8    : EMBM format (8, bit two component signed)
  -v16u16  : EMBM format (16 bit, two component signed)
  -A8L8    : 8 bit alpha channel, 8 bit luminance
  -fp32x4  : fp32 four channels (A32B32G32R32F)
  -fp32    : fp32 one channel (R32F)
  -fp16x4  : fp16 four channels (A16B16G16R16F)
  -dxt5nm  : dxt5 style normal map
  -3Dc     : 3DC
  -g16r16  : 16 bit in, two component
  -g16r16f : 16 bit float, two components

Mip Map Filtering Options. Default box filter:
  -Point
  -Box
  -Triangle
  -Quadratic
  -Cubic
  -Catrom
  -Mitchell
  -Gaussian
  -Sinc
  -Bessel
  -Hanning
  -Hamming
  -Blackman
  -Kaiser

***************************
To make a normal or dudv map, specify one of
  -n4 : normal map 4 sample
  -n3x3 : normal map 3x3 filter
  -n5x5 : normal map 5x5 filter
  -n7x7 : normal map 7x7 filter
  -n9x9 : normal map 9x9 filter
  -dudv : DuDv

and source of height info:
  -alpha : alpha channel
  -rgb : average rgb
  -biased : average rgb biased
  -red : red channel
  -green : green channel
  -blue : blue channel
  -max : max of (r,g,b)
  -colorspace : mix of r,g,b

-norm : normalize mip maps (source is a normal map)

-toHeight : create a height map (source is a normal map)


Normal/DuDv Map dxt:
  -aheight : store calculated height in alpha field
  -aclear : clear alpha channel
  -awhite : set alpha channel = 1.0
  -scale <float> : scale of height map. Default 1.0
  -wrap : wrap texture around. Default off
  -minz <int> : minimum value for up vector [0-255]. Default 0

***************************
To make a depth sprite, specify:
  -depth

and source of depth info:
  -alpha  : alpha channel
  -rgb    : average rgb (default)
  -red    : red channel
  -green  : green channel
  -blue   : blue channel
  -max    : max of (r,g,b)
  -colorspace : mix of r,g,b

Depth Sprite dxt:
  -aheight : store calculated depth in alpha channel
  -aclear : store 0.0 in alpha channel
  -awhite : store 1.0 in alpha channel
  -scale <float> : scale of depth sprite (default 1.0)
  -alpha_modulate : multiplies color by alpha during filtering
  -pre_modulate : multiplies color by alpha before processing


Examples
  nvdxt -cubeMap -list cubemapfile.lst -output cubemap.dds
  nvdxt -cubeMap -file cubemapfile.tga
  nvdxt -file test.tga -dxt1c
  nvdxt -file *.tga
  nvdxt -file c:\temp\*.tga
  nvdxt -file temp\*.tga
  nvdxt -file height_field_in_alpha.tga -n3x3 -alpha -scale 10 -wrap
  nvdxt -file grey_scale_height_field.tga -n5x5 -rgb -scale 1.3
  nvdxt -file normal_map.tga -norm
  nvdxt -file image.tga -dudv -fade -fadeamount 10
  nvdxt -all -dxt3 -gamma -outdir .\dds_dir -time
  nvdxt -file *.tga -depth -max -scale 0.5
Send comments, bug fixes and feature requests to [email protected]


Going through all that would take quite a long post, so I am going to cherry pick the most relevant parts and go through them briefly.

The description of the program is pretty straightforward:

Code: [Select]
This program
   compresses images
   creates normal maps from color or alpha
   creates DuDv map
   creates cube maps
   writes out .dds file
   does batch processing
   reads .tga, .bmp, .gif, .ppm, .jpg, .tif, .cel, .dds, .png, .psd, .rgb, *.bw
and .rgba
   filters MIP maps
   
Obviously, the program makes a DDS file out of multiple texture formats. For purposes of FS2_Open, the most likely input formats would be TGA, PNG and PCX. Notably, PCX is not mentioned in the list of textures here, but it thankfully works, which means conversion of retail assets can be done with nvDXT without prior pre-conversion.

For purposes of generating a normal map, I do not recommend using nvDXT actually. Normal map plugins of your image editing software of choice (GIMP, Photoshop, PSP) will likely give you better control over how the end result will look like. Cubemaps are only used as a tech room/ship lab fallback environment mapping, but I guess you could make your own with this utility... though there's not much point to it.

Batch processing is one of the most useful features on this program. As to what comes to mip map filtering, I do suggest you do some experimenting with it rather than just use the default filter. But more of that further on. On we go through the venerable list of options:

Code: [Select]
  -quality_highest : highest quality compression (this can be very slow)
  -prescale <int> <int>: rescale image to this size first
  -rescale <nearest | hi | lo | next_lo>: rescale image to nearest, next highest
 or next lowest power of two

...

Optional Filtering for rescaling. Default cube filter:
  -Rescale[TYPE]
 
I strongly urge you to use the -quality_highest option any time you use any of the DXT compression options. With modern CPU's it doesn't really take that long, and I'd rather have best possible quality than slightly better compression times.

Other options here allow you to batch rescale a series of images, which can be extremely useful for, say, reducing the resolution of entire animations. -prescale X Y basically resizes the images to specidied resolution, then converts them into DDS; this can be useful for resizing and converting a bunch of PCX files from a retail ANI file into DDS files. -rescale nearest scales source to nearest power of two resolution; -rescale hi and -rescale lo scale the source images into nearest higher or lower power of two, specifying the direction. Note that if the file is already a power-of-two it won't do nothing. -rescale next_lo will work in that case, effectively cutting resolution in half.

The rescale filter you should be using can largely depend on texture contents. Because this very much depends on same rules as selecting a good mip map filter for the texture, I'll handle that later in one go.

Code: [Select]
  -nomipmap : don't generate MIP maps
  -nmips <int> : specify the number of MIP maps to generate

These two options are used to determine mip map creaton. -nomipmap means there won't be any mip map layers in the DDS file, and this option is recommended for most effect files as well as skybox and background textures (in most cases). In certain cases inspired by a special kind of madness, specifying a limited number of mip maps can be useful. Like, for example, making a skybox that uses 6x40962 textures, in which case you can make one mip map for each piece of starfield, which will reduce "twinkling" of the starfield when viewed at normal field of view values, but will show the high detail starfield when using narrow field of view.

-nmips 1 is virtually the same as -nomipmap; -nmips 2 means there will be one mipmapped layer, etc.


-sharpenMethod [METHOD] is something I personally haven't experimented, but I will probably do so as I return home from holidays. It might allow better detail retention in mip maps especially for ship textures. Increasing contrast might work wonders for normal maps as well, so this is something that definitely warrants a closer inspection.


Code: [Select]
-all : all image files in current directory
  -outdir <directory>: output directory
  -deep [directory]: include all subdirectories
  -outsamedir : output directory same as input
  -overwrite : if input is .dds file, overwrite old file
  -forcewrite : write over readonly files
  -file <filename> : input file to process. Accepts wild cards
  -output <filename> : filename to write to [-outfile can also be specified]
  -append <filename_append> : append this string to output filename
  -8  <dxt1c | dxt1a | dxt3 | dxt5 | u1555 | u4444 | u565 | u8888 | u888 | u555
| L8 | A8>  : compress 8 bit images with this format
  -16 <dxt1c | dxt1a | dxt3 | dxt5 | u1555 | u4444 | u565 | u8888 | u888 | u555
| A8L8> : compress 16 bit images with this format
  -24 <dxt1c | dxt1a | dxt3 | dxt5 | u1555 | u4444 | u565 | u8888 | u888 | u555>
 : compress 24 bit images with this format
  -32 <dxt1c | dxt1a | dxt3 | dxt5 | u1555 | u4444 | u565 | u8888 | u888 | u555>
 : compress 32 bit images with this format

 
These are a bunch of useful batch commands that don't really warrant much breaking in pieces as the instructions should be pretty clear already. The most interesting part is that you can specify different sorts of source files to be converted to different formats, which can be extremely useful as it allows conversion of multiple file types to different output types with one command.


Code: [Select]
Texture Format  Default DXT3:
  -dxt1c   : DXT1 (color only)
  -dxt1a   : DXT1 (one bit alpha)
  -dxt3    : DXT3
  -dxt5    : DXT5n
  -u8888   : uncompressed 8:8:8:8
  -u888    : uncompressed 0:8:8:8
  -u555    : uncompressed 0:5:5:5
  ...
  -dxt5nm  : dxt5 style normal map

These are the texture formats relevant to FS2_Open. I would expect tha game to be able to read u1555, u4444 or u565, but I have never used them. In addition, I doubt u1555 would have any advantages over u555 - one-bit alpha is simply not very useful - and similarly using u565 makes no sense over u555. Similarly, I don't think u4444 would be very useful, as it's essentially 16-bit colour format, or rather 12-bit colour and 4-bit alpha.

-dxt1 is a valid option as well, and defaults to dxt1c; the difference between dxt1a and dxt1c is mainly on how image editors like GIMP interpret their alpha channel - basically when you open a dxt1c compressed file in GIMP, you see full black parts as transparent flecks, which is sort of ugly. For purposes of FS2_Open, dxt1a and dxt1c do not have any difference (they have same quality, memory use and file size), but dxt1a is marginally more convenient to open up in GIMP at least. Of course, one can simply set black as background colour and flatten the image, which fills the transparent parts with black (which is how they should be in the first place). As I am a GIMP user, I prefer to compress with -dxt1a command line option when I'm using dxt1 compression in the first place.

dxt5nm is obviously the format used for normal maps, but refer to the normal map section on how to work with this...

Code: [Select]
Mip Map Filtering Options. Default box filter:
  -Point
  -Box
  -Triangle
  -Quadratic
  -Cubic
  -Catrom
  -Mitchell
  -Gaussian
  -Sinc
  -Bessel
  -Hanning
  -Hamming
  -Blackman
  -Kaiser
 
Okay then, resize/mip map filtering, which are essentially the same thing. Upscaling images doesn't usually make much sense. All it serves is increase memory usage with no additional quality, with the sole exception of shinemaps in which case the environmental reflections will be more detailed. And if you are upscaling source images to nearest power of two resolution. But in most cases, you will be downscaling the images rather than upscaling, and that's what also happens in mip mapping; the program resizes the source layer into smaller and smaller layers to use for mip maps. Naturally, to get best results for your mipmaps or resized maps, you should understand at least a little about what different filtering options do here.

Resizing uses Cubic as default filter, which can result in fuzzy, slightly blurred images when downscaling, but is a pretty good upscaling filter. Another good upscaling filter is Gaussian, but I don't expect that to be much of use to anyone.

Mipmapping uses Box filter as default, because box filter is optimized for downscaling and results in sharper downscaled image (at least compared to the cubic filter).

Point filter is basically no interpolation on resize at all. It results in very crisp but of course aliased mip maps, so I can't really recommend this for obvious reasons.

Triangle filter results in fairly good mip maps, but the one I personally prefer for ship textures is Sinc. It's a tad bit more advanced filter and tends to do a fairly good job, but like always, you should do a bit of experimenting to see which options results in best quality.


The rest of the options list handles normal map creation (the only possibly useful part there that I can think of is the mip map normalization) and examples, but instead of going through them I'm going to add here a few of the probably most useful commands as examples:

To convert a basic ship texture or glow map into DDS:

-compressed:
>nvdxt -file file.name -quality_highest -dxt1a -Sinc

-uncompressed:
>nvdxt -file file.name -u888 -Sinc

To convert a ship texture with transparent parts:

compressed:
>nvdxt -file file.name -quality_highest -dxt5 -Sinc
OR
>nvdxt -file file.name -quality_highest -dxt3 -Sinc

uncompressed:
>nvdxt -file file.name -u8888 -Sinc

To convert a shinemap:

compressed:
>nvdxt -file file-shine.name -quality_highest -dxt5 -Sinc

uncompressed:
>nvdxt -file file.name -u8888 -Sinc

To convert a purple, RGB-normalmap to dxt5nm:

>nvdxt -file file-normal.name -quality_highest -dxt5nm -Sinc

To convert a green/alpha, channelmanaged normal map:

compressed:
>nvdxt -file file.name -quality_highest -dxt5 -Sinc

uncompressed:
>nvdxt -file file.name -u8888 -Sinc

To convert a gradient-rich effect from PCX source into DDS:

>nvdxt -file file.pcx -u555 -nomipmap

uncompressed because dxt1 compression REALLY does not agree with effects like the ones used in FreeSpace...

To convert a skybox starfield image into DDS:

>nvdxt -file file.name -u555 -nomipmap
OR (if you can stomach the quality loss)
>nvdxt -file file.name -dxt1a -nomipmap
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.