In addition to the elevations that are read from wavelet-compressed dataset and then refined by fractal algorithm, the engine computes 3 other fractal channels in parallel. These contain 'normal' fractals that will be used as source for coherent random values for various engine parts.
First of these channels was used to enhance the tree placement algorithm. The algorithm in fragment shader first computes the probability of tree being there, according to elevation, slope and terrain curvature. If the actual tree occurrence is determined by comparing the probability against a fixed threshold, it results in large continuous forest areas. The fractal channel provides threshold value that changes continuously and modifies the probability threshold, that results in clearings and woods, but an occasional lonely tree too.
Here is a short video, flying from somewhere in Europe to Africa:
An earlier video without the trees, where angrypig madly flies and turns around
Friday, August 29, 2008
Friday, August 22, 2008
Atmospheric scattering
I've implemented atmospheric scattering as described by Sean O'Neil, with some modifications and endless tweaking. I'm still not quite satisfied, though, but I'll return to it later.
Meanwhile the other two lethargic programmers are presently awakened too.
Angrypig is working on tree generator that will produce all levels of detail needed for tree&forest rendering, from detailed models through continuously simplified and increasingly unified models down to billboards.
Jonsky is modifying the toolchain used to process heightfield maps for the engine (currently used to process earth's elevation data - remapping and wavelet compression). This can be then used to create custom planets; in fact he is currently testing it with the heightfield map of Tolkien's Middle-earth. When we release a demo you will be able to fly over that fantasy planet, or land in Mordor
So if people are interested, we could release some flyable demo sometime in the near future, with the possibility to define your own world using the heightfield map patches, specifying elevations in some rougher resolution. Fractal algorithm computes the details, vegetation is placed by algorithm taking terrain properties into account. One thing still missing are the climatic maps so we could generate deserts and steppes and so on; but this one still requires some thinking.
Meanwhile the other two lethargic programmers are presently awakened too.
Angrypig is working on tree generator that will produce all levels of detail needed for tree&forest rendering, from detailed models through continuously simplified and increasingly unified models down to billboards.
Jonsky is modifying the toolchain used to process heightfield maps for the engine (currently used to process earth's elevation data - remapping and wavelet compression). This can be then used to create custom planets; in fact he is currently testing it with the heightfield map of Tolkien's Middle-earth. When we release a demo you will be able to fly over that fantasy planet, or land in Mordor
So if people are interested, we could release some flyable demo sometime in the near future, with the possibility to define your own world using the heightfield map patches, specifying elevations in some rougher resolution. Fractal algorithm computes the details, vegetation is placed by algorithm taking terrain properties into account. One thing still missing are the climatic maps so we could generate deserts and steppes and so on; but this one still requires some thinking.
Sunday, August 3, 2008
Lots of trees
We've added some simple, crude billboard trees into the terrain. These are generated in fragment shader after the tile elevation map is computed. There can be one tree in roughly each 2x2 meter square; whether there actually is one is determined by an ecotype probability equation that takes into account elevation, slope and curvature of the terrain. There's currently just a testing one, producing a single type of tree. Everything is computed in shaders, billboards are created using render-to-vbo technique.
Now there are more than 500 000 trees rendered as billboards, but the furthermost ones are just a pixel high. Even more distant tiles, that have texels covering larger area than 2x2 meters have the trees just baked in as colors (in a marketing-speak it would read as hundreds of millions trees rendered, but if you get to that parts you'd really see the trees there, so .. ). I shall use a different approach for the far billboards though - the frame rate dropped considerably, from 350-600 to about 60-100 with the trees (on 8800GT), and it chokes ati x1600 mobility on my nb to ~12 fps.
Nevertheless the trees nicely show the scale of the world and the ranges of detail that is generated by the fractal algorithm.
Replying to the comments in the previous entry - we should soon produce some videos too. That is, if the other two lethargic programmers here manage to create something during my one week offline vacation (going to foreststo observe tree distribution patterns to think about optimizing the forest rendering .. to rest )
Now there are more than 500 000 trees rendered as billboards, but the furthermost ones are just a pixel high. Even more distant tiles, that have texels covering larger area than 2x2 meters have the trees just baked in as colors (in a marketing-speak it would read as hundreds of millions trees rendered, but if you get to that parts you'd really see the trees there, so .. ). I shall use a different approach for the far billboards though - the frame rate dropped considerably, from 350-600 to about 60-100 with the trees (on 8800GT), and it chokes ati x1600 mobility on my nb to ~12 fps.
Nevertheless the trees nicely show the scale of the world and the ranges of detail that is generated by the fractal algorithm.
Replying to the comments in the previous entry - we should soon produce some videos too. That is, if the other two lethargic programmers here manage to create something during my one week offline vacation (going to forests
Subscribe to:
Posts (Atom)