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
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