|
Author Topic:   ROAM vertex normals?
Cthulhu
Member
posted January 12, 2000 09:41 AM            
Any good (==fast) ways to calculate vertex normals in ROAM terrain? I'd like to try out some lightning effects and gouraud shading needs normals.

I do calculate normal for every triangle I initialize. That could be some help.

IP:

LDA Seumas
unregistered
posted January 12, 2000 12:05 PM           
The only thing that comes to mind is that if you're using a frame coherent algorithm, you should be able to cache vertex normals with the vertices and save them between frames, though this won't work for any verts connected to geomorphing triangles.

Generally vertex lighting looks very bad on LOD terrain though, so you might not want to go with it in the end anyway. The best results come from lightmapping or baking lighting into color textures.

------------------
-- Seumas McNally, Lead Programmer, Longbow Digital Arts

IP:

Cthulhu
Member
posted January 12, 2000 02:45 PM            
Lightmapping would propably *kill* my machine. How would you blend lights into terrain textures? I think most of the 3d-cards cannot blit into textures. Software blitting wouldn't be too slow for few lights but that would cause much data transfer through bus. Not good with PCI card, I think.

Anyone got ideas?

IP:

LDA Seumas
unregistered
posted January 12, 2000 03:00 PM           
Oh, you're talking about dynamic lighting effects, e.g. from explosions? In that case vertex lighting should work okay, though there will still be a bit of artifacting, especially when viewing dynamic lighting effects that are happening off in the distance where the terrain is tessellated much more coarsely.

I would still recommend lightmapping or light-baking for the global illumination of the terrain coming from the sun.

I didn't get around to implementing colored terrain lighting in Tread Marks (the lack of which isn't terribly obvious, since terrain in the real world isn't normally very affected by any light other than the sun), but my plan was to modify the color textures directly the same way I do for the tread marks and explosion scorch marks, which turned out to be a negligible performance hit. Tread marks are drawn into the terrain textures at a fixed 10 fps, and disabling them doesn't usually impact frame rate at all on faster cards.

------------------
-- Seumas McNally, Lead Programmer, Longbow Digital Arts

IP:

Bryan T
Member
posted January 12, 2000 04:09 PM            
I've implemented both standard diffuse lighting (with normals) and a really simplistic shading technique by coloring each vertex based on its height (higher terrain is a lighter color).

In 32 bit color, the shaded terrain is completely smooth, even where there are steep inclines or coarse terrain. It makes the terrain appear extremely 'soft'. I then applied a detailed texture using GL_MODULATE. It gives a good impression of texture & lighting to the land, but I haven't figured out how to soften the edges of the texture.

With the GL lighting enabled, the same terrain which appeared smooth before becomes blocky again due to the extra light application. I'm sure there's a way around all of this but I'm brand new to GL.

--Bryan

IP: