For modeling curved surfaces -- things like people -- Bezier Patches are ideal for 3d computer generated imaging, including web animation ...
high degrees of realism can be achieved in relatively small files.
|
This tiny 4 kilobyte
vrml file and a Java program ( and a photo ) created these images and
this movie.
It was done with Java3d and VRML, and Bezier Curves, a great way to do 3d on the web and portable devices. The vrml file is non-standard, it works with my java program, I will make it make standards compliant ( Nurbs aren't in VRML-97, they are in a proposed extension to the language. ) |
|
|
The Level of Detail ( LOD ) of an object defined by Bezier Patches can be dynamically changed : important for MPEG-4 and multi-player games where the complexity of the model has to be changed to accomidate various situations. The image of a ship on the right was rendered with a small Nurbs file, the sails are defined by a tiny grid of just sixteen data points, and the wonders of math flesh out the curvature of sails to any degree of smoothness with Nurbs.
|
|
The interactive program above lets you zoom in and out,
rotate the model ( by dragging your mouse over the model ) and you can load
and manipulate other 3d models.
VRML-97 and the early VRML plug-in viewsers ( like Cosmo ) do not support Bezier Patches ... but the old plug-ins can be retrofitted to display Bezier Patches with Java, or pure java solutions can be used ...
VRML Files:
tall_ship_jsn.wrl ( 19 k uncompressed ) &
shark_jsn.wrl
for Comso & other VRML plug-in Viewers
tall_ship_nurbs.wrl ( 23 k uncompressed ) for Shout3d
Java source & class Files:
Bezier.java,
Bezier.class
For higher rendering speed & quality you can view it with a VRML plug-in Viewer ( eg. Cosmo ).
This other method uses the VRML Script Node and Java ( and requires a VRML plug-in ),
it may not work with some combinations of browser & plug-in:
Netscape & Cosmo work fine,
Microsoft's Explorer fails, another abuse of it's monopoly power.
The six lines of code below create the Bezier Patches for the above Sailing Ship.
public void initialize( )
{
level_of_detail = getIntField( Field_Int_LOD_N );
bezierMatrix = generateBezierMatrix( level_of_detail );
splineIndexValues = generateSplineIndexValues( level_of_detail );
float [ ] splineControlPoints = getFloatArrayFromField( Field_FA_ControlPoints, CPA_Len );
float [ ] splinePatchPoints = calculatePatches( splineControlPoints, bezierMatrix );
setVRMLSplineCoordPoints( splinePatchPoints, splineIndexValues );
}
These six lines of code are calls to other Java Methods each of which do one ( and only one ) task, and each task involves only a single technology or skill set, ie. either it has to do with either VRML or the mathematics of Bezier Splines -- and the two are never confusing commingled.This is what it looks like in my IDE:
A VRML Spline Editor that is free, portable, & open source
is an effort started by Evgeny Demidov ...
3D VRML Lab & Java Arts are Dr. Demidov's excellent illustrated ( and interactive ) tutorial & overview of 3d modeling with sample programs, VRML files, and opinions.
The Splined Shark ( above ) is based on his program ( Bezier.java )...
To understand it, please see his pages which you will enjoy ! !
The Shark and other spline based models were derived from these sPatch Models.
Nurb Surfaces are proposed extensions to future versions of VRML:
Nurbs Surface Blaxxun's proposed Extensions :
| NurbsSurface { ...
| exposedField MFVec3f controlPoint [ ] ...
| field SFBool solid TRUE ...
| }
X3D proposed extensions ( web3d.org ) :
| Draft Specification Extension
|
| NURBS Overview and Proposal from Holger Grahn, blaxxun.
|
| Status: implemented as an X3D profile ...
|
My version of his program adds no funcionality to it ( other than a little speed and some diagnostic messages -- which are viewable in the Java Console of the Netscape browser ) ...
but I hope to adopt his program to 'pure java' versions -- so no VRML plug-in is needed, so Microsoft's Internet Explorer doesn't crash -- Netsape's browser works fine, Microsoft's dies a horrible death -- with a 'security' error message -- which is valid only in that Web 3D standards such as VRML and Java do represent a threat to the security of Microsoft's illegal Monopoly --
people are free to use better and free software for Web 3d ...
Dumping Microsoft's twisted, closed, properitary ever changing non-standard standards frees you and your programs free to run on all machines on the web, and to run on increasing numbers of portable & embedded devices ...
all machines excpept those illegally crippled by the monopolist like the Microsoft's crippled WebTV and Microsoft's crippled PocketPC (under)powered by the crippled WinCE operating system.
VRML, Linux & Java offer greater portability with lower cost, higher quality & fewer problems.
The Utah Teapot ( below ) is famous in the computer graphics industry,
it was on of the first 3d models created with Bezier Curves, and has been
reimplemented countless times, including an apperance in Pixar's Toy Story movie.
Note: picture deleted, this page is being edited & revised.
Seamless Avatars ( Interactive 3d )
based on Web 3D's
H-Anim Standard for Human Animation.
Dolphin Swim
( Double click on "Dolphin Swim" in the list of "Avatars" )
dolphin_swimming.wrl
VRML EAI FAQ How To enhance your VRML plug-in Viewer with Java for added functionality.
VRML EAI Demo: People Poser YOU Pose VRML / H-Anim Avatars
I've done VRML EAI ... pure Java is more reliable, more portable, and easier.
Contents Page
|
Last modified: 04/25/2001 First Created: 02/19/2001 |
E-
mail: "Webmaster"
|