Notes and Thoughts about landscape renderer


need to store height (32bit float) and shader number (0-255) then need
to store shaders in some sort of directory or structure. perhaps store
everything inside a zip file, or just a directory. start with directory can zip/unzip for transport if needed

heights make a heightfield in the obvious way, use a transformation
matrix to convert between the (row, column, height) vector and the
"real world coordinates"
Use AOI coordinate system for consistency, also probably a good system
from the physics of it.
raytrace with automatic antiailising. easy to compute range of rows,
columns that ray will potentially intersect, start checking from the
front, once an intersection is detected, no more intersections in that
row/column, (whichever is more perpendicular to the ray). No support
for transparency, water is just another shader, perhaps with a
shortcut (advanced feature) for adjusting water level. (water mask,
just do a greater than with with heightfield, initialize water mask to
0? this has problems, just an idea)

as a ray crosses the heightfield, check height of ray against height of pixel (and adjacent pixels) if higher
then no intersection (this algorithm needs to be refined a little bit) eventually a padding will need to be added
to account for sprite placement

raytracing will be fast because of the simple geometry, most rays will
intersect once with the geometry, even with water reflections twice
will be common (perhaps maximal), unless some idiot makes his hills
shiny, and then he deserves the poor performance.

User interface have a simple view of the heightfield, a way to view
which shaders go where and a rendering menu. Some editing might be
nice. UI also need a place to specify the transformation matrix, how
wide, long, and high the heightfield is. allow for non-square
stretching of heightfield (just changes matrix coordinates) and easy
resizing of heightfield. should have a render previewer of some kind

can paint shaders on heightfield, can have up to 256 shaders, shader 0
is default, shaders can refer to other shaders (maybe)
to assist with painting shaders, can select heightfield by height,
gradient, and use that selection

shaders will define color with a function of x,y,z, gradient of
heightfield, latter will be able to place sprites (plants) in order to
support water shaders can specify a normal vector for reflection and
coloring use (bump-map), shader will also define specularity
(everything will default to sensible values) and have a good set of
built-in functions, noise plus everything in a standard math library
advanced feature, support for shinyness, (snow without calculating all
those reflections)

advanced sky renderer, specify sun position for direct light, some
capacity for coloring the sky

advanced feature: have fog color/density be a function of x,y,z

use java, run everywhere, good libraries, a bit faster than python for
the big jobs, good optimizaton, built in documentation, javadocs,
mature IDEs good UI language

advanced feature, support large renders

sky system, specify the sun angles, and generate the sky from that information.
sun averages 32' in diamater (wikipedia from nasa)
have gradient from horizon to zenith, gradient from sun outward

when rendering, camera in center of universe, transform everything to make it so


shaders idea
have each shader be small beanshell scripts that get evaluated at each intersection
beanshells will work perfectly, full featured language, can put and get variables easily

advanced feature: auto network rendering