Jump to content

Blender Export (32 indices, multi-materials)


DrYSG
 Share

Recommended Posts

I am trying to add a car to a scene. I am using Blender 2.75a, and Babylon 2.2. 

 

For the Tato Nano model at : http://nextwavemultimedia.com/html/3dblendermodel.html

 

I am getting the following log error:

( I wanted to attach is the .blend file, but it does not allow, nor even the .log)

 

 

processing begun of mesh:  Circle.011processing begun of Standard material:  Chromeprocessing begun of Standard material:  Material.011processing begun of Standard material:  Chrome.001processing begun of multimaterial:  Nano_with_ambient_occlusion.Multimaterial#9========= An error was encountered =========  File "C:\Program Files\Blender Foundation\Blender\2.75\scripts\addons\io_export_babylon.py", line 288, in execute    mesh = Mesh(object, scene, nextStartFace, forcedParent, nameID, self)  File "C:\Program Files\Blender Foundation\Blender\2.75\scripts\addons\io_export_babylon.py", line 925, in __init__    warn('Due to multi-materials & this meshes size, 32bit indices must be used.  This may not run on all hardware.', 2)ERROR:  name 'warn' is not defined========= end of processing =========

 

 

 

 

With the yellow chevrolet at that page I get a different error:

 

Exporter version: 3.0.4, Blender version: 2.75 (sub 0)========= Conversion from Blender to Babylon.js =========Python World class constructor completedprocessing begun of mesh:  Mesh.029processing begun of Standard material:  glassnum positions      :  19968num normals        :  19968num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  19968processing begun of mesh:  Mesh.028processing begun of baked material:  Mesh.028Internal baking texture, type: TEXTURE, mapped using: BakingUVInternal baking texture, type: NORMALS, mapped using: BakingUVnum positions      :  18432num normals        :  18432num uvs            :  36864num uvs2           :  0num colors         :  0num indices        :  18432processing begun of mesh:  Mesh.027processing begun of Standard material:  Material.001WARNING: Mesh has no UV maps, material:  "Texture.002" ignorednum positions      :  744num normals        :  744num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  744WARNING: # of 0 area faces found:  64processing begun of mesh:  Mesh.010WARNING: No materials have been assigned: num positions      :  2688num normals        :  2688num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  2688processing begun of mesh:  Mesh.026processing begun of Standard material:  Materialnum positions      :  6num normals        :  6num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  6processing begun of mesh:  Mesh.023processing begun of Standard material:  lightWARNING: Mesh has no UV maps, material:  "Texture.001" ignorednum positions      :  1344num normals        :  1344num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  1344processing begun of mesh:  Mesh.022processing begun of Standard material:  rimWARNING: Mesh has no UV maps, material:  "Texture" ignorednum positions      :  4836num normals        :  4836num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  4836processing begun of mesh:  Mesh.011registered as also a user of material:  rimnum positions      :  9072num normals        :  9072num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  9072WARNING: # of 0 area faces found:  4processing begun of mesh:  Mesh.021processing begun of baked material:  Mesh.021Internal baking texture, type: TEXTURE, mapped using: BakingUVInternal baking texture, type: NORMALS, mapped using: BakingUVnum positions      :  2376num normals        :  2376num uvs            :  4752num uvs2           :  0num colors         :  0num indices        :  2376processing begun of mesh:  Mesh.020registered as also a user of material:  rimnum positions      :  4800num normals        :  4800num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  4800WARNING: # of 0 area faces found:  122processing begun of node:  Empty.002processing begun of mesh:  Mesh.025registered as also a user of material:  rimnum positions      :  3744num normals        :  3744num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  3744processing begun of mesh:  Mesh.019registered as also a user of material:  rimnum positions      :  3084num normals        :  3084num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  3084processing begun of mesh:  Mesh.018processing begun of Standard material:  tyrenum positions      :  65535num normals        :  65535num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  65535WARNING: The following mesh has exceeded the maximum # of vertex elements & will be broken into multiple Babylon meshes: Mesh.018processing begun of mesh:  Mesh.0181registered as also a user of material:  tyrenum positions      :  44349num normals        :  44349num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  44349processing begun of mesh:  Mesh.017registered as also a user of material:  tyrenum positions      :  0num normals        :  0num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  0processing begun of node:  Empty.001processing begun of mesh:  Mesh.024registered as also a user of material:  rimnum positions      :  3744num normals        :  3744num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  3744processing begun of mesh:  Mesh.008registered as also a user of material:  rimnum positions      :  3744num normals        :  3744num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  3744processing begun of mesh:  Mesh.002registered as also a user of material:  tyrenum positions      :  65535num normals        :  65535num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  65535WARNING: The following mesh has exceeded the maximum # of vertex elements & will be broken into multiple Babylon meshes: Mesh.002processing begun of mesh:  Mesh.0021registered as also a user of material:  tyrenum positions      :  43689num normals        :  43689num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  43689processing begun of mesh:  Mesh.015registered as also a user of material:  rimnum positions      :  9984num normals        :  9984num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  9984processing begun of mesh:  Mesh.014registered as also a user of material:  rimnum positions      :  13056num normals        :  13056num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  13056processing begun of mesh:  Mesh.013registered as also a user of material:  tyrenum positions      :  28416num normals        :  28416num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  28416processing begun of mesh:  Mesh.012registered as also a user of material:  tyrenum positions      :  32460num normals        :  32460num uvs            :  0num uvs2           :  0num colors         :  0num indices        :  32460WARNING: # of 0 area faces found:  44processing begun of node:  Emptyprocessing begun of camera (FreeCamera):  Cameraprocessing begun of mesh:  Mesh.00processing begun of baked material:  Mesh.00Internal baking texture, type: TEXTURE, mapped using: BakingUVInternal baking texture, type: NORMALS, mapped using: BakingUVnum positions      :  65535num normals        :  65535num uvs            :  131070num uvs2           :  0num colors         :  0num indices        :  65535WARNING: # of 0 area faces found:  43WARNING: The following mesh has exceeded the maximum # of vertex elements & will be broken into multiple Babylon meshes: Mesh.00processing begun of mesh:  Mesh.001processing begun of baked material:  Mesh.00Internal baking texture, type: TEXTURE, mapped using: BakingUVInternal baking texture, type: NORMALS, mapped using: BakingUVnum positions      :  65535num normals        :  65535num uvs            :  131070num uvs2           :  0num colors         :  0num indices        :  65535WARNING: # of 0 area faces found:  49processing begun of mesh:  Mesh.002processing begun of baked material:  Mesh.00Internal baking texture, type: TEXTURE, mapped using: BakingUVInternal baking texture, type: NORMALS, mapped using: BakingUVnum positions      :  65535num normals        :  65535num uvs            :  131070num uvs2           :  0num colors         :  0num indices        :  65535WARNING: # of 0 area faces found:  43processing begun of mesh:  Mesh.003processing begun of baked material:  Mesh.00Internal baking texture, type: TEXTURE, mapped using: BakingUVInternal baking texture, type: NORMALS, mapped using: BakingUVnum positions      :  65535num normals        :  65535num uvs            :  131070num uvs2           :  0num colors         :  0num indices        :  65535WARNING: # of 0 area faces found:  49processing begun of mesh:  Mesh.004========= An error was encountered =========  File "C:\Program Files\Blender Foundation\Blender\2.75\scripts\addons\io_export_babylon.py", line 288, in execute    mesh = Mesh(object, scene, nextStartFace, forcedParent, nameID, self)  File "C:\Program Files\Blender Foundation\Blender\2.75\scripts\addons\io_export_babylon.py", line 656, in __init__    instRot = scale_vector(rot.to_euler('XYZ'), -1)ERROR:  local variable 'rot' referenced before assignment========= end of processing =========elapsed time:  0 min, 29.176 secs
Link to comment
Share on other sites

Ohh, I don't think you have a messed up system DrYSG.  But you maybe are using models that maybe beyond WebGL

 

For example, one Audi wheel well has more vertices than the whole of the lowpoly car.

 

Many of the meshes in the Audi model have a subsurf modifier with "subdivisions" set to three. Just applying that to the body shell takes the number of verts from 9700 to 600,000 for just the body shell. Lots of other parts have the same subsurf modifier.

 

WebGL has a limit of 65,536 verts (or faces?) I believe.

 

Maybe Jeff can explain the the "warn" error.

 

What happens with the Audi if you delete all those subsurf modiers and then export?

 

cheers, gryff :)

Link to comment
Share on other sites

Question: Which error(s) were fixed?

  1. local variable 'rot' referenced before assignment?
  2. indices (vertex) limit?
  3. multi-materials?
  4. Or just that "warn" was not defined in 3.0.4 and it was throwing an error for undefined function?

 

It does appear that some browsers support more than 65K vertices:

 

Look at this blog entry by David Catuhe

 

http://www.sitepoint.com/testing-limits-webgl-babylon-js-train-demo/

 

For those of us who don't care supporting all browsers, does anyone have list of browsers that support more than 65K vertices, and also that no error is thrown, only a warning.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...