Xeonzinc Posted September 28, 2014 Share Posted September 28, 2014 Ok, I've gone been digging around and for some reason the biped mesh seems to become distorted in babylon, which I assume would propagate to the character mesh (causing the problems above). Here is the max scene: Which then becomes this: http://54.213.159.7/mongtest/test_scene.html(click a bone to see its names in the console log, keys b and v will scale the mesh, but default is with no scaling) Everything seems to be scaled incorrectly and the bones are not joined? Max file: http://54.213.159.7/mongtest/Models/skeleton.max Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 28, 2014 Author Share Posted September 28, 2014 Hum sounds like the scaling is wrong I'm not a good 3dsmax user but if you can reproduce the bug with a really tiny simple scene with the minimal number of bones I can try to check that.For the record, here is the code I used to export bones from max: float[] GetBoneMatrix(IISkin skin, IINode bone, int t, bool hasParent) { var maxMatrix = bone.GetWorldMatrix(t, hasParent); maxMatrix.NoScale(); var trans = maxMatrix.Trans; var parts = Loader.Global.AffineParts.Create(); Loader.Global.DecompAffine(maxMatrix, parts); var rotationQuaternion = new Quaternion(parts.Q.X, parts.Q.Z, parts.Q.Y, parts.Q.W); var matrix = Matrix.RotationQuaternion(rotationQuaternion) * Matrix.Translation(trans.X, trans.Z, trans.Y); return matrix.ToArray(); } Quote Link to comment Share on other sites More sharing options...
Xeonzinc Posted September 28, 2014 Share Posted September 28, 2014 Yes, it does seem to be something like that. Here is the simplest biped 3ds max seems to allow (with a basic walking animation), which has the same issue, In Babylon:http://54.213.159.7/mongtest/test_scene_2.html 3dsmax File:http://54.213.159.7/mongtest/Models/skeleton_simple.max Unfortunately I haven't quite got my head around all these 3D matrices yet so can't offer any suggestions for your export code. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 29, 2014 Author Share Posted September 29, 2014 I must admit that I have no idea why things are scaled like this Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 29, 2014 Author Share Posted September 29, 2014 We need help from some 3dsmax gurus. @dad72: How do you create bones from 3dsmax? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 29, 2014 Share Posted September 29, 2014 No, I'm not a guru 3ds max, not yet. To create the bones, I simply create a biped, but then I hide bones. but I also noticed this bug if I let my bones visible. I have not been able to export animations that works with a biped. I think there's a bug, but I do not know where. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 29, 2014 Author Share Posted September 29, 2014 Ok but if you hide bones things are working well? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 29, 2014 Share Posted September 29, 2014 No, it's the same thing. just pelvis is very great when I leave all the bones display in babylon.for animation that is not working can be a mistake on my part, I have to test more seriously. si je ne masque pas les os et que j'exporte vers babylon, les os ce masque tout seule, mais pas le pelvis qui est tres grand, comme la main sur l'image plus haut. j'ai pas tester plus, mes animations ne fonctionnant pas, donc je n'ai pas signaler, car je ne sais pas du tout si c’est moi qui fait mal ou pas. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 29, 2014 Author Share Posted September 29, 2014 ok mais tu arrives a exporter des bones sinon ou pas du tout? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 30, 2014 Share Posted September 30, 2014 Si si, les bones sont exporter en tout cas dans le fichier babylon cela semble exporter correctement. je vais réessayer de refaire des testes plus complet dans les prochain jours et essayer de t'en dire plus. Quote Link to comment Share on other sites More sharing options...
Temechon Posted October 4, 2014 Share Posted October 4, 2014 Hey guys, I have the same problem for a basic mesh with a basic walk animation. My model was not made by me, and the only thing I update in 3DSmax is the bone affect limit (from 20 by default to 4).I can share the fbx file and the repro scene if you are interested. Cheers, Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 4, 2014 Author Share Posted October 4, 2014 Could you share the .max file? Quote Link to comment Share on other sites More sharing options...
Temechon Posted October 4, 2014 Share Posted October 4, 2014 Sent by email ! Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted October 13, 2014 Share Posted October 13, 2014 Hi, I use the exporter since 1 weeks. Great job ! It never crashes (never say never ). I can export bones and animations with no problem. I didn't try biped, I think that's to complex for real time animations. The best way if you want to use motion capture data (like *.bip file) is to have on one side your 3dsmax biped with motion data, and on other side you have to build and skin your mesh with classic 3dsmax bones (15 bones max is sufficient in many case for a character). After that just link your bones to the biped parts one by one. Don't use the 3dsMax link button (babylon exporter will not export the animation). You have to assign to each bone one position constraint controller and one orientation constraint controller (the target will be a biped part, your left leg target the biped left leg...). You find that in max in motion tab ->parameters->assign controller. That workflow works for me. UV map are well exported even if it comes from unwrap uvw modifier. Just few strange behaviors at export like strange scale, and easily fixed with reset Xform. I think that comes from me and not from the exporter. So that's cool. I really was waiting for this tool. So thanks Deltakosh ! Here some browser screen captures of one model I'm working on. Sam. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 13, 2014 Author Share Posted October 13, 2014 Hey could you shar your demo??? I love the character design! Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted October 13, 2014 Share Posted October 13, 2014 Thanks ! But it's not mine, it ' a royalty free model from turboquid. Unwrap (ahhhhhh!) and textures are from me... I will share for sure ! need few days more. ça devrait envoyer ! Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted October 13, 2014 Share Posted October 13, 2014 Few more bones (and coffee) and it's ready ! Quote Link to comment Share on other sites More sharing options...
FabRobot Posted October 28, 2014 Share Posted October 28, 2014 Hi ! After some test I found a better way to make animation in 3dsmax and export to babylon.js, thanks to Samuel Girardin to give me the way.This tips was tested with 3dsmax 2010 and 2014 but I think this can work with other version and maybe older. In 3dsmax, use only bones to make the skeleton and the pivot point of the mesh must be in center of the world. Export all in Collada format (.DAE) and Import it to Blender, the animation should be fine but not for babylon ,so we gonna make some few changes,because the scale between 3dsmax and blender is differente, that cause some problemes. So in Blender, select the mesh go to Object => Relations and delete the Parent (who must be the armature).check if scale object=1.Select the Armature, check the scale and set up to 1 and rotate in same direction of the mesh.Reselect the mesh Object => Relations and in Parent add Armature. All done you can export to babylon.js and this should be fine (if not try to Rotate the Armature to 0 at the end).Scaling the mesh if need in babylon.js and not in Blender. Hope that can help. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 28, 2014 Share Posted October 28, 2014 Hi, There are indeed problems with the exporter for 3 ds max at the level of what is animation and scale(ladder) on the models with bone.Bones (structure) must be necessarily masked in 3 ds max otherwise he(it) appears as objects visible of shape of white box. But if we post(show) them (bones) the character becomes 1000 times as big (of the size of the bones which are exported 1000 times as big as the meshing approximately. Where from the problems to everybody at the level of the scale(ladder) I think). When we resize the meshing, bones resize proportionally but remain 1000 times as big as the meshing and we cannot resize bones in the meshing, it deforms the skeleton. I also noticed that what is to play at the level of the animations, it is bones and the meshing does not follow bones correctly where it is totally to deform. It is maybe because of the fact that bones are big 1000 times more than the meshing.----------------------------------------------<fr>Salut, Il y a en effet des problèmes avec l'exporter pour 3 ds max au niveau de ce qui est animation et échelle sur les modèles avec os. Les os (structure) doivent être obligatoirement masqué dans 3 ds max sinon il se présente comme des objets visible de forme de boîte blanche. mais si on les affiche (les os) le personnage devient 1000 fois plus grand (de la taille des os qui sont exporté 1000 fois plus grand que le maillage environ. D'où les problèmes chez tout le monde au niveau de l'échelle je pense). Quand on redimensionne le maillage, les os se redimensionnent proportionnellement mais restent 1000 fois plus grand que le maillage et on ne peut pas redimensionner les os dans le maillage, cela déforme le squelette. j'ai aussi remarqué que ce qui est jouer au niveau des animations, c'est les os et le maillage ne suit pas les os correctement où c’est totalement déformer. c’est peut-être à cause du fait que les os sont 1000 fois plus grands que le maillage.</fr> Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 28, 2014 Author Share Posted October 28, 2014 I agree bones exportation from max is a bit broken. I'm looking for help on this specific topic Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 28, 2014 Share Posted October 28, 2014 I hope you find help on this subject. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 28, 2014 Share Posted October 28, 2014 I also noticed something else:it is normal that the skeleton is considered a mesh because when I did a console.log on newMesh I newMeh[0] is that the skeleton and newMesh[1] is the mesh .but the skeleton is not a mesh so I think there is a mistake here too. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 28, 2014 Author Share Posted October 28, 2014 This is fairly normal because in 3dsMax bones are drawn using meshes (you can right-click on meshes and ask for exclusion). Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 1, 2014 Share Posted November 1, 2014 Hello, It would be possible that the export can create a file incremental.babylon for the incremental loading ? Thanks Deltakosh Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 3, 2014 Author Share Posted November 3, 2014 No need for that actually.You can transform you .babylon into a .incremental here:www.babylonjs.com/converter 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.