the new O3D Project Hosting site: http://code.google.com/p/o3d/
3d web development with Google's O3D: WebGL implementation of O3D
The old O3D plugin API is Deprecated:
http://code.google.com/apis/o3d/docs/samplesdirectory.html
Originally built as a browser plug-in, this new implementation of O3D is a JavaScript library implemented on top of WebGL.
Introduction
The WebGL implementation of O3D is a JavaScript library built on top of WebGL. It implements a subset of the original O3D plug-in API, which includes all O3D interfaces that have an analogous interface in WebGL. For example, the render graph, transform graph, and texture classes are all implemented in the WebGL implementation of O3D. Animation, parameter operations, 2D canvas, and file I/O classes are not included. See Functional Groupings of O3D for details.
One major difference between the two implementations is that the WebGL implementation of O3D uses the GLSL shader required by WebGL. This release includes a Cg-to-GLSL converter script to aid in this conversion.
Here (http://code.google.com/p/o3d/) you can:
- Download the WebGL implementation of O3D.
- Read about how to convert your O3D plug-in application to the WebGL implementation of O3D.
- Check out the samples.
- Read about how to load COLLADA files into the WebGL implementation of O3D.
- Browse the source code.
- File bugs and submit patches.
--------------
O3D is a good development environment for 3d.You will be surprised by how easy it was compared to OpenGL.
For example, entire 3d models could be loaded using a single command, while as with OpenGL you would have had to write your own low-level model loader.
Not to mention, Google made integration with Sketchup easy.
ex-ample:
http://src.chromium.org/viewvc/chrome/trunk/src/o3d/samples/o3d-webgl-samples
- Hello Cube, v. 2
- Spinning Cube, v. 2 (minimal changes)
- Primitives, v. 2
http://code.google.com/p/o3d/wiki/SampleCodeWalkthrough
Converting and Loading COLLADA Models:
http://code.google.com/p/o3d/wiki/ColladaConverter
-------
"Is it possible to use a canvas to do 3d?"
3d and HTML5's Canvas element together...
The canvas element is becoming more widely adopted than O3D. It could draw polygons.
The future of 3d web applications lies with WebGL : http://www.khronos.org/webgl/.
Using HTML5's canvas unlike WebGL: canvas will be able to run on any HTML5 enabled browser (software rendered) while as WebGL runs on computers with hardware acceleration.
Ex-ample:
3D OBJ Viewer – 3D, Applications - Canvas Demos:
http://www.canvasdemos.com/2010/05/05/3d-obj-viewer/
http://www.canvasdemos.com/userdemos/toxicgonzo/3dobjviewer.html
a canvas application which can read the contents of a 3D .OBJ file and display the results in real-time.
This particular demo takes Blender’s monkey model and rotates it. It also displays how many FPS in the upper left corner.
This program:
- A 3d .OBJ object is stored as a string in the javascript file
- The .OBJ string is decoded to hold information about vertex position and which vertices form the polygons
- Every polygon is assigned a random color
- Matrix multiplication happens: Convert object from model space -> camera space -> clip space -> screen space
- Z-sort the polygons based on the polygon’s centroid
- Draw the polygons from back to front
No comments:
Post a Comment