shrekshao / gltf-avatar-threejs

A glTF-based 3d avatar system
https://shrekshao.github.io/gltf-avatar-threejs/
MIT License
262 stars 74 forks source link

Special exporter needed? #3

Open kungfooman opened 5 years ago

kungfooman commented 5 years ago

Hey, this is interesting and I wonder how I can use this for my own models. Do you use Khronos Exporter for Blender or what kind of "export setup" do you use?

Some models have lots of clothes and I would like to export them separately, so they only waste network traffic and parsing time when they are actually used.

shrekshao commented 5 years ago

I used https://github.com/Kupoman/blendergltf. And after that quite some manual modifications. There's a pipeline tool that will do some work. https://github.com/shrekshao/gltf-avatar-threejs/blob/master/tools/glavatar-pipeline.js

I'm far from finishing the auto export pipeline... Hopefully when I finished implementing one for real product I will be experienced enough to come back and add it.

zen85 commented 5 years ago

wow. consider me a fan of what you are doing here. i am also really interessted in the steps you take to get a custom model from mixamo->blender into this system. i am trying to export a gltf with kupomans blendergltf and try to mimik your examples with the data i find there but as you can imagine its not very fruitful :)

do you have at least a rough explanation of the steps you take to get there or to add for example custom clothes?

shrekshao commented 5 years ago

@zen85 I basically followed this amazing article by Don Mccurdy https://www.donmccurdy.com/2017/11/06/creating-animated-gltf-characters-with-mixamo-and-blender/

Let me know if your have any additional questions

zen85 commented 5 years ago

hey. thx for answering. nice - thats also my pipeline. donmccurdy did a great job here... so when i do this i wanted to use your tool but it seems that it does not like me very much and throws me this:

pi@hassbian:/etc/gltf_conversion $ node glavatar-pipeline.js domi.gltf internal/modules/cjs/loader.js:584 throw err;

Error: Cannot find module 'command-line-args' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) at Function.Module._load (internal/modules/cjs/loader.js:508:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (/etc/gltf_conversion/glavatar-pipeline.js:1:87) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3)

does it have to run in a specific folder maybe? and what is it supposed to do anyway? :)

shrekshao commented 5 years ago

Error: Cannot find module 'command-line-args'

You need to npm install first

zen85 commented 5 years ago

Error: Cannot find module 'command-line-args'

You need to npm install first

i did that... but now i get this:

pi@hassbian:/etc/gltf_conversion $ node glavatar-pipeline.js /avatar/domi.gltf internal/modules/cjs/loader.js:657 throw err; ^

Error: Cannot find module 'command-line-args' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:655:15) at Function.Module._load (internal/modules/cjs/loader.js:580:25) at Module.require (internal/modules/cjs/loader.js:711:19) at require (internal/modules/cjs/helpers.js:14:16) at Object. (/etc/gltf_conversion/glavatar-pipeline.js:1:25) at Module._compile (internal/modules/cjs/loader.js:805:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10) at Module.load (internal/modules/cjs/loader.js:672:32) at tryModuleLoad (internal/modules/cjs/loader.js:612:12) at Function.Module._load (internal/modules/cjs/loader.js:604:3)

i guess this has nothing to do with your work unfortunatly... do you still have a guess?

shrekshao commented 5 years ago

I newly cloned the repo and run npm install. Get some error message from registry.npmjs.org?

npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-Td46AHGsO0HrJkBCfX43FWaOMwddR36TfsCAoneFFWVNWec/kAWESTz5hGF/sko3JFp1I74Ap2XboOb8846FBw== integrity checksum failed when using sha512: wanted sha512-Td46AHGsO0HrJkBCfX43FWaOMwddR36TfsCAoneFFWVNWec/kAWESTz5hGF/sko3JFp1I74Ap2XboOb8846FBw== but got sha512-9VX/NvESLMdIk6AkBNcw4sklWaCxnK6y3OAQgUBZNeY2grLYGLyfoxSO2Ij8oG7q1g7sQdcnyPT0QwhX/zid9w==. (5095 bytes) npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation. npm ERR! code EINTEGRITY npm ERR! errno EINTEGRITY npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/bonjour: Integrity verification failed for sha512-Td46AHGsO0HrJkBCfX43FWaOMwddR36TfsCAoneFFWVNWec/kAWESTz5hGF/sko3JFp1I74Ap2XboOb8846FBw== (C:\Users\shrek\AppData\Roaming\npm-cache_cacache\content-v2\sha512\4d\de\3a0071ac3b41eb2640427d7e3715668e33075d477e937ec080a2778515654d59e73f900584493cf984617fb24a37245a7523be00a765dba0e6fcf38e8507)

Doesn't look good...

zen85 commented 5 years ago

so you mean the problem is indeed with npm? i tried multiple versions but without succes....

shrekshao commented 5 years ago

I actually have no idea what is going on here. Never encountered before. I'm not very familiar with npm either. Diving in would require some extra motivation at this point...

zen85 commented 5 years ago

we are currently building an open-source alexa-like speech assistant with a lot of "tamagotchi" like options. now its time to make our models for the visual represantation customisable. from all the avatar-systems i saw yours most suits our needs. we already have a similar system in place but its kind of messy. how much extra-motivation are we talking about? :)

shrekshao commented 5 years ago

Sounds interesting. Do you have any demo/websites online?

zen85 commented 5 years ago

Sounds interesting. Do you have any demo/websites online?

not for public yet... but you got mail.

shrekshao commented 5 years ago

For the npm error, try

npm cache verify

or

npm cache clean --force

(I ran both and now everything is back to working. not sure which one actually did the job)