Skip to content
Häfner edited this page Mar 2, 2015 · 11 revisions

Mesh import

COLLADA, VRML, OBJ, 3DS

To import files go to the scenegraph tab, right click on an object > Add > File. This will append the imported data to the selected object.

To import files from a script:

import VR obj = VR.loadGeometry('path/to/myfile.dae') root.addChild(obj)

PolyVR supports the import of static meshes with colors and textures.

  • no kinematics
  • no animations

Tips

  • The import of COLLADA files may fail due to different reasons, look in the console to find out what went wrong:

    Input is not proper UTF-8, indicate encoding ! Bytes: ...

    This means that the .dae file contains non ascii charachters, they can be identified by running in console:

grep --color='auto' -P -n "[\x80-\xFF]" path/to/myFile.dae

  • Some tools like Blender (z up) have a different coordinate system as PolyVR (OpenGL convention, y up). Change the orientation of the imported node accordingly.
  • Scaled transformations should be avoided. Blender: they may be applied to the mesh with Crlt+A (Object mode).
  • Blender: do not use the new cycles renderer, textures defined with it will not get exported to COLLADA
  • Blender: load a texture for UV mapping and use the same for the material, both are necessary for exporting the texture with COLLADA

Clone this wiki locally