0
$\begingroup$

I'm currently working on a game project using MonoGame, and I have been using Blender as my "level editor" in a way:

enter image description here

Now, in that image, you can see I use the same bush and tree model multiple times. Unfortunately, each of those is a different mesh separate inside the same object, instead of all being linked dubplicates of an object. The reason for this, is because when I export a .fbx, all my transforms (position, rotation and scale) get cleared, so I'm left with all my objects in the middle of the stage at 0,0,0.

Is there any way to have it so that when I export, Blender temporarily applies position+rotation+scale to each object. It would really save me a lot of time in editing if I could just move objects around instead of vertices as I am now.

Thanks in advance for any help on this matter!

EDIT: More info:

enter image description here

At the moment, the way that currently works is like so [1.] (I've selected one object). Note how the origin of the object is at 0,0,0, but its vertices are offset to where I want them to be.

If I were to separate them like I want them, and have the origin be in a useful location relative to the mesh [2.]

Then when I load the FBX into my game, this happens (the position of the objects doesn't get exported, so they go to 0,0,0) [3.]

EDIT: I found out that there was nothing wrong with Blender's .fbx exporter. I could get the transform of each object by using: ModelMesh.ParentBone.Transform

$\endgroup$
  • 1
    $\begingroup$ Please don't add "Solved" to the title, and don't add the solution as part of the question. Write an answer in the answers section of the page and mark it as accepted. To the StackExchange system the question remains "unanswered" unless there is an "accepted" answer or one with positive votes. If you need help to understand how this site works please take the tour and read the help center section $\endgroup$ – cegaton Apr 27 '18 at 13:34
0
$\begingroup$

They should be separate objects. Right now, by your explanation, blender sees it as one mesh.

different mesh separate inside the same object

They are not different mesh. Blender sees it as one mesh when grouped as object.

In edit mode, select one plane at a time and hit P. Choose selection option. Now it's a separate object you can apply loc,rot,scale to.

$\endgroup$
  • $\begingroup$ Thanks, but that doesn't really work. Sorry, I should have explained myself better (I'm not that good with terminology). Please see my original post (I've edited it for more details). $\endgroup$ – Milun Apr 8 '17 at 2:34
  • $\begingroup$ Ok, let me see if I understood. In object mode, all three planes are one object correct? And it has the origin of 0,0,0 correct? $\endgroup$ – LetTheWritersWrite Apr 8 '17 at 3:54
  • $\begingroup$ At the moment, yes. I CAN seperate each individual bush/tree/etc. into their own seperate objects, BUT, when I export, they still need to each have 0,0,0 as their origin, regardless of their position. The thing is, I'd rather let the object position dictate where they are, rather than the mesh position (because that way it's much easier to duplicate and modify them. If I duplicate them now, I'd still need to move the vertices around (in order to keep the origin at 0,0,0), which would affect all the other duplicates too). $\endgroup$ – Milun Apr 8 '17 at 4:07
0
$\begingroup$

I found out the answer: there was no issue with Blender's .fbx exporter. I could get the transform of each object by using MonoGame/XNA's: ModelMesh.ParentBone.Transform

$\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.