CurseForge and Overwolf are joining forces!
Awesome More Information
  • 0

    posted a message on How to convert HotS and Starcraft 2 parallax occlusion maps (the orange bump maps) to standard blue normal maps?

    This is probably too late but I thought it would be useful info:

     

    I have no idea how to do it in gimp...  I could do it in photoshop pretty easily.

     

    sc2 engine uses DXT5nm DXN normal maps.  Aka Swizzled red-alpha channels.  In conversion to dxn the red channel is moved to the alpha and only the Green and Alpha channels are used as they are the highest quality channels.  Normally in DXN the blue channel and red channels are destroyed.  In SC2's special texture converter the the Red and Alpha are swapped and the original alpha channel is used as a height map in the red channel.  In any other DXN texture conversion tool the Red channel is just destroyed.

     

    In either case the blue channel can be recreated from the other two channels.  There is math involved.  B = sqrt(1 - R^2 - G^2)

     

    There is a dirty way to recreate the blue channel in photoshop:

    Copy red channel to new Alpha and Alpha to new red channel (this reverses the swizzle)

    Copy and paste the new red channel to a new layer and into the blue channel

    Ramp the new blue channel where source 128 is ramped to 255 white while both source 0 and 255 are set to 128.  An inverted v ramp.  

    In the new layer Copy the green channel to the blue and ramp the same.  Set layer to 50% opacity. Merge down

    done

     

     

     

    from the DDS Plugin Guide for Gimp

    "BC3nm / DXT5nm
    This is a variation of BC3 that is used to represent normal maps by encoding the X and Y components
    as follows: R=1, G=Y, B=0, A=X, this swizzle is used to facilitate decompression. Normal mapping has
    significant performance benefits over bump mapping, in that far fewer operations are required to
    calculate the surface lighting. "

     

    Cool thread on the same issue:

    https://steamcommunity.com/app/1840/discussions/0/3276824488721253491/

     

     

     

     

     

    Posted in: Artist Tavern
  • To post a comment, please or register a new account.