Problems with exporting a model to Godot

I’m trying to import a model I made on Blender onto my FPS project on Godot, but the gun is always way off position wise.

I think the problem is that I didn’t apply the model’s position first, but when I try to re-append the model, it’s always forcing me to make a proxy (despite being appended, not linked) and that stops me from applying the position…

This is how it’s supposed to be:


This is how it’s turning out:


What do I do?

Attachments

models.zip (1.9 MB)

You may have to post a file for us to see…

Okay, I updated the original post.

Okay just a quick look… at your file…
the Arms Mesh… (that you have named “Human”) has a set of Rotations on it…
while your Armature (MetaRigg) does not…

This needs to be corrected or you will continue to have problems with your setup…

In order to fix this you will need to unparent the “Human” Mesh from the Meta Rigg and then “Apply” Rotations to it…
then Re Parent the MetaRigg to the Mesh…

That might not solve your immediate problem with your Rifle alignment…
but you will have lots of goofy problems with your Main Rigg and mesh if you don’t do this…

That is to say… when you setup a Mesh to have an Armature controlling it…
the Rigg and the Mesh must have their Transforms in Sync… (that is… Location, Rotation and Scale)…
all set the same… the easiest way to do this is to have them all Zeroed out… (well Scale is set to 1.0)
before you Connect the two together with Parent and Modifier…

you may already know this… but I it’s easy to over look in the heat of getting things done…

I also note that on your “Human” Mesh you have the standard 3 Modifiers…
Mirror
Armature
Subdivide
In order to fix the problem you will need to Select the Mesh and Kill the Mirror and Armature Modifiers (that is delete them)
before you do your “Apply Transforms”

after you have done your Apply Transforms… you can go back and add them back in…

you will need to adjust your poses after doing this…

The same can be said for the Armature you have on your Rifle in your Rifle file…

the Transforms for the Rigg and the Mesh must be the zeroed out… (except scale is set to 1.0)

Except in this instance it is your Rigg that does not have the Location Transform zeroed out and your Rifle Mesh does…

Okay, I found a way to make Blender allow me to apply the transform of the objects, which zeroes out the assault rifle, but the exported model is still way off…

I’ve attached the updated files… what am I doing wrong?

Attachments

modelsv2.zip (2.16 MB)

Okay, I found a way to make Blender allow me to apply the transform of the objects, which zeroes out the assault rifle, but the exported model is still way off…

well… all the objects have to their transforms Zeroed out…
any object connected to an Armature…
that would be this list of objects…

Assault_Rifle
Chemical Bomb Launcher
Human

the easiest way to avoid this when you import the objects… separate them from the Armature…
then do the “Apply Transforms” on them… then re connect your Armature…

you will have to do some adjustment in pose mode as this will change any animation you have set on them…

That’s what I did, but the problem persists…

That’s what I did, but the problem persists…

Your saying you did this in the file you up loaded?

the ‘AssaultRifle21.blend’ file?

No, only after I appended it.

Should I do it on the file itself beforehand?

i would say, that it’s because your gun origin point is WAAAY off there, kind of looks like where the gun ended up in your screenshot from Godot. so, try this: unparent the gun… then do “Origin To Geometry” for the gun, then parent it again to the hand.

.b

Should I do it on the file itself beforehand?

yes… might not be the root of the problem but I know it can mess things up…

i would say, that it’s because your gun origin point is WAAAY off there, kind of looks like where the gun ended up in your screenshot from Godot. so, try this: unparent the gun… then do “Origin To Geometry” for the gun, then parent it again to the hand.

That’s okay to do this… but you need to do it to the Rifle’s Armature also…

Remember…

The Object Mesh and the Armature it belongs to…

‘must’ ‘must’ ‘must’ ‘must’…

have the same origin point…
or you will have problems…

@basse
please note that in his file AssaultRifle21.blend file… the “Assault_Rifle” Object has an Armature modifier that is connected only to the Rifle…

I’m assuming he’s wanting to Append that Armature into the ‘FPS Arms.blend’ file along with the object…

Which got me to thinking…

be sure and name your Armatures separately…

also note that when nameing… you have to not just name the Object but also it’s Object-Data…

the name of the Object can be found in the Properties Panel > ‘Object’ the (cube Icon) and the Object-Data name can be found under the Properties Panel > Object Data (the Triangle Icon for regular objects… and the little man Icon for Armatures…)

always make the Object and Object Data names the same…

This is important because multiple Objects can share the same object Data…

and you don’t want that in this case…

How do I do that? I tried searching for an action of that name, but nothing came up…

Whenever object origin goes weird, I do this to re-orientate:

  1. OBJECT mode reset transform
  • 3D cursor to center
  • snap object to cursor at scene center
  • re-locate or re-rotate the object, then Ctrl A to apply new transforms
  1. EDIT mode reset transform
    take the object into Edit mode; manually transform the whole mesh relative to its own origin dot.

I have found the second method most reliable, as you could leave the object wherever it is in the scene, after the object exited Edit mode, it gets a new zero transform. So we won’t get a chance to “forget” to apply transform.

I just tried them, and the problem persists…

How do I do that? I tried searching for an action of that name, but nothing came up…

We are not talking about Actions here… but object starting positions (Blender will call these Origins)…

I just tried them, and the problem persists…

you must be doing some thing wrong…

what GogoDisco
layed out is absolutely correct in getting everything to line up first…

if none of the Objects were lined up with the proper origins to start with… then aaaaaalllllll you actions and animations will be off…
every single one of them and you will have to redo all of those…

so you absolutely must align the Objects Origin point with the Associated Armature Origin point… before you do any animation or actions…