Jump to content

Attach to skeleton 2.4 > 2.5


hen
 Share

Recommended Posts

Hi,

i just noticed some bug when attaching skinned meshes at runtime to skeletons.

As example:

var mySkinnedMesh = mesh[0];
var myOtherSkinnedMesh = mesh[1];
myOtherSkinnedMesh.skeleton = mySkinnedMesh.skeleton;

This is working well in v2.4.
With the current release, the attached mesh is slightly offset.

 

Link to comment
Share on other sites

20 minutes ago, Deltakosh said:

There is an error on your PG (setMorph not defined)

Whoops, i forgot to remove a line:

http://www.babylonjs-playground.com/#GXIPL#6

This error happens when attaching the skeleton in line 53:
"Uncaught TypeError: Failed to execute 'uniformMatrix4fv' on 'WebGLRenderingContext': No function was found that matched the signature provided."

Link to comment
Share on other sites

12 minutes ago, Deltakosh said:

Fixed :)

thank you for reporting it

Thanks!

One more question...

I developed some simple and lightweight blendshape file format for babylon.
Once the recent fix was deployed to the playground you can try it out here: http://www.babylonjs-playground.com/#GXIPL#4

I did not add any guis but you can morph 3 blend targets using the console:
morph.setMorph(target, index, weight)
morph.setMorph('head', 0, 0.5)
morph.setMorph('head', 1, 0.5)
morph.setMorph('body', 0, 0.5)

Actually i create the files from collada sources within a node.js environment.
I cant load my binary parser to the playground, so the example morph files are plain json.
After binary conversion they are super small and even with this medium res model its only about 5mb overhead for over 100 blends.

Would you might be interested to have this implemented?
I could do some class to load the files and to handle blendings.
Just i cant change the exporters, but would provide all the infos how the files are made.

 

Link to comment
Share on other sites

I decided to not represent geometry as data, but rather as computer generated in-line source code.  This allowed me to both subclass Mesh (& Skeleton, Bone for that matter), and also allow exporters to specify there own subclasses of QI.Mesh or BABYLON.Mesh.  OO just ends with the framework when using JSON.

Having subclasses of Mesh with all the messy geometry neatly inside is a much cleaner for implementing my own full featured animation system (position / rotation / morphing / skeleton / audio of Mesh / Camera / Lights), beforerender based.  Elegant methods override (like of dispose) are now simple.

This makes my code very dependent on Blender and ToB.  (Not really an issue in my case).  I realized that I wanted a very high degree of control over my destiny very early.  Working with the processing of data prior to BJS was a good way to do it, and a perfect way to inject geometry into subclasses.

Remember, I am a game developer, and not making tools merely for others.  Do not really care if anybody actually uses my extensions.  Am in Beta right now.  Do have some promotional stuff for public release in the works, but am actually promoting myself as much as the code.

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