[X3D-Public] [Source] TCNI, a leading 3D technology company joins the Web3D Consortium
Joe D Williams
joedwil at earthlink.net
Tue Apr 21 23:48:46 PDT 2009
> > Looks like Google is fishing for ideas about a new 3D API
It doesn't look like they are fishing, they already have their catch.
What would you do if you were based on scripting html pages?
Of course the giant swoop and are now attempting to document it. It is
nice to see that they picked a relevant example: table with four
identical legs.
http://code.google.com/apis/o3d/docs/techoverview.html
I think the some of the basics are there to get people interested in
web 3D until they can learn a more simple and automated way.
O3D is an open-source JavaScript API for creating interactive 3D
graphics applications that run in a browser window
Some funny ones:
"We have reports that O3D does work in VMware on the Mac OS, as long
as you enable DirectX acceleration."
"How do I attach multiple meshes to the same render group?"
"How can I share assets between COLLADA files?
Our current plan is to leave that up to the developer to implement."
"The lowest-level interface to O3D events, for those who want things
as fast and unfiltered as possible, is through the event callback API
...The pluginObject is the plug-in's DOM element."
"If your client area is resizeable, set the perspective matrix every
frame in your render callback."
"This library contains functions that provide an easy way to get your
content in front of the camera."
"This programmable pipeline makes use of a shader language, based on
HLSL and Cg,"
" with a programmable graphics pipeline, the developer has complete
control over the algorithms used in the vertex shader and the pixel
shader. In addition, rasterizing and frame-buffer operations can be
configured using the O3D API."
"The Hello, Cube sample creates a spinning red cube".
http://code.google.com/apis/o3d/docs/prettyhellocube.html
8.3KB+ of user code for a little html and the script to build and run
the rcube code, and oohh, plus the 40-50KB for the script libraries t
run in V8
" cubePrimitive.primitiveType = g_o3d.Primitive.TRIANGLELIST;
cubePrimitive.numberPrimitives = 12; // 12 triangles
cubePrimitive.numberVertices = 8; // 8 vertices in total"
now give the data for and IndexedFaceSet or an IndexedTriangleSet,
except you don't need those pesky -1s.
Some Interesting Ones:
"O3D is fundamentally a shader-based system, and at heart it has no
predefined lighting.
.. [somebody] implements a shader builder, which autogenerates a basic
shader for simple materials. Currently, it builds a shader with a
single point light source, which looks for its parameters on the
Context as lightWorldPos (world position of the light) and
lightColor."
"Why doesn't O3D use OpenGL's shading language (GLSL)?
There are a number of reasons we decided against using GLSL as our
standard shading language: ..."
"To mitigate these issues, the O3D plug-in embeds the V8 JavaScript
engine."
THe JSON connection. At least this could make the javacscirpt
relativel simple.
So, you create a div and invoke the V& to build your show, Find some
geometry. somebody makes shaers or you may be able to use a texture,
And now, let's spin that cube:
function renderCallback(renderEvent) {
g_clock += renderEvent.elapsedTime * g_timeMult;
// Rotate the cube around the Y axis.
g_cubeTransform.identity();
g_cubeTransform.rotateY(2.0 * g_clock);
}
Look like fun, huh gang? So much more fun to be impertive and you
don't need that ol' plug-in, just anohter javascript engine and some
libraries..
Best Regards,
Joe
More information about the X3D-Public
mailing list