0
$\begingroup$

Edit: When I use FBX ASCII export and set Normals == None in Unity's import settings it allows me to access the vertices as expected, I have no idea why this works though..

I was trying to figure out what was wrong with altering the vertices of my model and found that printing the vertices of a model imported from blender resulted in every vertex being == (0, 0, 0). Using the same script to print the vertices of a Unity created Cube worked as intended.

        GameObject go_body = GameObject.Find("tiger_body");
        Mesh mesh_body = go_body.GetComponent<MeshFilter>().mesh;
        Vector3[] body_verts = mesh_body.vertices;
        for (int i = 0; i < body_verts.Length; i++){
            print(body_verts[i]);
        }

Does anyone have any insight into why the blender model is different? I additionally don't understand how the game engine can render it in the correct place when all of the mesh's vertices are equal to (0, 0, 0)?

Thanks in advance! alt text

alt text

alt text

I tried exporting it in ASCII instead of binary and the vertices exist as expected in the fbx file, why is Unity not recalling them properly with mesh.vertices;?

Additionally, when I export using .OBJ the vertices work as expected as well.

alt text

$\endgroup$
0
$\begingroup$

Actually I think I figured it out. If I uncheck the Scale Import option I won't get all 0.0s. I think its because my model is too small so when it scales it down, everything is too close to 0.0. I imagine you were getting the same thing as most of your values are already 0.1 and then scale it down 100x it becomes 0.0.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.