Home Unity

Can someone explain OpenGL/DirectX workflow? This is weird.

jordank95
polycounter lvl 9
Offline / Send Message
jordank95 polycounter lvl 9
Here's my Maya>Unity workflow, and I can't figure out why this is working the way it does.

- Export Maya FBX with Smoothing Groups and Triangulate checked into Painter for texturing. 
- Once done, import into Unity with default settings - Normals set to Import and Tangents to Mikkt
- Project is set to DirectX11
- Import my DirectX normal maps I created in Painter.
- Create material and make sure my normal maps are set to Normal Map in Texture Type.

When I do this and apply material to my mesh, the normals are wrong. The only way to fix this is by checking the "Flip Green Channel" in each and every normal map. 

Why do I need to do this if everything is already set up for DirectX? Am I missing something here? This is driving me up the wall.  :/

Replies

  • Fabi_G
    Offline / Send Message
    Fabi_G high dynamic range
    Hi! If you`re using DirectX Normal Maps (Y-) with Unity (OpenGL Normal Map, Y+), what you`re describing is expected behaviour. The wiki page contains a handedness section.

    As far I know, Painter has some export presets for both Unity and Unreal out of the box, you can check how they`re set up.

  • jordank95
    Offline / Send Message
    jordank95 polycounter lvl 9
    Thanks @Fabi_G - all that I think would make sense if the project was set to OpenGL, but I already have the Unity project set to DirectX. Why am I still having to flip the green channel?
  • Fabi_G
    Offline / Send Message
    Fabi_G high dynamic range
    I see, must have missed that info in your original post.

    While I don`t know what`s happening under the hood, I think from a content creation point of view, keeping normal map handedness consistent and independent of graphics API used makes things easier and less error-prone (for example Unity marketplace assets work regardless which graphics API the project uses). Dependent on graphics API the shaders could run a different path so the working in editor experience is the same (something in that direction). But that is just me guessing as non-tech person, maybe someone with deeper technical knowledge knows more.

    If the priority is to create game art, I would accept that Unity by default requires Y+ normal maps and just run with it.
  • jordank95
    Offline / Send Message
    jordank95 polycounter lvl 9
    Yeah I think thats my only choice. Thanks for the help though!
Sign In or Register to comment.