|
ColladaConverter
This page describes how to use the COLLADA file converter, which allows you to import files created using Google SketchUp, Autodesk 3ds Max, and Autodesk Maya into the WebGL implementation of O3D.
Converting and Loading COLLADA ModelsThe O3D sample COLLADA converter, described in detail in Importing Scene Files, has been extended to support the WebGL implementation of O3D. New command line arguments cause the output assets to be written into a directory containing a set of flat files that can be used directly by a Web browser. This document describes the changes to the converter and the model loading process. Command syntaxThe command to run the converter is o3dConverter, with arguments as specified below.
where
Example invocationThe following command line converts the O3D teapot asset into a format compatible with the WebGL implementation of O3D: o3dConverter --no-condition --up-axis=0,1,0 --no-binary --no-archive --convert-dds-to-png --convert-cg-to-glsl ../o3dassets/samples/convert-assets/teapot.zip ../samples/assets/teapot.o3dtgz The first two command line arguments, --no-condition and --up-axis, are identical to those used when converting this asset for use with the plug-in implementation of O3D. ../o3dassets/samples/convert-assets/teapot.zip specifies the path to the COLLADA file or, in this case, the .zip archive containing it. ../samples/assets/teapot.o3dtgz specifies the output path. Note that because the --no-archive command line argument is specified, the output is actually written into the directory ../samples/assets/teapot/ rather than to the file teapot.o3dtgz. Loading the converted modelTo load the converted model in the WebGL implementation of O3D, simply pass the URL of the converted scene.json rather than the .o3dtgz file to o3d.ArchiveRequest.open. See the helloworld.html O3D/WebGL sample for a simple example of how to load and display a model.
|
I cant get this sample page to work in either FireFox? 3.7a5 or the latest Chrome. I am able to view O3D samples in both browsers, but I suspect somethign specific to this page is causing problems. I keep getting a error page that says the following:
'WebGL context unavailable. Make sure you are using a WebGL capable browser and WebGL is enabled. Click here for more information:
http://www.khronos.org/webgl/wiki/Getting_a_WebGL_Implementation'
Any ideas will be greatly appreciated!
jeff , did you have the plugin version installed, perhaps you were capable to run only those demos using the plugin version... as for your problem itself, not sure if this will help but i just tried the webgl version demos with chrome on linux and works just fine, the thing is: i had to use this command: google-chrome --enable-webgl otherwise the same error as yours appeared to me. so give it a try!
now, a question of mine: i was just wandering if there is a linux version of the collada converter or i'm stuck on windows for development purposes, meaning linux is just left for testing? ( without neither sketchup nor dazstudio on linux i wouldn't even try setting up a linux development enviroment ... just wandering you see? :) )
the example don't work! I've a javascript error! why?
archive_request.js:162 SyntaxError?: Unable to parse JSON string (browser Safari webkit)
I have the same problem. I have converted a COLLADA Model with the converter and replaced the teapot in helloworld.html with the new model. When I run helloworld.html in Webkit (Nightly Build), the model is not shown.
I am not able to load and display a local .dae file in google chrome 9.0. it works well when loaded through server..
check if the path definitions in the JSON are corrupted by using "\\" instead of the correct "/".
the helloworld.html link above is broken, does anyone know where it is supposed to go?
Will there be a Collada-to-JSON converter for Linux?