Can we get 3Dc texture compression support?
Soylent_green
Join Date: 2002-12-20 Member: 11220Members, Reinforced - Shadow
<div class="IPBDescription">pretty please with sugar ontop?</div><!--coloro:#afcfff--><span style="color:#afcfff"><!--/coloro--><!--sizeo:5--><span style="font-size:18pt;line-height:100%"><!--/sizeo-->First, what is it?<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->
It is a 2-component texture compression format that preserves gradients much better than DXTc while only being 8 bits per pixel like DXT5. It is quite possibly the least consistently named texture format in the history of texture formats; it is also known as LATC(luminance-alpha texture compression), DXn(xbox 360), BC5(D3d10) etc.
This format is used primarily for storing normal maps, and it is very good at it. I've been experimenting with making textures for NS2 for a while and most of my normal maps use a half-resolution BGRA texture for normal map; that's a quarter as many pixels but just as much memory as DXT5, twice as much memory as DXT1. (24-bit uncompressed RGB gets upconverted to 32-bit BGRA8888. 24-bit formats aren't natively supported on modern cards).
You may vaguely remember seeing this image 7 years ago, when ATi released the x800 series of cards:
<img src="http://i53.tinypic.com/2ewps46.jpg" border="0" class="linked-image" />
The DXTc texture to the right has utterly terrible blocking(could be DXT1, DXT3 or DXT5, they all store colours the same since normal maps don't care about the alpha channel; there is one exception, you can use a 1-bit alpha mask with DXT1 and you can't with the others)
The 3DC texture is visibly different than the uncompressed reference, but you will not notice this ingame as there are no obvious artifacts, it is just that the slope is ever so slightly different than what the artist originally intended.
<!--coloro:#afcfff--><span style="color:#afcfff"><!--/coloro--><!--sizeo:5--><span style="font-size:18pt;line-height:100%"><!--/sizeo-->Hardware support?<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->
Nvidia supports it since geforce series 8 which came out 4 years ago and ATi supports it since the x800, which came out in 7 years ago.
From the <a href="http://store.steampowered.com/hwsurvey/videocard/" target="_blank">Steam survey</a> it is possible to get an lower bound on the number of graphics cards that support this feature in the general steam community; about 30%. [i]Actual numbers will be much lower since I just counted the "other"(25%) category as not having it, although probably at least half(ATi) do.
The cards that do not support it are very unlikely to run NS2 on high, or even medium. The fallback option is to convert the 3dc image to a 2-component, 16 bpp format like UV88 or LA88. The D3DX support functions for creating textures are capable of doing this conversion I believe; if not, it's quite a simple format so it shouldn't be any massive undertaking to write it yourself.
It is a 2-component texture compression format that preserves gradients much better than DXTc while only being 8 bits per pixel like DXT5. It is quite possibly the least consistently named texture format in the history of texture formats; it is also known as LATC(luminance-alpha texture compression), DXn(xbox 360), BC5(D3d10) etc.
This format is used primarily for storing normal maps, and it is very good at it. I've been experimenting with making textures for NS2 for a while and most of my normal maps use a half-resolution BGRA texture for normal map; that's a quarter as many pixels but just as much memory as DXT5, twice as much memory as DXT1. (24-bit uncompressed RGB gets upconverted to 32-bit BGRA8888. 24-bit formats aren't natively supported on modern cards).
You may vaguely remember seeing this image 7 years ago, when ATi released the x800 series of cards:
<img src="http://i53.tinypic.com/2ewps46.jpg" border="0" class="linked-image" />
The DXTc texture to the right has utterly terrible blocking(could be DXT1, DXT3 or DXT5, they all store colours the same since normal maps don't care about the alpha channel; there is one exception, you can use a 1-bit alpha mask with DXT1 and you can't with the others)
The 3DC texture is visibly different than the uncompressed reference, but you will not notice this ingame as there are no obvious artifacts, it is just that the slope is ever so slightly different than what the artist originally intended.
<!--coloro:#afcfff--><span style="color:#afcfff"><!--/coloro--><!--sizeo:5--><span style="font-size:18pt;line-height:100%"><!--/sizeo-->Hardware support?<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->
Nvidia supports it since geforce series 8 which came out 4 years ago and ATi supports it since the x800, which came out in 7 years ago.
From the <a href="http://store.steampowered.com/hwsurvey/videocard/" target="_blank">Steam survey</a> it is possible to get an lower bound on the number of graphics cards that support this feature in the general steam community; about 30%. [i]Actual numbers will be much lower since I just counted the "other"(25%) category as not having it, although probably at least half(ATi) do.
The cards that do not support it are very unlikely to run NS2 on high, or even medium. The fallback option is to convert the 3dc image to a 2-component, 16 bpp format like UV88 or LA88. The D3DX support functions for creating textures are capable of doing this conversion I believe; if not, it's quite a simple format so it shouldn't be any massive undertaking to write it yourself.
Comments
I suppose it could be because that's a rather odd shape to normal map, usually normal maps are much simpler, they tend to work better with hard strong shapes rather than gentle curves. The fact that it's hugely magnfied doesn't help either.
Basically I don't think it's going to be a problem, you won't notice the difference ingame.
There is nothing wrong with that DXT image. Crop out the reference image and minify to 32x32, which I think is the original size. Use the Nvidia .dds exporter set to normal map with "normalize only" option ticked in and save as DXT. Now import the .DDS you just saved and it looks exactly that awful.
You can do the same thing with VTEX(or VTFedit or any other GUI that sits ontop of VTEX).
I see nasty, blocky specular reflections all the time in source games. I notice them without intentionally looking for them; they're visually distracting. I see this with VTEX and I see this with the nvidia .DDS exporter plugin when I make my own textures.
Texture filtering can only blend between adjacent texels. It can create a smooth gradient even though individual pixels are the smallest elements and are inherently "blocky". If however the stair-stepped blocky mess exists at the level of 4x4 blocks, there's nothing texture filtering can do to hide the mess.
<!--quoteo(post=1844974:date=May 9 2011, 04:06 AM:name=Chris0132)--><div class='quotetop'>QUOTE (Chris0132 @ May 9 2011, 04:06 AM) <a href="index.php?act=findpost&pid=1844974"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I suppose it could be because that's a rather odd shape to normal map, usually normal maps are much simpler, they tend to work better with hard strong shapes rather than gentle curves.<!--QuoteEnd--></div><!--QuoteEEnd-->
There's a very natural reason that it works better with hard, strong shapes; because DXTc is good at handling stong, hard shapes, but it cannot handle gradients without leaving a blocky mess.
Chris you haven't worked with anything. We've generated normal maps for new turrets in various formats and DXT1/5 were very visibly blocky. Uncompressed were better and floating-point was perfect. Most of the time you don't get THAT close to model to see this blockiness but it's visible when really close or when material/texture is used on ground. Using anisotropic filtering helps quite a bit but it doesn't hide the issue.
Crytek even described how they compress to 3Dc format without spending hundreds of hours on it (presentation available on their website).
The obvious: shadow map isn't filtered.
Not a long time ago we had Portal 2 release. It has pipes that have diffuse and mirror reflections. For me they looked better than NS2's diffuse+phong (+mirror?). Or maybe it was because whole NS2 (not models) looks like made from plastic.
If you go looking for them you will easily find artefacts in any texture, the point is most people don't go looking for them, they don't need to be perfect, they just need to be good enough so that it doesn't scream TEXTURE ARTEFACT! at people from across the room.
<!--quoteo(post=1845014:date=May 9 2011, 12:13 PM:name=Soylent_green)--><div class='quotetop'>QUOTE (Soylent_green @ May 9 2011, 12:13 PM) <a href="index.php?act=findpost&pid=1845014"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->There's a very natural reason that it works better with hard, strong shapes; because DXTc is good at handling stong, hard shapes, but it cannot handle gradients without leaving a blocky mess.<!--QuoteEnd--></div><!--QuoteEEnd-->
Well, no, it's more because you don't notice normal maps unless they're incredibly obvious, and it's not generally worth the time to normal map something that isn't steep. Just paint it on the texture, nobody will notice if the shadows are slightly off. This is true even in things that don't use dxt compression.
Too much detail in the normal map just makes the texture messy, which is fine for something like a noisy rock wall, but for anything else you generally want to cut the normal map back to strong, simple shapes. It looks much nicer and exaggerates the 3d effect in the right places.
You can this if you like, but don't bother spending time on it if there's other stuff you can be doing, or if it will cut into your market.
If you go looking for them you will easily find artefacts in any texture, the point is most people don't go looking for them, they don't need to be perfect, they just need to be good enough so that it doesn't scream TEXTURE ARTEFACT! at people from across the room.<!--QuoteEnd--></div><!--QuoteEEnd-->
That's exactly what I said. I had to zoom in HLMV to be like 1-5cm away from surface to see the issue. But NS2 has Phong and lots of Phong on it. Any imprecision in encoding normal = visible aliasing.
If you played Crysis 2 - the start part where you see metallic truck's wheel that has perfect "shape" simulated with normal mapping you know when encoding normal matters. Low detail, diffuse surface doesn't need precision (but then, you could encode it more precisely and lower resolution).
Normal map isn't your ###### 3d effect. Your intuition learned when using diffuse normal mapping is wrong. That's all I wanted to say because every discussion with you will dissolve into you saying that you're a tool, you have the right to be a tool and we have to agree with you because you're a tool.
Like I said, you can put it in if you want, but I really doubt anyone would notice the difference.
<a href="ftp://download.nvidia.com/developer/Papers/Mipmapping_Normal_Maps.pdf" target="_blank">ftp://download.nvidia.com/developer/Paper...Normal_Maps.pdf</a> That doesn't even talk about normal map compression methods.
What the hell is your problem man?
I'm not. I anticipated and responded to this criticism in the first post. Older cards would convert 3dc normal maps to a suitable two-channel, 8-bit per channel uncompressed format. No additional hardrive space is required and no additional load times are required. On the contrary, forcing me to use RGBA8888 on problematic textures will waste hardrive space and texture bandwidth.
Nvidia has supported D3DFMT_V8U8 and D3DFMT_A8L8 since the geforce 3. Which predates proper support for DXTc(up to the geforce 4 they used 16-bit interpolation which resulted in fugly banding).
<!--quoteo(post=1845172:date=May 10 2011, 12:42 AM:name=SN.Wolf)--><div class='quotetop'>QUOTE (SN.Wolf @ May 10 2011, 12:42 AM) <a href="index.php?act=findpost&pid=1845172"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->although i am game for better than the best but a majority of gamers don't stand next to a wall looking for inperfections, In picture find game and porn yes but in NS2....Not very feasable.<!--QuoteEnd--></div><!--QuoteEEnd-->
It's not a subtle difference. It screams out to you from across the room. Textures in NS2 studiously avoid problem-cases for DXT; this doesn't mean that DXT is good enough, this means that you're missing out on the kind of textures DXT is badly suited for.
This wasn't directed to you so don't interrupt. You don't even have the context which is from outside of this forum.
You should have kept it in the right channel, outside of the <b>public</b> forum, if it was a private matter and you didn't want people interrupting. I'm well within my rights to question why, given no other context, you clearly have a problem.