Saving DDS - proper settings
-
From time to time I get questions about saving in dds and seeing skins saved with wrong settings I thought it was time for a simple example.
By the way, you can get the Nvidia dds tools on their website. https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop
Maybe we can make this thread sticky…?
-
In OPTION 2 what does the
transparency but a hard pixel fill/empty pixel
mean???(Grey/white=empty pixels=transparency in sim) I thought it was the opposite… Grey=semitransparent white=no transparency Black=transparent - empty.
lEdit: disregard what I wrote above. :lol: probably too hungry when I read Jan’s post and the brain was not having enough energy. :rofl:
-
In OPTION 2 what does the
transparency but a hard pixel fill/empty pixel
mean???(Grey/white=empty pixels=transparency in sim) I thought it was the opposite… Grey=semitransparent white=no transparency Black=transparent - empty.
lOption 2 - You have a pixel that is 100% filled (100% opacity). With brushes you can decrease the opacity but then you need to save in DXT5. If you save it in DXT3 the pixel will be made 100% or 0% opacity in the dds -> pixelated edge result. With DXT5 saving with a value between 0 and 100% become possible = soft edge. So with DXT3 you have either used 100% or 0% opacity. If not, dxt5.
Grey/White background in Photoshop means no filled background. (White background = filled with color white = non transparent).
-
Hi Jan,
Option 2 - You have a pixel that is 100% filled (100% opacity). With brushes you can decrease the opacity but then you need to save in DXT5. If you save it in DXT3 the pixel will be made 100% or 0% opacity in the dds -> pixelated edge result. With DXT5 saving with a value between 0 and 100% become possible = soft edge. So with DXT3 you have either used 100% or 0% opacity. If not, dxt5.
that information is wrong!
With DXT1 you have 100% or 0% opacity (per pixel).
With DXT3 you can have values between 0% and 100% for alpha, but the values are not interpolated between pixels.
With DXT5 you have intepolated values betwenn 0% and 100% of alpha.You can easily check *.dds files in BMS DB, which are DXT1 but have opacity also (e.g. 3977.dds or 578.dds) with NVIDIA texture viewer:
http://www.nvidia.de/object/windows_texture_viewer.htmlWe have quite some textures in DB which are DXT3 or DXT5 for no reason, so please don’t spread such wrong information!
Cheers
Biker -
Hello, when i am saving a .dds file which was 4.00 MB before its now 5.33 MB (DXT3). I guess some settings are not correct? i use the newest version of the nvidia dds tool with your settings as far as i can get them from your screenshot. The new GUI looks a bit different.
-
Hello, when i am saving a .dds file which was 4.00 MB before its now 5.33 MB (DXT3). I guess some settings are not correct? i use the newest version of the nvidia dds tool with your settings as far as i can get them from your screenshot. The new GUI looks a bit different.
Alpha channels and MipMaps accounted for?
-
My guess is that you’ve saved your new .dds file with mipmaps,
where the old one was saved without mipmaps.Cheers, :yo:
LS -
Thank you guys!
Correct, it was saved without mipmaps, now its correctly 4.00MBDownload link for the glare MFDs, if someone is interested (8005.dds goes into …\Falcon BMS 4.33 U1\Data\Terrdata\objects\KoreaObj): https://files.fm/u/rtbpnftw
-
mipmaps are a must… eases the gfx usage and memory usage.
LMAO on my previous post. :rofl:
-
If mipmaps are a must, why are the bms cockpit .dds files without mipmaps? I am just curious.
-
cause the cockpit actually doesn’t need mipmaps u are very close compared to a tank that can be from few feet to some xx.xxx ft away.
-
mipmaps are a must… eases the gfx usage and memory usage.
Yes, textures sampling is probably the most expensive single operation that the GPU does in a shader, as memory bandwidth didn’t advanced so much compared to computation power. When you have texture with mipmaps then you:
1. Have better rendering at distance as the texture will not need to be downscaled so much when a pixel is far away - Otherwise without mipmaps at distance shimmering may be seen.
2. Ease on sampling operation - As the GPU can inside the pixel shader (And ONLY there) tell how much screen space is covered by a given pixel and use the best mipmap level accordingly. This way distanced pixels use lower mipmaps for faster sampling.However, generally mipmaps have no effect on memory. As when the GPU needs a texture, it’s loaded to VRAM as-is (i.e full texture with the mipmap chain), because at load time the GPU has no way to know where the texture will be needed and what mipmap levels will be necessary (e.g a F-16 model 3 feet from you will use the same textures as the same model 10NM out, but mipmap levels will be different).
That said, for some advanced engines which manage a kind of smart “texture LODing”, the engine can tell which distance will be used for the texture and then load only the appropriate mipmap level, then when geometry get closer, a bigger mipmap is loaded. But this is the exception, usually mipmaps are used in the general manner and by the pixel shader only.As a general rule:
ALL textures in Falcon MUST have mipmaps.
The exception are indeed cockpit textures which with mipmaps may be downscaled unnecessarily by the GPU (Where actually in the cockpit we need the extra details) -
As for the main topic:
Regular skins –> DXT1 ONLY
Transparency textures --> DXT5I think DXT3 isn’t needed and all urban legends that used to run around about DXT3 has better look on skins than DXT1 are nothing but the placebo effect. RGB data of DXT5 and DXT3 are EXACTLY same as DXT1 and the only difference between the three is about the Alpha channel.
-
Is it possible to make pixels hard ? (I mean no interpolation among opaque pixels, I am not talking about tranparent layer)
-
Is it possible to make pixels hard ? (I mean no interpolation among opaque pixels, I am not talking about tranparent layer)
If I understand correctly you want a hard “stairway” like behavior? if yes then sure it can be done but it’s not under responsibility of the texture, texture is just the data, it’s the responsibility of the rendering engine to decide how to use that data. Setting a sampler state to POINT sampling will give just that, no interpolation. Usually art textures use interpolation to smooth colors so normally such textures will be sampled by a linear or anisotrophic sampler state.
-
Yes, I mean stairway appearance (right image).
I tested many VRML viewers in the past - they were able to load JPG, PNG and GIF textures.
If JPG or PNG loaded, I had blended edges. If GIF texture used, the result was sharp edges.
I was able to mix blended terrain textures with sharp bilding textures in one scene.So I am interested, if it is possible in BMS as well.
-
Yes, I mean stairway appearance (right image).
I tested many VRML viewers in the past - they were able to load JPG, PNG and GIF textures.
If JPG or PNG loaded, I had blended edges. If GIF texture used, the result was sharp edges.
I was able to mix blended terrain textures with sharp bilding textures in one scene.Must be then some sort of viewer/renderer settings (i.e maybe the SW reading the images has specific instructions per image type?). Again, eventually a texture is just data, some textures don’t even save color values at all (e.g normal maps or displacement/Height maps). So there is data and the way you interpret it depends totally on the renderer.
So I am interested, if it is possible in BMS as well.
No it’s not. The terrain just tile textures on the surface using Linear/Aniso sampler settings, in order to get an additional layer on top of those textures will mean new code that will take care of that (e.g this could have been done by creating such “buildings” image with transparency around the buildings and then using that texture over some existing terrain textures when appropriate).
I really hope though that future will allow us to not count on textures for buildings.