Jump to content

TS sources : character study demo (keyframe animation, ragdoll..)


Samuel Girardin
 Share

Recommended Posts

Hi, 

 

My typescript sources (as a VS community 2013 project) are now online, with the 3dsmax file. Developed with babylonjs 1.14. 

 

Enjoy ! 

 

http://www.visualiser.fr/page.php?id=Character_study_-_Babylonjs

 

(source button on the top right). Decompress and launch oldman.sln.

 

Just to remember one screenshot and one video : 

 

scshot.jpg

 

 

Link to comment
Share on other sites

Excellent work Samuel!!

 

As you know I spent hours some time ago trying to get rag dolls working in babylon! I still need to poke around your code to see how you did it :)

 

One small note on your sample code, which might be good for folks newer to Babylon... I had to add the mime extensions for the Babylon types to get it up and running (noticed a couple of 404's before that).

 <system.webServer>    <staticContent>      <!-- add mime types for babylon file types -->      <mimeMap fileExtension=".fx" mimeType="application/shader" />      <mimeMap fileExtension=".babylon" mimeType="application/babylon" />    </staticContent>  </system.webServer>
Link to comment
Share on other sites

Hi Andy, 

 

You're right about mime types. In my case I use local  IIS Express and add to do something like this : 

appcmd set config /section:staticContent /+[fileExtension='.babylon',mimeType='application/babylon']appcmd set config /section:staticContent /+[fileExtension='.fx',mimeType='application/fx']

An other important thing and maybe I already told you that. The key to get this demo works, was to not have hierarchy (if you prefer parent/child) between bones exported to babylon.

 

Here you can find my really first start to achieve my demo :

 

http://www.visualiser.fr/deltak/a/default.htm   (4 to apply impulse)

Sam

Link to comment
Share on other sites

  • 1 month later...

What a cool work.....  I am looking with interest at this huge work....  It's doing in a certain way what I am trying to achieve....  I am passing through the code and I was wondering where I can put one of my own animation...  I look and study the code but I cannot find where the animation is in that code....

 

Thanx for any help,

 

Benoit

Link to comment
Share on other sites

Hi B1842... good to see you.  And hi Andy... good to see you again, too.  And you too, Sam, Dav and DK.

 

Benoit... if you look at the webpage source for http://www.visualiser.fr/deltak/a/default.htm ... you will see a file listed at the bottom... called z.js.  Here is its url:

 

http://www.visualiser.fr/deltak/a/z.js

 

If you highlight and paste that code to a JS beautifier such as http://www.jspretty.com/  ... it will re-format the code to be more readable.

 

Then... at or near line 160 (at the end of a messy mainloop), you will see this.iScene.startKeyframeAnimation() ... and the function that is being called... is at or near line 308.  A keyframe animation function. 

 

These guys write some fancy code, eh?  *nod* 

 

Sweet bones/skeleton demo, huh?  *nod* (thx Sam!)  I like it.  I couldn't get any keypresses to work, there... FF or IE, though.  Not sure what the story is on that.  Maybe Sam will have insights.  Be well!

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...