Archived

This topic is now archived and is closed to further replies.

BradDaBug

Landscape LOD and texturing

Recommended Posts

I''m about to implement geomipmapping in my landscape engine, but one thing I''ve been worried about is texturing. With lower LODs, there won''t be as many vertexes to map tex coords to, so basically I''ll only be able to have a unique texture per LOD block. So if my entire landscape is split into 16 X 16 blocks, thats the highest texture granularity I''ll be able to do, right? Is there a way to get around that without defeating the purpose of LOD? Is it possible to do Warcraft III style texturing with LOD? Here''s another question I guess I''ll throw in: What kind of LOD does Motorcross Madness 2 do? Its so fast, but the terrain is still so detailed! Current Projects: GK3 for Linux | Landscape Engine | Bug Hunt

Share this post


Link to post
Share on other sites
Texturing has nothing to do with LOD. Look at this ASCI drawing (the numbers are the texture coords at that vertex):

0,2---1,2---2,2
| | |
0,1---1,1---2,1
| | |
0,0---1,0---2,0

When you reduce LOD you will get:

0,2---------2,2
| |
| |
| |
0,0---------2,0

The texture will look exactly the same. You just use less triangles to draw it. Oh and WarcraftIII uses both LOD (I believe GeoMipMaps as well) and detail texturing.


Sander Maréchal
[Lone Wolves GD][RoboBlast][Articles][GD Emporium][Webdesign][E-mail]

Share this post


Link to post
Share on other sites
quote:
Oh and WarcraftIII uses both LOD (I believe GeoMipMaps as well)


Can you dig the source of that info out?
Sounds quite surprising - why would they need geometry LOD with their relatively constrained camera?


Share this post


Link to post
Share on other sites
He''s not speaking of unique-texturing methods, but tiles. Tiles assume that you have a minimal terrain resolution in oreder to be mapped.

Y.

Share this post


Link to post
Share on other sites
I couldn''t find the source anymore. I read it somewhere in de GameDev forum when discussing detail texturing. If you want a really good explanation of LOD and (detail) texturing, look at the Terrain #Lecture Log. It explains a lot of stuff and there are some demo''s and screenshots too. I find this log to be extremely useful.

Sander Maréchal
[Lone Wolves Game Development][RoboBlast][Articles][GD Emporium][Webdesign][E-mail]

Share this post


Link to post
Share on other sites
I'm still not sure my question has been answered. Lemme clarify:

Say I have a terrain block that looks like this (the * represent verts):


*--*--*--*
| | | |
*--*--*--*
| | | |
*--*--*--*
| | | |
*--*--*--*

And I wanna texture it like this:

*--------*
| water |
| |
*--------*
| dirt |
| |
*--------*

But after the LOD gets done, the verticies look like this:

*--------*
| |
| |
| |
| |
| |
*--------*

But there's no way to have both textures applied to each half of this block! See what I'm saying?

[edited by - BradDaBug on May 6, 2003 9:20:35 PM]

Share this post


Link to post
Share on other sites
Multitexturing and interpolating The top two vertices of your LODded quad would get alpha 1 for water and alpha 0 for dirt. The bottom 2 vertices get 0 for water and 1 for dirt. The only problem here is if your detail is significantly smaller than the LODded quad, like:

*---------*
| |
| grass |
|---------|
|dirt road|
|---------|
| grass |
*---------*

In this case you will loose the dirt road since all 4 vertices are mapped to grass. This should not be a big problem I think because when your terrain gets LODded so much, it will be near the horizon. The dirt road will be hard to spot then anyway and is possibally obscured by many objects (tree''s, other terrain, players, buildings, etcetera).

In my GeoMipMap engine I use terrain patches of 65*65 or 128*128 vertices, which can get lodded all the way down to two triangles.


Sander Maréchal
[Lone Wolves Game Development][RoboBlast][Articles][GD Emporium][Webdesign][E-mail]

Share this post


Link to post
Share on other sites
I guess that''d work fine if you were always along the ground, but what if you were up in the air, flying around?

Share this post


Link to post
Share on other sites
Tom Forsythe has a good article on unique texturing in Game Programming Gems 3, check that out. Also take a look at Charles Bloom''s article on texture splatting at http://www.cbloom.com/3d/techdocs/splatting.txt, that could also help you out. Doing a google search for unique texturing or texture splatting should turn up some other examples.

Share this post


Link to post
Share on other sites
I've been using the unique texturing scheme from delphi3D.net.

This works fine, excepts I can't generate the coverage texture for a random heightmap.

This is an image from my terrain renderer:

http://home.conceptsfa.nl/~fredo/untitled.JPG

BTW: I like your skydome.. which colors/fog did you use?

Edo

[edited by - edotorpedo on May 8, 2003 11:19:18 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by edotorpedo
BTW: I like your skydome.. which colors/fog did you use?


My skydome? Its just a simple gradient. There''s no fog on the skydome either.

Share this post


Link to post
Share on other sites
I’m also stuck on the same or similar problem. For my terrain I want to use smaller 4x4 tiles that blend with each other. One problem is that I obviously can’t get much LOD out of that. The other problem is the overhead of so many DrawPrimitive() calls (DirectX) and texture switches. So I’m stuck until I can figure something out.

Share this post


Link to post
Share on other sites
quote:
Original post by JimH
I’m also stuck on the same or similar problem. For my terrain I want to use smaller 4x4 tiles that blend with each other. One problem is that I obviously can’t get much LOD out of that. The other problem is the overhead of so many DrawPrimitive() calls (DirectX) and texture switches. So I’m stuck until I can figure something out.


Both bigger Terrain and larger patches

Share this post


Link to post
Share on other sites