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

UE5 Rendering Issue #20

Open
gedden opened this issue Sep 6, 2022 · 4 comments
Open

UE5 Rendering Issue #20

gedden opened this issue Sep 6, 2022 · 4 comments
Assignees

Comments

@gedden
Copy link

gedden commented Sep 6, 2022

The Issue

After importing to UE5, models will flicker when viewed from above in the editor. (In game or in the static mesh previewer)

Notes

  • Compiling for UE5 functions perfectly.

  • The import process works for files created under MagicaVoxel 99.6.4

    • // Does not currently work for 99.7 (beta)
  • This will occur with all models that are imported using Vox4u. (does not appear to be a specific model causing the problem)

    • used magica voxel default model "chr_knight" as a test
  • Flickering appears to only occur from certain angles -- usually from above

  • converting the static mesh to nanaite solves the issue

  • exporting the model as OBJ (from magica) and then importing to the engine functions properly (tho its not nearly as nice as this great plugin!)

  • exporting the static mesh to FBX from within the engine and reimporting solves the issue

    • When this happens, the following messages appear

    EXPORT_StaticChar_Knight has degenerate tangent bases which will result in incorrect shading. MikkTSpace relies on tangent bases and may result in mesh corruption, consider disabling this option.

    EXPORT_StaticChar_Knight has some nearly zero bi-normals which can create some issues. (Tolerance of 1E-4)

@mik14a mik14a self-assigned this Sep 7, 2022
@mik14a
Copy link
Owner

mik14a commented Sep 10, 2022

Thanks for the report.
I was looking for a solution to the same problem.
I think this is a UE5 issue with scaled static mesh builds.
If you want to see the details of the problem, you can view the Bounds in the mesh preview and see that they do not work with the scale of the mesh.

Try applying Build Scale 1x in the Details panel of the mesh preview while displaying Bounds.
Or, try importing voxels with the scale set to 1x.

I will try to until the engine is fixed, the scale option on import will be fixed at 1.0.

@gedden
Copy link
Author

gedden commented Sep 11, 2022

That is good to know. If I get a chance, I believe the mesh optimizer inside Unreal re-calculates bounds. I may give that a try as a post-import step now that you identified the issue!

I really appreciate you're work here, thank you.

@ArseniyZvezda
Copy link
Contributor

I confirm that this fix ⬆️ works for me. It needs to be added to the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@gedden @mik14a @ArseniyZvezda and others