Jump to content

Exported Blender Model is twisted


 Share

Recommended Posts

I've been working with a blender guy for quite a while now, every one of his models worked properly when exported to bjs, until now.

He created an animated model which is slightly more complex than his previous ones, and he can't seem to figure out what's wrong with it.

It looks great in blender, but when exported to bjs the animation looks twisted.

 

You can download the .blend here:

https://www.dropbox.com/s/9b5ucks6v7elj39/data.blend?dl=0

Here's a video of how it looks when rendered in bjs after exported using the latest Blender Exporter (5.6.2):

https://www.dropbox.com/s/e9cm7rpljppsw6i/isolated animation.webm?dl=0

 

Can you please help us understand what's wrong and how to fix it?

Link to comment
Share on other sites

I just noticed the warning, I have a feeling I already encountered a similar issue in the past.

This is the reason right? If so, how can I find where the extra influencers are? Will reducing them require re-animating everything?

Quote

WARNING: Maximum # of influencers exceeded for 317 vertices, extras ignored
            Total Influencers:  31944
            Avg # of influencers per vertex:  3.0028
            Highest # of influencers observed:  15, num vertices with this:  317
            exported as 8 influencers
            num skeletonWeights and skeletonIndices:  85104

 

Link to comment
Share on other sites

Yes, the animation looks fine.  Going thru the matrix weights of each bone in weight paint mode, & subtracting out vertices which really should not be affecting them is the problem.

BJS has a max of 8 bones per vertex.  You can set it to less than the max observed for efficiency, and it will try to pick the least weights.  Trying to throw out 7 bones (15 - 7) for 317 vertices is not going to end well.

Link to comment
Share on other sites

44 minutes ago, JCPalmer said:

Going thru the matrix weights of each bone in weight paint mode, & subtracting out vertices which really should not be affecting them is the problem.

Is that something a blender artist will know how to do?

 

43 minutes ago, JCPalmer said:

Trying to throw out 7 bones (15 - 7) for 317 vertices is not going to end well.

Would you suggest redoing the rig with less bones or am I misunderstanding the issue?

Link to comment
Share on other sites

Yes, Weight Painting mode is just like Edit mode.  There are YouTube videos on it.  Reducing bones is more work than Weight Painting.  It also does not alleviate checking that the weights are assigned correctly.  Checking weight so should be part of the process for any commercial characters.  If the automatic weights added when parenting the mesh to the skeleton are mostly good, then there is not much to do.

Link to comment
Share on other sites

He got rid of the warning following this:

https://blender.stackexchange.com/questions/14250/how-to-restrict-vertex-weights-to-no-more-than-n-number-of-bones

I think he limited to the default of 4 instead of 8 though.

 

Everything in the blender file looks fine, no warning is thrown anymore in the export log, and the result is even weirder.

.blend

https://www.dropbox.com/s/jyw1ubagcz4sasl/data.blend?dl=0

video

https://www.dropbox.com/s/r7obfdz0yoawyek/video.webm?dl=0

Link to comment
Share on other sites

Not going to look at your stuff, since not convinced a BJS problem.  Still need to go through each bone weighting by:

  1. Put armature into pose mode
  2. Select mesh & put into Weight Paint mode
  3. right click each bone in skeleton, and you will vertices which have that bone as an influencer be non-blue.
  4. When stray verts are affected where they should not "Subtract Blend" them to Blue.

See where arm verts are affected by having finger bone selected?  How tough is that?  I am not a Blender tutor.  You are on your own.

weight_paint.jpg.f06f91af3cb625e6d3db02a907d6503f.jpg

Link to comment
Share on other sites

This works for me, though I changed some things.  I used:

  • Created a new .blend Appended your objects in.
  • Added arcrotate camera an light.
  • Deleted the pose library, which added 4 frames onto the end.
  • exported in Javascript format, instead of JSON (.babylon)

The eyes are not following along with the body.  Do not know if that your next problem, or something I messed up along the way.  Will try exporting just adding the light & camera to the original blend tomorrow, but I cannot reproduce this.

 

 

Link to comment
Share on other sites

10 hours ago, JCPalmer said:

With only adding a camera & light, & exporting as JSON to the original .blend, things work fine.

I added a camera and a light, the issues remain.

Are you sure it works fine for you? Are the eyes there? Are the fingers no longer twisted? (attached)

Why does it matter if I add light & camera in the .blend? Do they affect the export of the mesh? Or is it simply for easier testing?

Regardless, I'll also try tomorrow what you suggested in your first reply.

ss.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...