Author Topic: OpenGL and DirectX  (Read 23080 times)

Hi~

 I have something confusing topic whenever I work for 3D art. That's about OpenGL and DirectX. I got pretty familiar with the terms already but hardly understand what exactly they are about. I just know they are related to normal map.

 Anyway I really want to make sure if I'm going to right way.
 Here is my option when I work with UE4. I thought UE4 needs DirectX based normal map while Unity does OpenGL.
 So please somebody give me opinions for better understanding or to fix my mistake. Thank you very much.

Last Edit: February 11, 2016, 09:55:00 am

Hey,
To make it simple, Direct X and OpenGl are 2 programming languages that are made to control your GPU (and therefore to control what they are displaying: like your 3D assets).

They are competitors, therefore there is some differences between them like the interpretation of the green channel of a normal map.

So, practically for UE4 and Unity : if you use the Substance engine, work in DirectX mode within SD or SP:
UE4 works with directX
Unity works with OpenGl, but our substance engine makes the conversion ( @Eric Batut is it still true?)

if you just export without using the substance engine, then you want to convert for Unity.

It's kind of you to give me your help Mr. Gault.
I have one more quick question to make it straight.

I figured it out I can use DirectX-normal map directly for Unity if the texture is produced via SD or SP.

Could you teach me if it's true once more please?

yes it's true, if you use a substance that generates the normal (if not you will have to export as opengl normal)
(I double check with @Eric Batut our substance engine god :) )

I've got that now. Thanks a lot.

Yes, by default the Substance integration code inverts the Y channel of a normal map that is output by Substance. This comes from the fact that the code dates form a time where normal map format was not configurable in SD/SP, and the normal maps we would output would need to be inverted to match in Unity.

This is still the case today, even if indeed making it configurable would be nice.

Best Regards,
Eric

Thanks for your advise.
I really like the feature that makes works easy :)