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
Hey Xavier,
Now that I took a look at the "installation and administration guide" there is mentioning of three.js blender exporter: https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/3D-UI_-_WebTundra_-_Installation_and_Administration_Guide#Preparing_own_scenes I have include the same text to "User and Programmers Guide" page.
So yes, you'll need to use a separate blender exporter plugin to bring your models to WebTundra. Instructions how to install the exporter to
Blender can be found at: https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender.
I cant really help with glTF format, I have never used it. In case you need more info about different format you could contact Toni Alatalo (toni@playsign.net) who is the contact person of "3DUI - WebTundra GE", he should have better understanding of this.
I tested the three.js exporter and got the "User guide" deer model to render with texture (DeerThreeJs.png). When you are exporting the model from Blender, make sure that materials and textures are checked in export option (ExportBlender.png). Also remember to add your textures to same folder where the model.json file is located. Say you have a car model in "models/car.js" folder you should push the textures in same folder, order them to load properly e.g. "models/texture.png".
I'll send this message to xavier.carol@i2cat.net.
Hopefully this helps.
br,
Jonne Väisänen