From b105305a19cf4cd403e3f9073a2382b37c698e7c Mon Sep 17 00:00:00 2001 From: luboslenco Date: Wed, 3 Dec 2025 10:42:07 +0100 Subject: [PATCH] Swap fbx up axis --- paint/plugins/io_fbx/io_fbx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/paint/plugins/io_fbx/io_fbx.c b/paint/plugins/io_fbx/io_fbx.c index 2cb30621..3e2fb317 100644 --- a/paint/plugins/io_fbx/io_fbx.c +++ b/paint/plugins/io_fbx/io_fbx.c @@ -35,14 +35,20 @@ void io_fbx_parse_mesh(raw_mesh_t *raw, ufbx_mesh *mesh, ufbx_matrix *to_world, uint32_t a = indices[v_ix]; ufbx_vec3 v = ufbx_transform_position(to_world, ufbx_get_vertex_vec3(&mesh->vertex_position, a)); + // posa32[pi++] = v.x; + // posa32[pi++] = v.y; + // posa32[pi++] = v.z; posa32[pi++] = v.x; + posa32[pi++] = -v.z; posa32[pi++] = v.y; - posa32[pi++] = v.z; v = ufbx_transform_direction(to_world_unscaled, ufbx_get_vertex_vec3(&mesh->vertex_normal, a)); + // nora32[ni++] = v.x; + // nora32[ni++] = v.y; + // nora32[ni++] = v.z; nora32[ni++] = v.x; + nora32[ni++] = -v.z; nora32[ni++] = v.y; - nora32[ni++] = v.z; if (has_tex) { texa32[ti++] = ufbx_get_vertex_vec2(&mesh->vertex_uv, a).x;