Alex_on_the_web Posted May 14, 2014 Share Posted May 14, 2014 Hello fellows! I've been working on my school project, as I've mentioned before somewhere, and I'm taking a break from terrain generation, and getting back to importing some models as meshes, but I've found something I can't get through. Namely, I'm trying to use some files as models acquired from http://www.ro.me (because these are the cutest, and they fit my needs), but the problem is that they are in three.js' format, and I've devoted my time to implement this featurette in Babylon.js. The problem is, that I need my models animated, and the three.js format (in my case) uses mesh morph animation. That is practically a keyframe based animation just like the skeleton animation in babylon, but no skeletons, instead all the vertices for all keyframes. Is there any support for such things (I'll do the format conversion) in babylon? Or can you think of a clever workaround, given you know all the hidden bits of babylon? If you deem my case unsolvable, can you suggest a place where I can browse for animatable models (with bones for babylon then)? Thanks in advance,Alex Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 15, 2014 Share Posted May 15, 2014 I'm DEFINITELY thinking about adding morph targets. This is a must have feature. Unfortunately, this won't happen before 1.13 In the meantime, you can load the geometries and update your mesh manually through mesh.setVerticesData JackFalcon and gwenael 2 Quote Link to comment Share on other sites More sharing options...
Alex_on_the_web Posted May 15, 2014 Author Share Posted May 15, 2014 Thanks! I myself was also thinking about that alternative, but I thought that might be somehow slower than a stock function (for some unknown WebGL dark trickery). Is this feature, you plan to insert, simply wrapping this workaround in a function, or somewhat more complex? If so, I might try to implement it, as I'm going to have to do it anyway.(Also, I use typescript, and you mentioned that you would want to move there too) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 15, 2014 Share Posted May 15, 2014 I thought about having animations take care of this but there will be no trickery just a list of vertexData to apply on each frame Quote Link to comment Share on other sites More sharing options...
gryff Posted May 17, 2014 Share Posted May 17, 2014 trickery just a list of vertexData to apply on each frame DK: Will it be possible to derive that vertex data come from Blender Shape Keys? cheers,gryff JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 17, 2014 Share Posted May 17, 2014 yes JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 17, 2014 Share Posted May 17, 2014 Hey Gryff, to implement this feature I need a sample scene in Blender. I'm sure you have that in stock Quote Link to comment Share on other sites More sharing options...
gryff Posted May 17, 2014 Share Posted May 17, 2014 I'm sure you have that in stock I'm sure I can dig one out for you - if not I can make something for you cheers, gryff Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 18, 2014 Share Posted May 18, 2014 Let's go for it so:) Quote Link to comment Share on other sites More sharing options...
gryff Posted May 19, 2014 Share Posted May 19, 2014 Ok DK - I'm sending you two .blend files you can play with. 1: is a ball that has two shape keys - "squish" and "squash". It has a short animation but apart from that it is a very simple file. 2: is a "talking head". Still very simple though it is four objects - head two eyes and teeth. I gather from watching your recent talk that you may not be too familiar with Blender so the image below is to describe the layout of the files: A - the scene layout - just make sure that "Male Head" is selected and you will see all the other stuff B - the properties of the current selected object. Make sure the little triangle is selected and you will see the shape key window. You will see 3 shape keys, open, wide, upper in the red box. The first two control vertices of the whole mouth and the last one just the upper lip. The "Basis" is the unaltered orginal mesh. C - The shape key editor - a window for creating shape key animations. Below it is the basic Blender animation timeline - click arrow keys to play. Notice the three shape keys in the purple box. LMB and drag on the green flag with a number and you can scrub through the animation and the values in the purple box will change. If you want to delete theys animation keys, put your mouse over this animation window and making sure all keys are selected (they will be bright yellow-orange) hit the X key and then confirm "delete key frames". To simply select all key frames - tap the A key till they are that bright yellow orange colour. D - is a window containing a text file describing the mixes of the three shape keys that roughly describe the basic Preston Blair phonemes for speech. ( only in the "talking head" file) Hope I am not being insulting with the image and the above - just do not want you confused at all. I will PM you with a link to the zip files. If the new Blender exporter looks to be working with shape keys - please post so I can try it out.. Looking forward to trying some lip syncing. If you need anything else - just ask. cheers, gryff JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 19, 2014 Share Posted May 19, 2014 Waooou that is great!! I will work on it for 1.13 (But I need to finish 1.12 before:)) Thanks again! Quote Link to comment Share on other sites More sharing options...
Alex_on_the_web Posted May 19, 2014 Author Share Posted May 19, 2014 Thank you guys for looking into it Please let me know if I can be of any help. Quote Link to comment Share on other sites More sharing options...
Temechon Posted May 20, 2014 Share Posted May 20, 2014 Give the flair "Blender Master" to gryff please someone gwenael 1 Quote Link to comment Share on other sites More sharing options...
Alex_on_the_web Posted November 17, 2014 Author Share Posted November 17, 2014 Any update on this? I was not really following up all updates since 1.12. Has it been implemented? Where do I look for it and how should I use it? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 17, 2014 Share Posted November 17, 2014 Yes. It was not made part of the BABYLON repository / namespace. It is in the MORPH namespace, in the Extensions repository. Version 1.0 could not actually do the talking shown in the above thread. Working on 1.1 which will. See this thread for this.http://www.html5gamedevs.com/topic/10210-webaudio-support-for-version-20/ Some 1.0 examples are in this thread. The name at the time was BABYLON.Automaton. The Tablecloth & Multi-group are the ones to concern yourself with: http://www.html5gamedevs.com/topic/9779-alert-shape-shifters-are-in-our-midst-automatons-preview/ Quote Link to comment Share on other sites More sharing options...
Xeonzinc Posted February 25, 2015 Share Posted February 25, 2015 Hi, Is there any news on morph targets? I was playing around with putting a talking head from 3ds max into babylon and realised it wasn't supported yet. I imagine getting it into the 3ds max exporter is even further down the road (is this even planned or will it just be blender?) so will put this in hold for now, I'm glad it is being worked on though, this will be a really great feature! Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted February 25, 2015 Share Posted February 25, 2015 I am doing work in that area, though I also see it on road map. My focus is in the before render architecture (not animation system) , and I also do not believe in the importing of morph targets, per se. Rather, I import shape keys from Blender, grouping them together. This has 3 effects over directly importing morph targets:You can have multiple groups, say one for face, & two for hands.A group limits the vertices that need changing, not the whole mesh, which improves CPU performance.You can make an infinite # of morph targets for each shape key group, once on the babylon side.My first implementation also combined morphing with POV movement & rotation. I have since pulled out POV to make it standalone. MORPH now subclasses it, though that has not been pushed up to repository. I have experimented with speech & voice syncing. I am waiting on MakeHuman 1.1 to come out, so things are in a holding pattern. Their road map has shifted the date, again & again. http://bugtracker.makehuman.org/versions/2 I have no need to do anything with 3ds max. 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.