Skip to content
Häfner edited this page Apr 15, 2020 · 11 revisions

Geometry import

PolyVR can function as a simple viewer. Just open the geometry file directly. This will create a default scene with trackball navigation and center the camera around the model.

To test the import of a model go to the scenegraph tab, right click on the object to attach the model. Click on Add > File. Chose your model and press Ok.

Usually you will import models from a script:

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

COLLADA, GLTF, VRML, 3DS, PLY, STL

Those formats are well supported.

OBJ

The Obj import is not well supported, the material import does not work.

VTK

There is some VTK support, but the current status is unclear.

Pointclouds, E57, XYZ

Pointclouds come in many formats, PLY, XYZ, ... The most suited is E57, it is well supported in PolyVR. There is also a LOD system for huge pointclouds as well as a dedicated Pointcloud module.

IFC, STEP

Well supported through OpenCASCADE. Best suited for transfering CAD models. The imports are still quite slow, use the binary cache.

DWG, DXF

Those are beeing worked on.

Kinematics and Animations

The support for importing kinematics and animations is still in development. The file formats that support those are Collada 1.5 as well as GLTF. So far only GLTF animation support has been added to PolyVR.

GIS Data

Geo Data import is supported through GDAL. For example PDF, SHP, TIFF, HGT.

Photometric Data

It is possible to import IES files and use them with photometric light sources in PolyVR. Those are used for realistic light distributions of point light sources.

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