Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting Morph Targets is still broken #12595

Closed
leo-petrucci opened this issue Nov 6, 2017 · 11 comments
Closed

Exporting Morph Targets is still broken #12595

leo-petrucci opened this issue Nov 6, 2017 · 11 comments

Comments

@leo-petrucci
Copy link

leo-petrucci commented Nov 6, 2017

After being very confused on how to actually export Morph Targets I found this thread

#8710

It doesn't seem like following what @filmshaw posted works at all. Not commenting out the the part of the code seems to add an Edgesplit to my mesh every time I try to export it. Which, in return, gives me the error that I can't export a mesh with modifiers and shape keys.

yv75icpy35za_blender_2017-11-06_23-25-56 1

Which I suppose is what should be happening.

However, if I do comment out the code I just receive this error

zffqbvfowsqj_blender_2017-11-06_23-28-22 1

I don't know if I'm just very confused as to how to go about this, but I can't seem to get it working. Is there a specific fix I'm missing for this specific issue or is this still open?

@leo-petrucci
Copy link
Author

I tried fiddling with the object.py mentioned in the other thread.

It seems like uncommenting line 496 of object.py leads to a successful export that seems to have all the morph targets.
The file loads and displays correctly, however I have yet to try the morph targets.

@derivou
Copy link

derivou commented Dec 8, 2017

Hello, I exported my model following the recommandation about the object.py file and got a loadable three.js file. BUT the animation is wrong ; it is a smoothed cube like shape and in Blender I deform just a few vertex ; in Three.js it results in a kind of rotation/elongation of the whole object. My material is a shader material using a copy of the phong vertex shader and the frag is phong. Any help ?

@leo-petrucci
Copy link
Author

I ended up asking another question over here #12623 (comment) about the same exact problem.

As far as I understand it the exporter is either broken or not compatible with threejs. I was having your exact same problem and I couldn't find any solutions no matter how much I fiddled with the code or the exported itself.

Using a glTF exporter seems to fix the issue, however I have not been able to export to gltf while having a lot of morph targets. Blender just hangs forever on the exporting screen.

I used this https://github.com/KhronosGroup/glTF-Blender-Exporter to export it.
This https://github.com/Kupoman/blendergltf seems to also do the same, however last time I checked it did not export morph targets.

@derivou
Copy link

derivou commented Dec 8, 2017

ok I updated to r88 and blender 2.79 ; as I have the same result, I tried this : in my three.js code I inverted Y=Z and Z=-Y for Mesh.Geometry.morphAttributes.position[0].array ; Then it works. So, there is somewhere inversion of Y and Z ...

@derivou
Copy link

derivou commented May 5, 2018

Hi ,may I ask what is the current status of the io_three blender exporter ? is there any change in the different issues ?

@Mugen87
Copy link
Collaborator

Mugen87 commented May 5, 2018

It's better if focus on another formats and exporter. Read #12903 for more information.

@derivou
Copy link

derivou commented May 5, 2018

Oh thanks I was not aware of this. So for objects combining skeleton animation and shape keys there is currently no workflow with no issues.

@looeee
Copy link
Collaborator

looeee commented May 5, 2018

@derivou FBXLoader supports skeletal animation and morph targets.

However, I have no idea whether the blender exporter will successfully export them.

@donmccurdy
Copy link
Collaborator

GLTFLoader, KhronosGroup/glTF-Blender-Exporter, and FBX2glTF likewise support both skeletal animation and morph targets. As mentioned above there is a known issue in the Blender exporter where exporting many morph targets may take a long time. There are ways to fix that, if someone has the time to do a PR.

@derivou
Copy link

derivou commented May 5, 2018

OK thanks for recommandations. I will follow the KhronosGroup ...

@Mugen87
Copy link
Collaborator

Mugen87 commented May 31, 2018

The JSON Blender exporter has been removed with R93 (#14117).

Also see: https://threejs.org/docs/#manual/introduction/Loading-3D-models

@Mugen87 Mugen87 closed this as completed May 31, 2018
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

No branches or pull requests

5 participants