aWeirdo Posted April 17, 2017 Share Posted April 17, 2017 Hi all, Does anyone know / have experience with exporting skeletons & bones from unity? I've tried all three rigs, Legacy rig, bones are exported, mesh is fine, but i since found out there's no support for animations. Generic & Humanoid rig's; bones and animations are exported, but the mesh always get mis-formed( quite a lot ), appears to have something to do with the bones during animation, like something isn't exported/converted right, pretty sure i've tried to toggle every single checkbox/option by now.. I can export it perfectly fine from 3ds max and there's no issues when importing to babylon, animations work, mesh is fine, etc, (hence i think it's got something to do with unity or the unityexporter) but using 3ds max opens a hole lot of other, unrelated, issues, so i'd perfer to stick to unity if i can get it working Sorry i can't share any example models due to licenses.. So i hope someone/anyone have some wise words on the subject Cheers. Edit; it's the same on both the old exporter aswell as the new toolkit, unity version 5.5.0f3 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 17, 2017 Share Posted April 17, 2017 Ping @MackeyK24 who is working hard on this exporter Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 17, 2017 Share Posted April 17, 2017 8 hours ago, aWeirdo said: Hi all, Does anyone know / have experience with exporting skeletons & bones from unity? I've tried all three rigs, Legacy rig, bones are exported, mesh is fine, but i since found out there's no support for animations. Generic & Humanoid rig's; bones and animations are exported, but the mesh always get mis-formed( quite a lot ), appears to have something to do with the bones during animation, like something isn't exported/converted right, pretty sure i've tried to toggle every single checkbox/option by now.. I can export it perfectly fine from 3ds max and there's no issues when importing to babylon, animations work, mesh is fine, etc, (hence i think it's got something to do with unity or the unityexporter) but using 3ds max opens a hole lot of other, unrelated, issues, so i'd perfer to stick to unity if i can get it working Sorry i can't share any example models due to licenses.. So i hope someone/anyone have some wise words on the subject Cheers. Edit; it's the same on both the old exporter aswell as the new toolkit, unity version 5.5.0f3 Although my new exporter has many new animation features, the 1.0.1 version still DOES support single animations. First issue (Why 3ds max and blender work and Unity does not).... The way unity work is EVERYTHING and i mean EVERYTHING is 'Imported' to Unity's Own meta format... Meshes and Bones included and Especially animations. Once Unity gets it... we take all information from UNITY native game objects and create our babylon entities from there... Even though 3ds max and blender and even BabylonJS allow for more than 4 bone influencers... UNITY DOES NOT... Unity only allows 1, 2, and 4 bones... Any more and they get 'Culled'... Also the Project->Quality page is where you would set that default 1, 2, or 4 bones. When we 'Sample Animations' to get the Transform Matrix for EVERY bone at each frame of animation, we are actually sample unity's native animation system's data. So by the time it get to BabylonJS there Skin weights will look funny if Unity culled the bone influencers. They best way to handle this is make sure your model properly 'Skin Weight' with 4 max influencers ... I actually created some Maya Art Tools in the BJS Github->Exporters->Maya->Tools folder (babylonReskinTool.mel) If you still get problem, hit me up, ill help you get it working aWeirdo 1 Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 17, 2017 Share Posted April 17, 2017 8 hours ago, aWeirdo said: Hi all, Does anyone know / have experience with exporting skeletons & bones from unity? I've tried all three rigs, Legacy rig, bones are exported, mesh is fine, but i since found out there's no support for animations. Generic & Humanoid rig's; bones and animations are exported, but the mesh always get mis-formed( quite a lot ), appears to have something to do with the bones during animation, like something isn't exported/converted right, pretty sure i've tried to toggle every single checkbox/option by now.. I can export it perfectly fine from 3ds max and there's no issues when importing to babylon, animations work, mesh is fine, etc, (hence i think it's got something to do with unity or the unityexporter) but using 3ds max opens a hole lot of other, unrelated, issues, so i'd perfer to stick to unity if i can get it working Sorry i can't share any example models due to licenses.. So i hope someone/anyone have some wise words on the subject Cheers. Edit; it's the same on both the old exporter aswell as the new toolkit, unity version 5.5.0f3 Would you mind sending me the character model you are working with and ill try make it work in new system as well ? If you can't or won't send model that kool too, I just thought i would offer to help clean it up for babylon toolkit use aWeirdo and GameMonetize 2 Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted April 18, 2017 Author Share Posted April 18, 2017 @MackeyK24 Thanks for the response, I took another look at it, When i open the FBX in 3ds max i can see the model and rig has been made using more than 4 bone influencers, I tried setting it to 4 and exporting it to a new FBX, then importing that with a single animation take to unity, and making sure it's also set to 4 in unity, It looks and works perfect both in 3ds max aswell as unity, but after exporting it, it's still the same as before i'm afraid. i'm using a old version of the 3ds max -> babylon exporter which also only supports 4 influencers so it baffles me why it works when exported from 3ds max but not with unity when the last influencer is culled. really odd.. but i guess the problem is either else-where or something to do with how the culling is done? Either way, i think i'll just have to live with it and use 3ds max instead, as it's taking too much time already Thanks again for your time Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 18, 2017 Share Posted April 18, 2017 6 hours ago, aWeirdo said: @MackeyK24 Thanks for the response, I took another look at it, When i open the FBX in 3ds max i can see the model and rig has been made using more than 4 bone influencers, I tried setting it to 4 and exporting it to a new FBX, then importing that with a single animation take to unity, and making sure it's also set to 4 in unity, It looks and works perfect both in 3ds max aswell as unity, but after exporting it, it's still the same as before i'm afraid. i'm using a old version of the 3ds max -> babylon exporter which also only supports 4 influencers so it baffles me why it works when exported from 3ds max but not with unity when the last influencer is culled. really odd.. but i guess the problem is either else-where or something to do with how the culling is done? Either way, i think i'll just have to live with it and use 3ds max instead, as it's taking too much time already Thanks again for your time I don't thin just "Setting" to 4 bone influences will do the job... You have to actually "RE-SKIN" the mesh(es) applying the new 4 bone influences... The model you sent STILL has 5 bone influences... And no Head But i will try to get working for you Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 18, 2017 Share Posted April 18, 2017 Yo @aWeirdo i checked out the model... A couple of things UNITY/BABYLONJS does not 'like' 1... The bones. The skeleton is 'Non-Standard' so to speak. Something like the Autodesk RIG or Miximo Rig uses a standard 65 bone setup. This test model has too many arm bones and too many leg bones (Unity is ignoring the greyed out NON-STANDARD bones in between other bones) Second, make your Main Character Model "FLAT FOOTED T-POSE" with NO Animations Export as MyModel.fbx Then just select bones (and mesh if you want to see at least a initial mesh for animation) And Export As [email protected] KEEP THEM SEPARATE I don't know how to remove the bones in between ... Might have to re-rig the mesh with a standard type rig Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 18, 2017 Share Posted April 18, 2017 You want your rigs to look more like: And When in Unity Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 19, 2017 Share Posted April 19, 2017 @aWeirdo Nice Body Model ... I am looking at and I'm going t see if there is anything i can do when using more complex bone structure than the 'standard unity skeleton' so to speak. Ill see what i can dig up Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted April 19, 2017 Author Share Posted April 19, 2017 Hi @MackeyK24 Sorry i'm not so responsive, at work The 'extra' bones are rigging for hair, weapons & armour. (Think mmo style, instead of a click&play avatar) Regarding the missing head, it's intentional, for easy changing between different heads. i forgot to mention that.. Regarding the missing T-pose, i might have overwritten it when adding the walk animation, woops. Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 19, 2017 Share Posted April 19, 2017 @aWeirdo I think i found your problem... Unity is ignoring bones that don't have ANY weight at all. Even if its important to the bone child hierarchy. I am creating a fix in code to at least "Warn" when the bone transform has NO parent and it is NOT the root skinned mesh transform. This will at least tell what bone that got ignored so you can go add a weight to that bone (or at least create a key frame on might work as well). Im gone try it and reskin up your model with my Maya Art Tools... Il get back at ya aWeirdo 1 Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 19, 2017 Share Posted April 19, 2017 Yo @aWeirdo .. Check this link out... I gonna resin and test your model next http://www.html5gamedevs.com/topic/29854-unity-exporter-with-spaghetti-animations/ Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 19, 2017 Share Posted April 19, 2017 @aWeirdo Found your problem... Your 'HumanRibcage' is not actually a bone, but a group. Therefore it does not have ANY WEIGHTS... Unity will treat as a GROUP and NOT a bone with weight... I just took the children and parented to the HumanSpine3 bone and remove that ribcage group... Animations in unity now work... Although you wanna properly replace that HumanRibcage group to a bone. Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted April 19, 2017 Author Share Posted April 19, 2017 Yep it seems that was one of the issues, still something wrong with some of the fingers on each hand and the right knee. after removing it he can atleast stand up now Amazing how such a little thing can cause such issues. would never have notised that myself, groups and bones have the same icon in 3ds max and in unity there's only those arrows to indicate a bone / mesh has children.. Edit; I just notised it's part of a "no export" layer in 3ds max, e.g it's children are actually it's parent's children when exporting it, but it's the only one in the layer, so no explaination for right knee & fingers there, guessing it's something else Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 19, 2017 Share Posted April 19, 2017 33 minutes ago, aWeirdo said: Yep it seems that was one of the issues, still something wrong with some of the fingers on each hand and the right knee. after removing it he can atleast stand up now Amazing how such a little thing can cause such issues. would never have notised that myself, groups and bones have the same icon in 3ds max and in unity there's only those arrows to indicate a bone / mesh has children.. Edit; I just notised it's part of a "no export" layer in 3ds max, e.g it's children are actually it's parent's children when exporting it, but it's the only one in the layer, so no explaination for right knee & fingers there, guessing it's something else My clean up progress: http://mackey.cloud/files/videos/u3dcleaningi.mp4 Shit sorry no sound... Ill make again with sound if you need me to Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 19, 2017 Share Posted April 19, 2017 44 minutes ago, MackeyK24 said: Yep it seems that was one of the issues, still something wrong with some of the fingers on each hand and the right knee. Yo @aWeirdo This is because of the 'Non-Standard' rig... Your bones/rig does go smoothly into the unity Control rig system very well... So set your animation to Generic and use the "Animation" control NOT the "Animator" control... I tried to explain in video but no sound... Again... if you want me to ill make again... Check it out and see if you can follow the using the "Animation" control in unity without the sound and let me know Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 19, 2017 Share Posted April 19, 2017 Hey @aWeirdo ... I made another one with sound... Animation is working knees look good and hands... Is Using NON-Standard or Legacy Unity 'Animation' component. Not the newer 'Animator' component which uses the built-in unity human ik control rigs (mechanim system) My clean up progress: http://mackey.cloud/files/videos/u3dcleaningi.mp4 Should work after a bit of 'U3D - BabylonJS: Game Ready Art Preparation' ... That is going to be my next video... I wanna show some of my new 'Babylon Game Art Tools' for both Maya (low-level art cleaning tools) and Unity (design time art optimization tools): Like : 1... Mesh Optimizer (combine and separate clean native geometry) 2... Extract (clean optimized native) meshes from complete unity scenes KEEPING the original object transform matrix. 3... Pre Bake Texture Atlas For Static Meshes (combined and separate meshes support) 4... Pre Bake Texture Atlas Skin For Skinned Meshes With Multiple Materials 5... Static Batching By Material At Runtime (actually Export time) 6... And my brand spanking new High Dynamic Range Tone Mapper... Tone map HDR cubemaps to 24-bit png or jpeg... (For use with my upcoming... Hopefully soon, but need help implementing RGBCubeTexture.ts that will be a RGB panorama skybox to use JUST like HDECubeTexture but with LDR RGB pixels instead... That way we can very kool looking skyboxes from HDRLIB without all the HEAVY HDR processing... The Magic Tone Mapper Will do that at design time and WebGL can load a much lighter web friendly version of a HDR skybox... Tone Mapped to 24-bit regular images) Stay Tuned Hey @MrVR you might some stuff useful when setup up your character animations ... Specially the funny spaghetti animations... Check it out aWeirdo 1 Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted April 19, 2017 Author Share Posted April 19, 2017 @MackeyK24 Awesome I thought the "animation" component was only for legacy, which the exporter previously didn't support as skeleton animations so they were ignored.. nice add Any ETA on when 1.1 toolkit is out? MrVR 1 Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 24, 2017 Share Posted April 24, 2017 On 4/19/2017 at 4:44 AM, aWeirdo said: @MackeyK24 Awesome I thought the "animation" component was only for legacy, which the exporter previously didn't support as skeleton animations so they were ignored.. nice add Any ETA on when 1.1 toolkit is out? Still working a few issues, like terrain texture atlas tiling... and PanoramaCubeTextures... And a final RE-WRITE of my documentation notes. But aside those three things... I am waiting for BabylonJS 3.0 (or whatever the next version will be called) to go stable... I can't use version 2.5 so i need a newer stable version to always be able to fallback on for the toolkit... Again i can't use 2.5 ... Its too old for the toolkit features... need a good 3.0 version to go stable. MrVR 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 24, 2017 Share Posted April 24, 2017 I hope to enter beta early june MrVR 1 Quote Link to comment Share on other sites More sharing options...
MrVR Posted April 26, 2017 Share Posted April 26, 2017 Im stock waiting for the release Quote Link to comment Share on other sites More sharing options...
MrVR Posted May 31, 2017 Share Posted May 31, 2017 On 4/24/2017 at 7:40 PM, Deltakosh said: I hope to enter beta early june hello my friends I'm back ..my friend @MackeyK24 is being busy as well but helpfully he will be back soon... so if you guys can give me an update in whats the status of the UNITY exporter I would appreciated, @Deltakosh is there a way to find more developers to be interested in working with us in the toolkit, apparently Mackey was the one doing pretty much the whole thing, but there are many things can be build and automate using the unity editor. Let me know anyone reading this post if you wish to help; we can provide the basics for debugging with visual studio 2015 and unity platform, there are also videos to start learning how th exporter works; I will volunteer to do video conference to show people how to continue the development from what was left Im sure Mackey has a newer version coming up but we still can create many new features using the current toolkit and reusable on the new one . TOOLKIT FEATURES The toolkit allow you to create and even paint you own terrains with houses trees etc.. BUT we need a way to transform the painted objects in unity to Babylon with the exporter. Mackey created a maya tool to fix the characters bone weights so you can animate , keyframe animations with the unity system ans transfer this into the babylon metadata file (need to be tested in Windows cause do not work well like in mac You can drop any 3d objects put lights (real or bake or mixed), create particles, and much more with out touching a line of code, and have an starting scene PSD: there is no documentation because all of this still under development but this is a very powerful editor that we should not overlook , any help would be appreciated and please be patient I do have a JOB like most of you so patient is key on this projects thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 31, 2017 Share Posted May 31, 2017 The main entry point is the forum. I'm also struggling getting some help Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted May 31, 2017 Share Posted May 31, 2017 I am actually done with what will be BabylonJS Toolkit 3.0 with the following exceptions. - waiting for Babylon to go 3.0 stable version - waiting for @NasimiAsl to workout the edge seams in my Terrain Builder System ... Tiling into a texture atlas... works now but still see edge seams far away... still needs attention from @NasimiAsl - waiting for @Sebavan to create a typescript class called LDRCubeTexture that works like HDRCubeTexture except with already tone mapped pixels ... using my ne HDR Tone Mapper tool available in new toolkit version and last but not least... Documentation for the new version... which I am working on... almost got all the verbage done but I had to go to Arizona for spine surgery (although my hands and fingers was problem, they fix in spine) i shoulb be back in Maui within a week... then I'll finish up docs. As far as code contributions... Only the 2 outstanding issues: @NasimiAsl is working on Texture Atlas Tiling for my Terrain Builder System and @Sebavan is working on LDRCubeTexture (he waiting for me to finish docs before he will give me that code) I already have all the version 3 code done... If anything... I will need a little help in taking my text files I wrote for the documentation and better format all that text into the Babylon markdown files... example... I don't know how to do the page links, URL links and table of contents... so for now I just outline format all the documentation in text files... Note: I was gonna beg @Deltakosh to help me out by formatting all the documentation text with all the markdown stuff so the docs look more like the existing documentation site pages. So @MrVR things will ready soon, and I will shoot you the latest beta i of the toolkit so you can get back up to speed especially using new Art Tools, like the mesh optimizer... so you can optimize entire unity scene geometry... you can now make the whole candy land scene with a total of 4 draw calls... 1 draw call for skybox 1 draw call for fully splatter terrain using texture atlas and 2 draw calls for all the geometry and textures for the entire candy land props using static mesh layers and texture atlas I will be back soon ? aWeirdo and MrVR 2 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 1, 2017 Share Posted June 1, 2017 @MackeyK24: What do you need from me? To create the doc, just update this file: https://github.com/BabylonJS/Documentation/blob/master/content/exporters/Unity/Unity.md Bjs 3.0 is now in beta so considered as stable (Only missing piece is the new PBR mat.) 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.