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

Wierd/Wrong import of COLLADA (.dae ) files #5

Open
nicolamarella opened this issue Oct 25, 2020 · 8 comments
Open

Wierd/Wrong import of COLLADA (.dae ) files #5

nicolamarella opened this issue Oct 25, 2020 · 8 comments

Comments

@nicolamarella
Copy link

nicolamarella commented Oct 25, 2020

Hello,
I am currently using this project to import at runtime a COLLADA file, but for some reason, the import seems to be all messede up.
Using the Unity editor to import del file, seems to be working correctly, here is the exptected result:
correct

Yet, when I use the importer at runtime, this is the result:
runtime_collada

Wierdly enough, some other .dae files get imported correctly, for example the anymal_thigh_r.dae attached to this issue get imported correctly.

I've tried different extension of the same file, for example .obj and .ply, which seems work to but I cannot get the vertex colors rendered in that case (feature I need)

Attached to this issue there is also the file used in the screenshot. As I am quite new to working with 3D files, I have very little clue on what might be issue.

Here are the meshes that causes the wierd behaviour:
meshes.zip

Thanks in advance

@janthiede
Copy link

What is the COLLADA version of your file? (To find out, check the "version" attribute of the tag in your file.)

I had the same issue when trying to import files with version 1.5.0. However, files with version 1.4.1 (as exported from Blender 2.79b) are imported correctly at runtime.

@nicolamarella
Copy link
Author

Hi Jan, thank you so much for the hint. I have tired using Blender to import/export the file, which actually was at veersion 1.5.0 and now it's 1.4.1. The result is a bit different, but still wrong, pretty much as the 1.5.0.
Here is the 1.4.1 file if it might be helpful
version_1_4_1.zip

@janthiede
Copy link

Hi Nicola,

I did some experimenting with your 1.4.1 file. As the issue looked very much light a problem of vertex ordering, I changed the lines

uIndices.Add(f.Indices[2]);
uIndices.Add(f.Indices[1]);
uIndices.Add(f.Indices[0]);

to

uIndices.Add(f.Indices[0]);
uIndices.Add(f.Indices[1]);
uIndices.Add(f.Indices[2]);

in MeshImporter.cs. This seems to restore the shape of your mesh.

Cheers, Jan

@nicolamarella
Copy link
Author

Thank you again so much for the patience and the support.
Unfortunately, your proposed change does not seem to have solved the issue, this is the current result
1_4_1
may it be related to Unity settings and/or version?

@eastskykang
Copy link
Owner

@nicolamarella I'm so sorry for late response. Did you try to change the ordering of normals too?

@nicolamarella
Copy link
Author

@eastskykang no worries. Unfortunately, at least for now, I am not working on the project anymore so I haven't really gone in too deep with the matter. I will update this issue if I find something out. But thanks for your support.

@NoTuxNoBux
Copy link

Hi @nicolamarella, I also had issues with models where some render correctly and others don't. If all of these models are medium-sized to large, you may be experiencing the same issue I had - your broken models certainly expose very similar problems. You may want to check out #11.

@nicolamarella
Copy link
Author

Hey @NoTuxNoBux,
although way too late for my purposes, as the project has ended, I appreciate the feedback and really hope this will help other people :)

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