Ooops
September 29, 2020, 02:01:45 PM

Author Topic: Struggling with blender distortion  (Read 320 times)

Offline Kippykip

  • Full Member
  • ***
  • Posts: 128
    • Kippykip Forums!
Struggling with blender distortion
« on: August 25, 2020, 09:36:05 AM »
Hey guys, I was just looking at advise in creating bones in Blender itself, as it seems whenever I export to .B3D models the output is stretched beyond belief.
However when loading already animated models from other formats like .ms3d into blender, then exporting, it's fine. However the bones are just outwards sticks making it hard to pose (but edits do export correctly).
I've toyed with older exporters and versions of blender but I just seem to be hitting the same brick wall again.

Here's how the meshes should look (I've only animated 1 arm)


But here's how the end up looking:


I'm starting to think that the size of the bone bits are actually scaling the model? I really don't get it.
I don't seem to have issues when the models are segmented like Mario 64 though. Weird

Offline Derron

  • Hero Member
  • *****
  • Posts: 3185
Re: Struggling with blender distortion
« Reply #1 on: August 25, 2020, 10:06:36 AM »
I do not know b3d (never used it)

blender:
- attention to bone roll
- apply scales of models before attaching "rigs"  (ctrl+a -> scale)
- bone scale ... maybe check that too


bye
Ron

Offline Kippykip

  • Full Member
  • ***
  • Posts: 128
    • Kippykip Forums!
Re: Struggling with blender distortion
« Reply #2 on: August 25, 2020, 11:06:58 AM »
I do not know b3d (never used it)

blender:
- attention to bone roll
- apply scales of models before attaching "rigs"  (ctrl+a -> scale)
- bone scale ... maybe check that too


bye
Ron

Hmm, I'm starting to believe it's something to do with blenders bone weights.
As when I parent the mesh on the bones with automatic weights rather than by hand (empty groups), they seem to be working! (Albiet needed some fixes on the head)


Offline Kippykip

  • Full Member
  • ***
  • Posts: 128
    • Kippykip Forums!
Re: Struggling with blender distortion
« Reply #3 on: August 25, 2020, 11:57:20 AM »
EDIT: Turns out I actually found the issue later on, it seems if you have multiple VERTEXES with a weight of 1, then it'll distort.
Doing that weird trick I posted below fixes it because it unassigns some vertices in the process.
The real way to do it, is to use vertex selection mode and make absolutely sure you don't assign the same vertexes on multiple bones (or vertex groups whatever you wanna call it).



Avoid using face select, do it by vertexes and you should be good! Test it in Fragmotion or something if you want to be sure.

Original reply:
Found the issue!
So it turns out when dealing with bones that have parents (for example, on arms etc), the children need to also have their parents assigned to the vertex group but with a weight of 0.
Otherwise they distort for some reason. This can probably be fixed by editing the .B3D export script.
In the meantime here's the workaround:

Doing it correctly:
NOTE: I stupidly named the "shoulder" bones the "elbow", so in the screenshots pretend elbow = shoulder... Ok?



So here's my hand, I've actually also got the hand assigned to the same polygons as the arm and shoulder.


Technically though, this is the only part that has a weight of 1.0, the rest of the selected bit from the above screenshot has a weight of 0.0



As I move over to the parent bone (the arm), I don't have to assign it's children (the hand). But I still have to assign the Shoulder, but set the shoulders weight to 0.0 again.


Although technically once again, this is the only part that has a weight of 1.0, the rest that was selected from the above screenshot I set the weight to 0.0


Then last, there's the highest parent bone in this set, which is the shoulder.
In this case, I just assign the right set of polygons and don't have to worry about selecting the children or anything. So I set this to 1.0


If I go to the weight paint mode, you can kinda see how these were assigned a bit better




This fixes the exported file!


____

Doing the workaround INcorrectly:
I did try the same thing but the other way around for the other arm for curiosity, but it doesn't fix the distortion glitch after the export. So the order I posted above is how to do it.





You can see when I load the .B3D model in FragMotion that KK's left arm is fine while his right arm is broken.



Of course this behavior shouldn't be happening during the export, but I'm gonna play around a bit in the export script and see if I can fix this glitch.

Offline Kryzon

  • Full Member
  • ***
  • Posts: 230
Re: Struggling with blender distortion
« Reply #4 on: September 10, 2020, 09:47:29 AM »
Bro, let me just recommend the Inside Out weight painting method that makes weight painting a whole lot easier (it blew my mind when I finally learned it):


You can do the same in Blender if you have the Normalize Unlocked add-on (it's free): https://gum.co/normalize_unlocked

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal