|
Submitted by , posted on 30 March 2002
|
|
Image Description, by
These are some shots of two ROAM tech-demos I have been working on. I am
doing a full-blown investigation on drawing terrain as fast as possible with
a high enough level of detail to bring it up to par with current
terrain-based games out there.
The top two screenshots are of my more advanced ROAM implementation. It
features partial geomorphing where the addition of detail is a gradual
change in the shape of the terrain, as opposed to a sudden pop. The reason
it is 'partial' geomorphing is because it only morphs when detail is added,
not when detail is removed.
I have to keep track of which triangles were force-split by their neighbors
so I can unmorph them before unsplitting the culprit triangle.
That implementation also textures the mesh with a 512x512 'colormap' and a
512x512 detail texture. The colormap is basically a huge texture being
stretched over the entire mesh. This yields blurry coloring onto the
terrain. You can distinguish rock, dirt, grass, etc from eachother but it is
extremely blurry. So I tile the detail texture over the entire terrain. I am
not using multitexturing at the moment, so I am doing two passes. If I were
using multitexturing the polycount would be cut in half and FPS would go up.
The bottom two screenshots are my second implementation of ROAM. Actually, I
just took the first one, before I added geomorphing to it, and changed how
the texturing worked..
Instead of stretching a texture over the entire terrain, I created rock,
grass, and dirt textures. Using a bitmap consisting of red, white and green
I drew out where rock grass and dirt are on the terrain.
This yields a higher texture detail, but less variety in the terrain. I am
again not using multitexturing so the polycount could easily be a third of
what it is on these screenshots.
I am thinking about sticking with the color map and detail texture because
almost all cards support up to two textures per pass with multitexturing.
My other option is to make a huge texture (2048x2048) and chop it into
512x512 textures that are put together like a puzzle onto the mesh.
As you can see, I stuck a lens flare in my second tech demo. This isn't a
finalized flare or anything. I just was toying with gluProject. I tried to
do a sort of complex-corona on the sun. The corona is blended with a texture
of a white spot and the center is at 0 alpha. The corona is a triangle fan,
with ten 'slices'. Each slice is 36 degrees. Then I use glReadPixels to
check and see if the z-buffer has anything at the tip of each slice on the
edge of the actual sun. If there is something there, that slice is given an
alpha of 0, so that part of the corona is blocked...
This was used in the xbox hit HALO, I just copied it.
For some reason the lens flare is really slow. I think gluProject has some
performance issues, or maybe it's just my video card.
These demos actually have a purpose. I am investigating ROAM for a project I
am working on with some friends. It's an online FPS similar to Tribes,
except we are going to take out the 'cardboard' feel (as I like to call it)
and try to make it more realistic feeling. Tribes just had a weird
washed-out feeling to me. Maybe it was their fog or simple structural
architecture. Whatever it was, we are avoiding it.
Both demos light the terrain using 'slope-lighting', which I wrote an
article about and you can find it on gamedev.net.
I posted a full-size version of this IOTD at
http://members.gotnet.net/chaz/iotd_full.jpg. I apologize for the bad
quality. I was trying to keep the 2048x1536 at a reasonable size..
If you have any questions/suggestions just drop me a mail,
gixelz@hotmail.com. Or leave some comments. Thx! :D
|
|