3d Models stretched.

Hi there.

I’m messing about with 3d models for the first time and I’m having - what I’m sure is - a very basic problem.

My model loads, displays and rotates as it should, but it’s stretched. It’s as if the model has been rotated around it’s z axis by 90’ but squeezed into the original footprint shape.

I’ve exported the model from Blender, now I have heard there are rotation issues with the export, but only with matching axis directions, not stretching.

My drawing code is as simple as it gets so there’s no problem there.

I thought this was a blender issue for a while, but I got hold of FBX converter and the model appears absolutely fine there. As I said, my code couldn’t be simpler, I load the model, I setup 3 matrices, and I draw the mesh. I have no code to adjust anything.

So, how come my model is stretched out of whack? I’m very confused.

Here’s the model in Blender.

Here’s the model in FBX.

And here’s how the model get’s loaded into Monogame.

I think it’s safe to say, summat aint right!

I suggest you to upload and share model somewhere. Thing is FBX carries scale information and blender is incredibly bad at exporting (and even worse at importing). I suggest either use Blender´s tool to remove all deformation or drag it through more raw format like .obj.

I know Blender isn’t great at a lot of things, but I have kind of got used to using it over the years. This is the first day I’ve ever tried exporting objects though.

However bad Blender might be at certain things, FBX reads the export perfectly, so I can’t believe this is all Blenders fault.

If not Blender, what would people recommend for model creation?

Thanks.

Blender should be fine (as a free software it does its job quite well to me)
Just take care of the scales on each axis when exporting

I’m finding any object that started as a cube is warped into a cube shape, no matter what it has been changed to or how many vertices have been added and/or moved. And removing all scaling and other transformations makes no difference. What version are you using?

I’m using the 2.77a. My only problem is the axis rotation: the model in monogame is always rotated by PI/2 along the x axis if I’m correct. So i had to verify the correspondig checkbox.
Maybe it’s a problem in your exporter/plugin.

FBX can be exported with Y-Axis Up or Z-Axis Up. 3ds Max defaults to Z-Axis Up and Maya defaults to Y-Axis Up. The XNA Model Importer corrected this when required by swapping Y and Z if an imported model had Z Up. I’m not sure if ours does this or not. As for the scale, there’s most likely a transformation matrix in the model that needs to be baked into the vertices. We’re likely not doing that either.

Yes you’re right, there was a transformation I was entirely unaware of which was messing everything up. I’ve redesigned something simple for testing and it looks good.

However, I’m having some rotation problems which I think might have something to do with the ‘Up’ conflicts. I’ve setup some simple code to rotate the model on the x,y and z axis, but x and y do exactly the same thing.

In MG which is the native view port direction? Am I looking down on the scene, or along the x or y?

There is no such thing, it’s up to your camera to deal with these (camera can view any direction, just take care of the up vector)

Can Blender export ascii FBX format ? If yes, you have this section:

ObjectType: “Model” {
Count: 1
PropertyTemplate: “FbxNode” {
Properties70: {

which contains transform for the object. There are also a lot of talk about FBX issues with XNA, some people advise to reset XForm (in 3dsMax) before exporting, there’s maybe something similar in Blender.

A very good link full of FBX related infos => Dark Genesis blog

I figured out a solution, it’s quite simple:
My best guess of what is happening is that Monogame and Blender’s scaling systems don’t line up, but that’s a guess. How I solved the problem, in Blender, select your model and do Ctrl / Cmd + A. Then select “Scale”. Now, you shouldn’t run into any issues importing the model!