Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ej01 normal maps: which direction? #1

Open
illwieckz opened this issue Feb 25, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@illwieckz
Copy link
Member

commented Feb 25, 2019

While investigating parallax mapping, I discovered the fact DirectX and OpenGL normalmaps are reverted together.

@EmperorJack, do you know if you intended to do the ej01 normal maps the DirectX way or the OpenGL way or did you intended nothing?

@EmperorJack

This comment has been minimized.

Copy link
Member

commented Feb 25, 2019

Hey @illwieckz - I can't say for sure but I do vaguely remember having to invert an axis in blender when baking out my maps. So perhaps whatever blender uses is what I had to account for. Is it possible there could be an issue in the future with this?

@illwieckz

This comment has been minimized.

Copy link
Member Author

commented Feb 25, 2019

Basically to switch from DirectX to OpenGL format or to go the other way is just a matter of inverting the green channel in normal map files. So, it's not a big issue if some existing files are in wrong compared to what engine expects or if we have to change the direction the engine expects. But if we have to fix something, either in assets, either in engine, it's better to not do it in years. 😁

Basically, while toying with xonotic assets I discovered that our engine expects the xonotic normalmap and heightmaps to be reverted to be rendered correctly, and for heightmaps, now I'm sure our engine is wrong. For normal map there is no wrong or right direction, there is just two standards and we have to live with it.

Among Darkplaces and Dæmon engine I'm trying to tell which one is doing things the DirectX way and which one is doing things the OpenGL way…

@EmperorJack

This comment has been minimized.

Copy link
Member

commented Feb 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.