-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Mesh Import should normalize all normal data from every importer #3151
Comments
I think this is a good idea, and does fix the 0 length normal issue! Some questions-
I would also expand this to include the tangent vector since it needs to be treated the same way as the normal vector in this case |
Yes! |
Expanding to tangents sounds good. We can also decide on a #define for a standard normal to be used when we have a 0,0,0 normal, and also a standard to be used for invalid tangent
|
I think we should do two things:
That way if users are using bad normals the importer will warn them and point them to the setting to force normalize. The force normalize option can detect Vector3(0,0,0) normals and replace them with an arbitrary default normal (like (0, 1, 0)) |
doing some housekeeping of my own proposals, feel free to ask if you want it re-opened. we did some work to improve this and I believe it's not been an issue since 4.1.dev. |
Describe the project you are working on
Godot Engine Development
Describe the problem or limitation you are having in your project
We have normal data coming to the renderer with 0,0,0 this causes octahedral compression to fail, we'd like to eliminate all sources of invalid normals.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I've checked all importers:
They all will happily import 0,0,0 normal data.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Implement a simple function to normalize the normal data in the importer interface.
Ideas of a places to put this:
If this enhancement will not be used often, can it be worked around with a few lines of script?
Not really, there are millions of assets out there, many thousands with bad normal data.
Is there a reason why this should be core and not an add-on in the asset library?
YES. 🍰 its core that would need a tiny edit.
The text was updated successfully, but these errors were encountered: