Details
-
Type:
extRequest
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:None
-
HD-Chapter:WebUI
-
HD-Enabler:Web Tundra Avatar
Description
Hi,
A user is asking us how to export models to be used with WebTundra. Here it
is her report:
"Our 3D modelers are dealing and struggling with how to export the models
they have to use them with WebTundra.
We would like to be able to have something like the example you provided:
http://www.annacarreras.com/toonaville/pato/examples/gltf/example-gltf.html
But they can not figure out how to export the mapped textures if the
character. And we are obtaining character with dark areas (because we
cannot load the image used to texture this areas):
http://annacarreras.com/toonaville/vc/Guia.html
They are using blender to create the exports.
And they are following the instructions you provided as documentation:
http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/3D-UI_-_WebTundra_-_User_and_Programmers_Guide
Could you please expand and clarify the documentation for them?
Do they need to install any plugin in Blender?
Do they have to run any script for the export?
They are expert and senior 3D animators but know nothing about gltf or glsl
formats. They aren't able to export the characters properly."
Thanks in advance.
Kr, Xavier Carol.
_______________________________________________
Fiware-creatifi-coaching mailing list
Fiware-creatifi-coaching@lists.fi-ware.org
https://lists.fi-ware.org/listinfo/fiware-creatifi-coaching
[Created via e-mail received from: Xavier Carol Rossell <xavier.carol@i2cat.net>]
Hi Xavier, Sorry for the late reply.
We were having annual holiday during the July here at the office and I couldn't read the ticket sooner.
I listed below what could help you. I really couldn't do much without the original blender file.
> We are using the addon for Blender to export our models. You can see the
> current state at: http://annacarreras.com/toonaville/vc/Guia.html.
> We have the textures at the same folder of the json model.
>
> You can find the code at:
> https://www.dropbox.com/s/clednaxsfwzt20l/vc.zip?dl=0
> Inside the VC folder you will find the Guia.html page and the model inside
> the models folder.
>
> Tha problem is that some textures doesn't render well.
> The model normlas are ok because if we use:
> var material = new THREE.MeshNormalMaterial( materials );
> the browser renders all the surfaces.
Now that I took a look at the "guiatoon5.js" file and it appears to me that it's containing over 100 materials that have duplicating debug names. In my opinion that is way too many. you could try to reduce the number of used materials in Blender to see if that helps.
I tested the textured mesh rendering by exporting a deer model found from the user guide page and it worked fine. The model can be found at "https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/3D-UI_
WebTundra_User_and_Programmers_Guide#Exporting_3D_scenes_from_authoring_applications" You could try to use this model to see if you are having similar issues with the code.> We are using:
> var material = new THREE.MeshFaceMaterial( materials );
> model = new THREE.SkinnedMesh( geometry, material );
> If we use:
> enableSkinning(model);
> All the model disapears.
I think this could be cause the skeleton is not included when the model is exported from the blender. Make sure that "skinning" and "skeleton/bones" are checked in exporter options. If the model is not using skeleton animations you should use "Mesh" instead of "SkinnedMesh".
I also recommend to use older Three.js blender exporter, WebTundra is using version R69 "https://github.com/mrdoob/three.js/archive/r69.zip". Exporter should be found at "utils\exporters\blender\2.65\scripts\addons" hierarchy from the above archive.
I tested latest exporter and it appears that "json" format has changed during the development and is not backward compatible, at least the skeleton bone parent id format has changed.
Also it appears to me that the sample code you provided by the Dropbox is using Three.js version R66, you could try to use the "https://github.com/mrdoob/three.js/archive/r66.zip" exporter to see if the model gets correctly exported.
> Currently the textures that were created using a UV modificator are
> correctly rendered (the character arms and legs).
> On the other hand the textures that uses an Unwrap modificator (body and
> helmet) are not rendering well or even they become transparent and disapear.
>
> Could you please help us. We are attaching also images to show you how the
> character should look like."
>
> Thanks in advance.
> Xavier Carol.
I'll send this message to xavier mail address.
br,
Jonne Väisänen