Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-3461

FIWARE.Request.Tech.WebUI.VirtualCharacters.ExportingModelsBlender

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

        Issue Links

          Activity

          Hide
          jonne.vaisanen Jonne Väisänen added a comment -

          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

          Show
          jonne.vaisanen Jonne Väisänen added a comment - 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
          Hide
          leandroguillen Leandro Guillén added a comment -

          Hi, the user is replying on this issue: https://jira.fiware.org/browse/HELC-834.

          Reopening issue.

          Show
          leandroguillen Leandro Guillén added a comment - Hi, the user is replying on this issue: https://jira.fiware.org/browse/HELC-834 . Reopening issue.
          Hide
          jonne.vaisanen Jonne Väisänen added a comment -

          Hey,
          Sorry for the late reply. We had annual holiday during the July and the company was empty during this time.

          I'll continue working on this now.

          br,
          Jonne

          Show
          jonne.vaisanen Jonne Väisänen added a comment - Hey, Sorry for the late reply. We had annual holiday during the July and the company was empty during this time. I'll continue working on this now. br, Jonne
          Hide
          jonne.vaisanen Jonne Väisänen added a comment -

          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

          Show
          jonne.vaisanen Jonne Väisänen added a comment - 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

            People

            • Assignee:
              jonne.vaisanen Jonne Väisänen
              Reporter:
              leandroguillen Leandro Guillén
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: