Home Technical Talk

Dxt5NM in Max viewport?

polycounter lvl 18
Offline / Send Message
oXYnary polycounter lvl 18
I cant get dxt5nm normal maps to display normal maps correctly in the viewpoint with the metalshader in max 9.. I guess it doesn't know about the alpha channel containing some of the depth, so its only showing the rgb. Is there some trick I need to do to get this to work? Or would this all be dependent on the cards drivers to interpret?

Edit: Its for a static object space normal map if it makes any difference.

Replies

  • Eric Chadwick
    AFAIK you can't use DXT5nm for object-space maps, you need all three channels for them to work, and DXT5nm only stores two.

    There are some 3rd-party shaders that support the format, but only for tangent-space maps. Maybe Ben Clowards? Can't recall.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    DXT5nm

    This format was introduced in the original nvdxt library and since then it has become quite popular. It uses a DXT5 block to represent normals, storing the X component in the Alpha and the Y component in the Green channel.
    --
    found on the web, you very likely need to adjust shaders for proper normals, and as eric said it might be only for tangent space.. also as you see the alpha channel is overwritten.
  • Eric Chadwick
    Ahh I see most of Ben's shaders support DXT5nm, all of them except the first one, the Normal Map Maker, and the Skin Shader. He even tells you how to make the file properly.
    http://www.bencloward.com/resources_shaders.shtml
  • Rob Galanakis
    http://tech-artists.org/wiki/Normal_map_compression#DXT5nm

    There isn't much reason to use DXT5nm with OS normal maps. And if you are using TS normal maps, you will need a shader that interprets the texture data correctly (uses G and A as X and Y components, and calculates the Z on the fly).
  • Brice Vandemoortele
    Offline / Send Message
    Brice Vandemoortele polycounter lvl 19
    I might be wrong but as Eric said I think you can't regenerate object space normal map with only two components. You need to assume the vector only covers 180°.
  • oXYnary
    Offline / Send Message
    oXYnary polycounter lvl 18
    Well I guess that would explain why the 3dc failed as well since it is a object space map. Could this info be added to the polycount normal map wiki? I think only registered users can modify those pages.

    http://wiki.polycount.net/Normal_Map

    So, I guess that leaves me with 2 questions (only 1 directly related).

    1. What compression method can I use for decent quality with some compression without dxt1 on object maps?

    2. Are there any game engines that only support tangent or object maps (not both)? Other than quality and deformation. Which is more cpu intensive alone?

    EDIT: LOL Opps, I had rendered the normal map originally in world space versus local xyz (confused them). Questions above still apply, but it would have never worked in game. Do'h!
  • Eric Chadwick
    dxt5 (not dxt5nm) could be used for object-space, but still you'll get a ton of compression artifacts due to the way it compresses. There might be something better in the new dx10 formats though.

    Luxinia supports both. I think Unreal does too. Looks like CryEngine does not.

    Wish I had more time to add things to the wiki, too busy finding a job.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    lol thx for mentioning luxinia in the same line with unreal and cryengine ;)

    any engine supporting "shaders" or the concept of material systems (ie really all modern ones) can support object-space easily. as it doesnt require anything special (other than being able to do shaders in the first place).

    tangentspace requires that the engine feeds tangentspace vectors as per-vertex attribute. Which also very many engines will be able to do, yet as said some might not.

    so typically you will have both options available. However there is really "infinite amout of engines" out there. (ever looked at www.devmaster.net ?)

    as for 1) you probably oversaw this link
    http://developer.nvidia.com/object/real-time-normal-map-dxt-compression.html

    Artists tend to think if game A using engine B didnt make use of feature X, it doesnt exist. Which very often isn't true. Many engines are meant to be very versatile and can be fit for needs (that's their point). However that type of fitting might require a little manual work, and may not always be exposed in a simple manner (say code yourself vs ue3 like material editor), or may not be exposed in game A's version of the engine at all. In the latter it indeed may often be the case that due to "optimization" or whatever, certain features are locked out. But imagine someone paying tons of money for cryengine2 or unreal or whatever, and getting all the tools..., expect him to be able to do objectspace map if he wants to ;)

    what differentiates most engines, is actually their toolset, and how easy / how much it exposes features. How many "stock" effects exist and so on.

    so you gotta be more specific on what type of engine you ask for, are you alone, are just an "artist user" (ie you need editors/shader library...), all that will narrow down the amount of engines in question.
Sign In or Register to comment.