0
$\begingroup$

Two views of the model in Unity. Bottom model is rigged and is the right shape, but has weird normals. Top model is the raw mesh drawn without rigging

I've just built my first rigged model in Blender. Everything looks okay inside Blender, but when I export it as an FBX and bring it into Unity - not so much.

If I drag the whole rigged model into the scene, it's the right shape (and bends in the right places) but the lighting on it is crazy. Dragging the raw mesh into the scene and rendering it without rigging shows why: the underlying mesh is HUGELY distorted from how it was built in Blender.

I'm sure there's an option in there somewhere, either on export or on the bones or on the model. But I don't know what it is. If there are multiple settings change, I am fine with that.

Can anyone help? Thanks.

$\endgroup$
1
$\begingroup$

EDIT: The video posted by Aster17 includes a step correcting for object scale prior to export, along with many other steps, so refer to that for your exporting needs. I'm only accepting this answer rather than Aster17's because this answer explains what happened in this specific case in more detail.

I tracked down the cause: in the very first edit I had made when sculpting the model (after adding and subdividing a cylinder primitive) I had accidentally scaled the object rather than the vertices to make the shape longer and narrower.

This obliged Blender to similarly apply an asymmetric scale to the bones of the armature when parenting the rig to the mesh, in order to preserve its appearance. However, it seems that at some stage in the Blender->FBX->Unity workflow, the ability to cope with asymmetrically scaled normals is lost.

In short, Blender hadn't distorted the mesh at all - I had, right at the start. All Blender did was bake that distortion into the bones.

The upshot is that if you asymmetrically scale an object (as opposed to its vertices) in Blender, then Blender and Unity will come to different conclusions about the normals that should accompany that shape.

$\endgroup$
-1
$\begingroup$

I have seen your question. This is a very common problem faced by everyone while they export their project from a 3d software to a game engine. There are quite a lot of settings for this and not just a button that says "Please don't ruin my mesh when I send it to a game engine" (Even though we all wished for it to exist). Luckily, I have just the video for you. Keep in mind this video is for versions 2.8 and higher. It should work for 2.7 versions too though. After you follow these settings, re-export the model to Unity. Here's the link:

https://www.youtube.com/watch?v=ysl0qYq5p9w

A small tip, please don't try to add jokes to your question. It seems unprofessional. I know you are new, so you don't know, so got this link for more help:

https://blender.stackexchange.com/conduct

Hope it helps.

Cheers, Aster17

$\endgroup$
10
  • $\begingroup$ Much obliged. I discovered the cause of the problem and fixed it, so I'm posting an answer in case anyone else makes the same blunder. $\endgroup$ – Peeling Feb 18 at 12:46
  • $\begingroup$ But my did my answer help ? $\endgroup$ – Aster17 Feb 18 at 12:51
  • $\begingroup$ It's good advice and will no doubt come in handy later, but no, not in this specific instance. It turns out I had made an error when initially sculpting the model, which had a knock-on effect later when the armatures were added and parented. I doubt anyone else will ever make the same mistake, but just in case, check my answer for details :) $\endgroup$ – Peeling Feb 18 at 12:55
  • $\begingroup$ You know, you could have fixed the problem by clearing the scale, rotation and position after rigging and animating it. This problem always happens if this step is not solved followed. The steps are provided in the video. But, is your problem solved ? Just out of curiosity though, what is that object you are importing into unity ? $\endgroup$ – Aster17 Feb 18 at 13:34
  • $\begingroup$ I fixed it by unparenting the mesh and rig, setting the object scale to 1,1,1 selecting all the vertices and scaling THOSE instead, setting the root bone scale to 1,1,1, and then reparenting the mesh and rig. The object is a spider leg. $\endgroup$ – Peeling Feb 18 at 16:06

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.