aws-samples / amazon-sumerian-hosts

Amazon Sumerian Hosts (Hosts) is an experimental open source project that aims to make it easy to create interactive animated 3D characters for Babylon.js, three.js, and other web 3D frameworks. It leverages AWS services including Amazon Polly (text-to-speech) and Amazon Lex (chatbot).
MIT No Attribution
189 stars 83 forks source link

Simple Import/Export from Blender Results in Distorted Mesh #37

Open asidique opened 3 years ago

asidique commented 3 years ago

With respect to the following:

"You can clone the repository to obtain glTF character animation assets tailored to work well with the Host API. You can use them as-is, modify them in DCC software such as Blender or use them as a guide to develop your own 3D assets."

I am attempting to create custom materials and textures for the host model. I am able to import anyone of the models into Blender successfully _(i.e. examples/assets/glTF/characters/adultfemale/grace/grace.gltf) and can modify the materials in blender accordingly. The issue occurs when I export the model and attempt to use it in the ThreeJS example.

As you can see below, the grace.gltf model is completely distorted. This is what happens when I do not make any changes to the model, and simply import and export grace.gltf from blender. I listed some steps to reproduce below as well.

Blender 2.83.10 w/ Khronos glTF Blender I/O v1.2.75 -> This version was chosen because the .glTF models were created with v1.2.75

Result Preview

Prerequisites Download the amazon-sumerian-hosts project Download & Install Blender

Steps to Reproduce:

  1. Open Blender and Import _examples/assets/glTF/characters/adultfemale/grace/grace.gltf (any character model will do)
  2. Export the file into a a new character folder i.e. _examples/assets/glTF/characters/adult_female/grace2/grace.gltf Make sure to use the .gltf Separate format in blender
  3. Modify three.html so that the character from examples/assets/glTF/characters/adult_female/grace_2/grace.gltf is loaded.
  4. Refresh the server and hard reload the page

I'm not sure if this is an issue with Blender or if this is an issue with how the .gltf files are parsed but I'm looking for some more information on what the workflow to customize hosts / create new ones are. Since it's mentioned that Blender can be used as a tool to do these customizations, I'm wondering what I'm missing here.

crowers commented 3 years ago

Hi @asidique Did you find a solution for this? we have imported the sample gltf characters into blender and re-exported and the mesh is distorted. Spent hours looking for an answer, so any guidance would be much appreciated!

Zimos3D commented 3 years ago
Screenshot_1

I was dealing with this as well and found a solution. Changing the bone direction setting from the default "Temperance" to "Blender" when importing the .glb file from Sumerian fixed the issue for me.

asidique commented 3 years ago

@crowers Have a look at the suggestion above

nisabek commented 1 year ago

Hey all, I'm trying the same steps, but using Babylon, instead of Three.js though I export/import without any changes and using the mentioned "Blender" instead of "Temperance", I get the following error when loading the Host

Uncaught (in promise) TypeError: valueStore.referenceValue.normalize is not a function
    node_modules chatbotDemo.js:16772
    node_modules chatbotDemo.js:18264
    loadCharacterAnimations HostObject.js:268
    loadAssets HostObject.js:202

So, it's not even distorted...it's not loading at all :/

Help much appreciated and I hope the project is still alive! :)

R1ftwarr commented 1 year ago

@nisabek When exporting animation needs to be unticked and it should load fine in Babylon.