Normal Maps in VPX issues

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #163701
    Dark
    Moderator
      @dark
      vipMemberContributor

      Issues with tangent based normal maps were first discovered by Flupper when he tried to use normal maps on the spinning Lamp on TOTAN,  at the time I wasn’t entirely sure what he was talking about but now I do.  Toxie added support for ‘local XYZ’ normal maps with the option added for “object” based normal map rendering.  I think for clarity it should really be named Local XYZ enabled”.

      On 80% of models there are little to no issues with tangent based normal maps but some models suffer, particularly ones with somewhat flat surfaces that transition into curves.  The best example of this I’ve seen so far is the witch’s hat on the witch model I recently converted.

      normalmapissue  Left: no normal map.  Right: Tangent normal map applied.  Note the distortion on the hat.  If we observe the same model on sketchfab the hat appears smooth, it also appears smooth in 3ds max and blender.  This distortion is a reaction from the normal map to the env map in VP.  It should also be noted that similar distortion can often be seen on models with tangent based normal maps with screen space reflections – a good example is the batcave on the DE Batman table.

      https://skfb.ly/6QyuU

      So I tried rendering out the other normal map types to see different results, the only one (supported) that works with decent results on this model is Local XYZ, however it only seemed to have proper high lights when viewed from below:

      normalcompilation

      So for the next local XYZ render I did, I swapped the color direction, this made the highlights work when viewed from above:

      Before direction Swap: (-X,-Y)

      normalworld2

      After swap: (+X+Y)   – this is blender’s default orientation and vpx has been set to use this (see technical data on polycount) so that’s why it works once swapped.

      NormalXYZ_swap

      So this did ‘fix’ the issue but now even with the material set with maximum glossy value the highlights are not small and sharp but rather more spread out like we would expect with a lower gloss value.  For comparison this is how the model looks with tangent normal map with high gloss in sketchfab (looks a lot better imo):

      normal_sketchfab

      For technical details on normal maps see:

      http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Object-space_normal_map

      If you read the technical data linked above, you’ll see that tangent based normal maps are the most common in film and gaming because they are the only normal map format that supports character deformation by default.  They are also the easiest to edit after the fact.  So I will want to continue to render tangent maps for my models for other applications that can properly display the map since a majority of my models are ‘character’ types.  Although they rarely require deformation, I prefer to stick with what’s standard if possible.

      I’ve submitted all this information (and much more) to Toxie and Fuzzel in the hopes that they can fix the issue with tangent maps and hopefully improve normal bump map support over all.  As it is currently, I have to admit this has me fairly discouraged from working with VP right now.  Setting up normal map baking can be a tedious and time consuming process and now it appears in order to keep fidelity with both my models and how they work in VP I’ll need to render out multiple normal map types for every model.  Just to give an idea, I rendered the witch tangent normal map at 4096×4096 at the highest render quality settings which I would later downsize, took around 18 hours to render on my older workstation (quad core i7), and that’s just render time once I have everything set up nicely for baking.

       

      If you want to check out the test vpx table I used above with all the normal maps it’s available for download here

      3dcreation

      2 users thanked author for this post.
      #163704
      Dark
      Moderator
        @dark
        vipMemberContributor

        I’m not necessarily an expert but I think the problem lies some where in this (from polycount technical data):

        “Light rays are in world space, but the normals stored in the normal map are in tangent space. When the model is being rendered, the light rays must be converted from world space into tangent space, using the tangent basis to get there. At that point the incoming light rays are compared against the directions of the normals in the normal map, and this determines how much each pixel is going to be lit. Alternatively, instead of converting the light rays some shaders will convert the normals in the normal map from tangent space into world space. Then those world-space normals are compared against the light rays, and the model is lit appropriately. The method depends on who wrote the shader, but the end result is the same. Both methods require a tangent basis to transform the lighting.”

        3dcreation

      Viewing 2 posts - 1 through 2 (of 2 total)

      Forums are currently locked.

      ©2024 VPinBall.com

      Log in with your credentials

      Forgot your details?