Skip to content

Conversation

@takahirox
Copy link
Collaborator

This PR enables Editor to support SkinnedMesh.
As an example, you can try to import three.js/examples/models/skinned/knight.js

LMK if I should separate PR because this change is across multi files.

@takahirox takahirox changed the title Editor skinned mesh support SkinnedMesh support on Editor Mar 22, 2016

mesh = new THREE.SkinnedMesh( geometry, material );

if ( mesh.material.materials !== undefined ) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do mesh.material instanceof THREE.MultiMaterial instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine.

@takahirox
Copy link
Collaborator Author

@mrdoob
I've updated

@mrdoob
Copy link
Owner

mrdoob commented May 4, 2016

Ok, so I guess the question is... Where should we store the bones?

I don't think we should be storing bones in THREE.Geometry.

I recall trying to refactor this at some point by creating the THREE.Skeleton object. The idea being that one could reuse the same skeleton in different THREE.SkinnedMesh. THREE.Skeleton was also a collection of bones that were in the scene graph. So that way one could easily add, say, a gun as a child of a bone.

So I guess what's really missing is toJSON in THREE.Skeleton and THREE.SkinnedMesh?

@takahirox
Copy link
Collaborator Author

I've been trying some ideas including your reusable THREE.Skeleton idea but the relation between THREE.Skeleton, THREE.SkinnedMesh, and THREE.Bone is more complicated than I thought and I'm sure it takes a time to complete...

(for example, THREE.SkinnedMesh instance needs to be created before THREE.Skeleton instance creation because THREE.Bone which is used by both THREE.SkinnedMesh and THREE.Skeleton
requires THREE.SkinnedMesh instance for its constructor)

@takahirox
Copy link
Collaborator Author

I think we should make a different thread for serialization #8978

@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 4, 2019

Let's give this another go as soon as SkinnedMesh/Skeleton support serialization/deserialization.

@Mugen87 Mugen87 closed this Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants