NEW - shadows added, check out the new screenshots and demos further down this page
This is a fully Object Orientated 3D engine which I am currently creating in Java. It is
based on my other 3D applets but allows for simpler creation of shapes and more complex
objects. Currently the world is made up of objects which can either be spheres or a collection
of 2D faces, but I hope to extend this soon to include more complex objects such as elipsoids,
cylinders and toruses. I also intend to allow basic shapes made from 2D faces to be created
more simplistlicly by defining basic types (such as pyramids and cuboids).
I have added (perspective correct) texture mapping. It is termed "Perspective Correct"
because it correctly calculates the texel (texture colour at that pixel) at each pixel by looking
at how far along the 3D edges that pixel is. Non "Perspective Correct" texture mapping would look
at how far along the 2D edges each pixel is, but if the depth varies along those edges then the
texture will appear incorrectly because Z (depth) is not linearly distributed in a 2D (X,Y) image.
Please note that this does NOT use any 3D components
from Java. Java version 1.x (which is currently the only version supported in any of the available web browsers) does not
contain any 3D components - they are part of Java version 2. All of the functions and variables to
store a 3D world, rotate and translate it and then render the triangles / spheres with lighting
and texturing are entirely written by myself.
These applets are best viewed on a web-browser that contains a reasonably fast Java virtual machine,
MS Internet Explorer version 4.0 or above and Netscape version 4.0 or above are good. Please note that
the Java Virtual Machine in the Linux version of Netscape is very slow, but hopefully this will
improve in future versions.
Here are some screenshots of various objects and shading styles - click on them to view
the actual 3D Applet running with that object.