David78 Posted January 4, 2015 Share Posted January 4, 2015 Hi to all. There really isn't any issue here; as exporting animations to babylon from blender works fine, except for the "4 bone influencers per vertex" limitation. I understand that it is a browser thing: http://www.html5gamedevs.com/topic/10772-blender-export-issues/ http://www.html5gamedevs.com/topic/9560-rigging-rigify-blender-export-babylon/ My question is sort of strange, but I'll ask it anyways. I have no idea how to rig following this limitation in blender. How would one go about ensuring that this limit is not exceeded? Sure importing a MakeHUman model with the gaming rig, 32 bones I think, enabled would work, but when of the times when one is not rigging humanoid characters? Like sea monsters? Or giant insects? or something like that? And even if one is rigging a humanoid character, what of when the MH rig just doesn't do what you'd want and you have to do your own rig? So how would one make rigs ensuring that that limit is not exceeded? Any pointers on how to go about this would be appreciated. I also have one other question, would it possible to have babylon.js come with something like a visual editor for rigging? You import your static models and then rig them using it; it should guide the rigging process so that this "4 bone influencers per vertex" thing is not exceeded. (Please don't tell me to build it myself! ; at least not now!) Those are my questions. I attached a picture showing what happens when the limit is exceeded; the animation works but some areas are invisible. Other rigs I did did not show at all once exported to the .babylon format. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
gryff Posted January 4, 2015 Share Posted January 4, 2015 Hi David - interesting question - though I don't think sea monsters and giant insects should be too big an issue. But for the moment : I attached a picture showing what happens when the limit is exceeded; the animation works but some areas are invisible. Other rigs I did did not show at all once exported to the .babylon format. I'm not sure how you know that "the limit is exceeded". It looks like the figure that you made in MH and I've had no trouble with animating and displaying MH characters with BJS. Could you make the .blend file available - so I can take a look? (And possibly a figure that "did not show at all"?) You can send me link(s) by PM if you wish. cheers, gryff Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 4, 2015 Share Posted January 4, 2015 Gryff & David,I know how to tell whether you have more than 4 influencers per bone. It is reported as warnings the .log file. Was tired of people guessing about some "30 or 40 bone limit" or other witch craft reason, when the export code knew exactly why "the exporter screwed up my mesh". The limit of # of bones is real, just more of a practical rule, not procedural. The gpu time of bones is a constant overhead of every frame, whether they have moved or not. Although a GPU has many parallel processors, the (# of vertices) * (# of influencers) adds up. Not to mention the memory requirements increase with each influencer. Another myth, I believe from my look at the vertex shaders, is: This a "browser or webGL limitation". It is a BabylonJS limitation. Suppose it could be upped, but would probably have to be made variable. I refer you to the bold formula above as to why variable would be necessary. That is major change to the Javascript, shaders, & exporters. Just a reminder as it relates to non-humans, morphing is also an option. The processor time profile is completely different than skeletons. Here there is no gpu time overhead. There is only cpu time & cpu to gpu data transfer time. This is not constant, but only when the creature is changing. Jeff Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 4, 2015 Share Posted January 4, 2015 Hello, we need to define a limit:) so far you cannot have more than 4 bones influence per vertex which means that each vertex will have 4 floats associated with it (alongside position, normal, uv coordinates) There is no real limit of how many bones you can affect to a mesh (32 is ok) but beware if you use too many bones Babylon.js won't be able to compile the shader on all devices. For instance this scene uses 56 bones per mesh but cannot be viewed on phone: http://www.babylonjs.com/?DANCEMOVES Quote Link to comment Share on other sites More sharing options...
David78 Posted January 4, 2015 Author Share Posted January 4, 2015 Thanks to all for your swift responses. @gryff I'm not sure how you know that "the limit is exceeded". It looks like the figure that you made in MH and I've had no trouble with animating and displaying MH characters with BJS. Yes, it is the same character, different texture. As you can see in my first post, I acknowledge this: Sure importing a MakeHUman model with the gaming rig, 32 bones I think, enabled would work, but when of the times when one is not rigging humanoid characters? And go on to cite instances where for one reason or another, one decides to rig the character by themselves. I rigged that character by myself and opted not to go with MH's gaming rig. The reason is, as I keep saying, I am learning both blender and Babylon.js (saying "BJS" sounds weird to me... ) and hence decided to give rigging a shot. The question is more practical than technical; I'm asking how to rig specifically for babylon.js; as far as I'm concerned, all I did was place the bones, do the automatic weight painting, brushed things up a bit, animated and then exported. I've attached the file,so you (or anyone who is also willing to) can show me where I went wrong, I greatly appreciate your help thus far. [Please link the texture in the zip file to the model in blender if you want to...] The question: During the rigging and weight-painting process, how would one do it so as to avoid exceeding the 4 bone influencers per vertex limit? Is there a way then to tell blender not to exceed it; or is there somewhere in blender where it is shown, before exporting? Yes it is reported in the log file, but it is already exported and only serves as a warning, not as a measure that could be taken to avoid the limit being exceeded and hence the error's existence. animation.zip Quote Link to comment Share on other sites More sharing options...
David78 Posted January 4, 2015 Author Share Posted January 4, 2015 forgot to say, I cannot upload the character that didn't show at all, because I deleted it out of anger...but nonetheless, the question still stands, even though it is a strange question. Quote Link to comment Share on other sites More sharing options...
gryff Posted January 4, 2015 Share Posted January 4, 2015 David, I took a look at your .blend file. I added a light and a camera, then exported it as a babylon file. Creature Animated It seems to work ok, but a few points: 1. You have two IK bones and two knee constraint bones. They probably help with animation but once the animation is created are no longer necessary. Not sure how BJS handles those bones as they are not deforming the mesh. 2. I don't get those missing faces like your pic illustrates 3. There seems to be an issue at the waist. I looked at the weight painting of the bones you have labelled "torso", "lower back" and "pelvic" and all seem to indicate that the animation emphasis is at the back of the mesh (the red colour) and there is very little at the front of the mesh (lightblue/green to green). The likelihood is that vertices at the back are being rotated into those at the side. Also the two "clavicle" bones are having an impact along the mesh assigned to the body bones - might want to reduce that to just the top of the shoulder. Now the "4 bones issue". You added bones for the 4 fingers and one thumb - and that creates 5 bones that are having an impact on the mesh that is assigned to the palm of the hand. With the automatic rigging, I don't think there is a way to restrict Blender, but there may be a ways to edit those cases. 1. Select you mesh and go into edit mode. 2. In the properties panel, select the "triangles" tab. 3. In the triangles tab you will see an area called "Vertex Groups" 4. Make sure that no vertices are selected in your 3d window, then select one of those vertex groups - they will show in the 3D window. 5. Do this for the bones associated with a hand - selecting and deselecting - it will give you an idea of the impact each finger/thumb bones is having on the palm of the hand. You can probably play with this to remove the influence of each finger bone on the palm of the hand - but I've not tried it myself. cheers, gryff GameMonetize and amorgan 2 Quote Link to comment Share on other sites More sharing options...
David78 Posted January 5, 2015 Author Share Posted January 5, 2015 @gryff I appreciate the help. Upgrading to the blender 1.5.0 exporter fixed everything, so I suppose that was the cause of the missing faces. Thanks for the practical pointers on how to deal with the 4 bones issue and all using vertex groups. Quote Link to comment Share on other sites More sharing options...
MrVR Posted March 13, 2017 Share Posted March 13, 2017 On 1/5/2015 at 5:15 AM, David78 said: @gryff I appreciate the help. Upgrading to the blender 1.5.0 exporter fixed everything, so I suppose that was the cause of the missing faces. Thanks for the practical pointers on how to deal with the 4 bones issue and all using vertex groups. Hey @David78 do you have a guide to do the rigging and weight painting ? IM having issues as well with sea animal and quadrupeds animal Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted March 13, 2017 Share Posted March 13, 2017 Might be pointless to ask someone who has not been since his last post on Jan 5, 15. Few people here have rigged quadrupeds. If perhaps you can find an acceptable skeleton, you can add a modifier to rig it. Specify automatic weights, then clean it up would probably be best. This is more a Blender question. Think you might better starting from a search of "blender quadruped rig". I get 18,700 hits. Ones at the top look relevant like "Rigging a dog" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.