3D Model Converter
The Layar3D Model Converter tool is used to convert models in the Wavefront (.obj/.mtl) format to Layar3D (.l3d) that can be used in Layar app. The converter is written in Java and can be run on any system with the latest Java runtime (v6.0 and above), including Windows, Mac, and Linux. The latest version of the Model Converter is based on the Java Webstart technology, which allows you to run the application both in online mode from the browser or offline from the Webstart cache. The advantage of this solution is that we can maintain a single build for the different platforms, while leveraging on native libraries to facilitate OpenGL 3D preview in the converter. Also, you should be notified of updates automatically so you are sure to work with the latest version.
- Import Wavefront (.obj/.mtl) file and Layar3D (.l3d) file.
- Overview of the imported 3d model, such as the number of vertices, faces, and materials.
- Edit materials, textures, color, shininess, opacity, blending effect.
- Enable texture animation.
- Preview the model in 3D.
- Basic editing functionality on the model itself, such as resizing, rotating, etc.
- 3D model location placement on Google maps, including changing the scale and angle factors of a model.
- Write 3D model location (lat & lon), object information (size & full) and transform factors (scale & angle) into JSON format.
- Converter to Layar3D(.l3d) file.
- Save the model into different versions which work on different Layar clients.
To start the Layar3D Model Converter, go to http://public.layar.com/downloads/Layar3DModelConverter.jnlp
Please check the Release History to see what's new in this latest version of the model converter.
NOTE: Due to changes in latest Java version for Mac, it is currently not possible to preview 3D models in the Converter. If the update from previous version fails, please remove the old app file and download the new one again.
To support conversion of 3D models in an automated way, a command line version of the Layar3D Model Converter is available at http://public.layar.com/downloads/Layar3DModelConverterCLI.jar
Command line version
As mentioned above, in order to support conversion of 3D models in an automated way, a command line version of the Layar3D Model Converter is also available.
This can be invoked in the following way:
java -jar Layar3DModelConverter.jar [options] <inputfile.obj>
- -o : Output file. If omitted, the filename will be based on input filename.
- -d : Drop normals. Let the client calculate smooth normals.
- -f : Calculate face normals. Use normals per face causing hard edges in the model.
- -m : Optimize materials. Groups the faces by material to improve rendering performance.
- -w : Make diffuse color white. Used to solve dark textured models.
- -t : Load the given image file as texture on the material(s).
- -x : Rotate model 90 degrees around the X axis. Can be used to fix orientation of .obj file.
- -X : Rotate model -90 degrees around the X axis. Can be used to fix orientation of .obj file.
- -h : Show this help message.
You are free to integrate this command line converter in your batch scripts.
Build Layar3D model on the fly
It is also possible to create Layar3D model on the fly in layar client. One use case is that you provide a map on the grid and generate the map while an user is walking. In case you want to use this feature, please contact us for the Layar3D file structure documentation. One way to do this is to use the command line version of the Layar3D model converter.