This is a very small engine written in plain java which renders 3D scenes. The math behind is very simple - without any matrix transformations. Just trigonometric solutions
- Perspective projection
- FOV
- Rotation/Translation for the entire scene/camera
- Triangle/Line Clipping
- New 3D Depth algorithm - Modified Painter's algo - now using a dependency graph which is topologically sorted and which generates a perfect result
- Right click to select the visible triangle
- New Added light effects
- New Added culling filter and improved speed
- New Added shading. This can be disabled. Now shading works on clipped triangles as well
The engine supports vertexes, normals and faces defined in standard .obj files. Standard here.
However other objects can be defined in .txt files, following another standard.
The format is at it follows:
- Any empty line is ignored
- Any line starting with
/is ignored - Every valid text line describes a triangle followed optionally by the color or by the debug name
- The debug name is given to the triangle on the same line
- Can only be given if a color is already specified a.k.a there cannot be a triangle with a debug name but not a color
- Every line consists of three
blocksseparated by empty spaces and representing individual point coordinates for the corner of trianglex1,y1,z1<space>x2,y2,z2<space>x3,y3,z3<space> <color> <debug_name>
- Color format is in RGB values separated by comma:
r,g,b
- Depth ordering inaccuracies when the triangles are intersecting or loop
- Slow




