The rendering process

udoprog edited this page Sep 23, 2010 · 6 revisions

Each Level Chunk is rendered individually, and their absolute position in the world is determined by reading the level file, this is then transformed to meet the requirements of flip and invert (90 resp. 180 degrees rotation).

A primitive shading is applied to all the results, which determines color based on blocklight, skylight and base color.

Normal (top-down) Projection

Iterate the entire map 0 to x and 0 to y. Project from z to 0 to figure out when a solid block is met (when the color is opaque), this is similar to applying layers in your favourite image manipulator. This process is called Alpha Compositioning

Oblique Projection

Oblique rendering is similar to Normal, but instead draws the image 0 to y, 0 to x and 0 to z.

This process is a variant of the Painters Algorithm where each block is represented by a two pixel pencil.

The black is the base color of the block, the grey is the side color.

The position of the pencil is determined by 0-y depending on block z-value (height) and y-value (depth). And 0-x mapping directly to the block x-position.

This will give the illusion of depth but be completely devoid of visual angles, a.k.a. oblique.

Oblique Angle Projection

The same as Oblique Projection, but uses a four pixel pencil instead.

The black is the base color of the block, the grey is the side color, while red is the actual block center.

The position of the pencil is however, a bit more difficult to determine.

This is what a straight line of blocks (y axis) would look like in an oblique angle render:

The reason for using a 4 pixel pencil is because the side of another block would bleed through in an otherwise solid area, as show here: