Home Technical Talk

XNormal: object nm to tangent issue

GhosTDoG
polycounter lvl 6
Offline / Send Message
GhosTDoG polycounter lvl 6
Hi,

got issues to convert an object space nm to tangent space nm with xnormal.

The converted map is calculated totally wrong.

I did tesselate the bake mesh to avoid skewing and want to re-bake the OS NM to my lowpoly to get a proper tangent space map.

I did export the lowpoly as sbm with default settings.
Do I have to uncheck normals, bi-normals and smoothing groups for object space normal maps?

thx

Replies

  • JedTheKrampus
    Options
    Offline / Send Message
    JedTheKrampus polycounter lvl 8
    Do you have any sort of two-sided shading enabled? Are your faces all facing the right way? What are you exporting from?
  • GhosTDoG
    Options
    Offline / Send Message
    GhosTDoG polycounter lvl 6
    Do you have any sort of two-sided shading enabled? Are your faces all facing the right way? What are you exporting from?
    I' m exporting from 3ds max. Discard back-faces hits is checked in XNormal.

    I did explode the mesh on frame 2 and did export from frame two. Maybe this only works with the baker and not with the converting tool?


    EDIT: If I export a tangent space nm from the tesselated mesh, the tangent space nm looks good.
  • GhosTDoG
    Options
    Offline / Send Message
    GhosTDoG polycounter lvl 6
    I guess it's a bug.

    I used handplane with obj and it works, but only with obj. If you use fbx with tangents+binormals. you'll get the same error like in Xnormal.
  • EarthQuake
    Options
    Offline / Send Message
    Did you rotate the non-tessellated mesh or something like that? If you rotate a model with an object space map you will mess everything up.
  • GhosTDoG
    Options
    Offline / Send Message
    GhosTDoG polycounter lvl 6
    EarthQuake wrote: »
    Did you rotate the non-tessellated mesh or something like that? If you rotate a model with an object space map you will mess everything up.

    No, the final low poly was not rotated. Just did a re-import with fbx, obj and sbm files into max - no flip or rotation.
    I always reset x form before export and it was the same mesh. I just deleted the tesselation modifier.

    Maybe xnormal scales or flips the mesh on import within the tool?
  • Farfarer
    Options
    Offline / Send Message
    xNormal expects the up axis to be Y for meshes and object space maps, but Max uses Z for up. That can lead to problems if you've baked the OS map in Max (the blue and green channels are essentially switched around).

    You can try exporting the mesh after you've rotated 90 degrees on X, see if that helps?

    Handplane might be working better because it's able to detect which way is meant to be up and account for any differences.
  • GhosTDoG
    Options
    Offline / Send Message
    GhosTDoG polycounter lvl 6
    Farfarer wrote: »
    That can lead to problems if you've baked the OS map in Max (the blue and green channels are essentially switched around).

    I baked the OS with -y ( for Max; Cryengine) in Xnormal.
    I flipped it in PS to +y, and it works now. Mesh axises weren't the issue.

    Didn't know, that a flipped channel with OS NM causes problems due to tangent nm conversion.

    THX
Sign In or Register to comment.