Welcome
Welcome to xnaquickstart

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!

Terrain Seams - Quite noticeable

If you think you've found a bad bug in the framework, post here

Moderators: Coordinators, Developers

Terrain Seams - Quite noticeable

Postby Takuan on Sun Dec 07, 2008 1:37 pm

There's a problem with the terrain that's been there since at least V0.177, and is still present in V0.195, where there is a seam of overlapping terrain patches running horizontally in both directions through the center of the terrain. I notice that all of the QuickStart terrains are relatively flat in the affected areas, so it's not obvious unless you view the terrain in wireframe mode, but it's really quite obvious with the heightmaps that I've been using which are a bit more varied in height throughout those areas.

Unfortunately for me, what seems like a very simple problem which is likely to have a very simple solution is just eluding me at the moment, and I've been unable to resolve it so far.

I wonder if anyone else would be willing to take a quick peek at the problem and suggest a workaround? Obviously, going forward it would be quite desirable to finally be rid of this problem in QuickStart, and of course it would help me out tremendously.

Thanks!
Attachments
quickstart-terrain-seam.jpg
Shows the problem - A seam of overlapping terrain patches running directly down the middle of the terrain
quickstart-terrain-seam.jpg (161.82 KiB) Viewed 61 times
Takuan
Beginner
 
Posts: 6
Joined: Mon Nov 24, 2008 4:57 am

Postby lordikon on Mon Dec 08, 2008 11:20 pm

Could you include a screenshot? I'm not sure I've seen this.
User avatar
lordikon
Administrator
 
Posts: 342
Joined: Thu Apr 03, 2008 11:26 pm
Location: Colorado

Postby Takuan on Tue Dec 09, 2008 3:36 pm

There should be a screenshot in the original post, but I've mirrored it here just in case :

Image

You can see the overlap in the center of that snapshot. It may not be obvious at first glance, but if you compare the sizes of the quads you'll notice it for sure.

Essentially, there is an overlap of terrain patches that runs directly down the center of the full terrain. The overlap is comparatively small compared to the size of a terrain patch, but quite noticeable when textured or when it crosses an area with varying elevation.

It should be quite easy to reproduce, just view the terrain in wireframe mode and navigate the camera to the center. It extends in both horizontal directions, across the entire terrain.
Takuan
Beginner
 
Posts: 6
Joined: Mon Nov 24, 2008 4:57 am

Postby Takuan on Tue Dec 09, 2008 6:27 pm

[youtube]http://www.youtube.com/watch?v=ehOnHs-NYn0[/youtube]
Takuan
Beginner
 
Posts: 6
Joined: Mon Nov 24, 2008 4:57 am

{Resolved} - For me, at least

Postby Takuan on Wed Dec 10, 2008 1:34 pm

Since I was intending to use the terrain class in another engine in the first place, and needed to do some refactoring in order to enable that, I just changed it so that the Terrain class generates and retains the 'master list' of all of the vertices, and the terrain patches only refer to that master list during the generation of the quadtree. This seems to have gotten around whatever oddness was introduced by generating the vertices per-patch, and is humming merrily along now with no overlaps or gaps.

Thanks for all the hard work you put into the engine and community!
Takuan
Beginner
 
Posts: 6
Joined: Mon Nov 24, 2008 4:57 am

Postby lordikon on Tue Dec 16, 2008 4:17 am

I used to keep a master list in the Terrain class, however that required extra memory, especially with large terrains. Additionally the engine is eventually going to need a way to load and unload chunks of terrain.

If I get a chance I may look into this. I believe adding or subtracting a single 1.0f during the positioning of the patches is likely responsible.
User avatar
lordikon
Administrator
 
Posts: 342
Joined: Thu Apr 03, 2008 11:26 pm
Location: Colorado

Postby lordikon on Thu Dec 18, 2008 1:34 am

Interesting, I looked multiple times and I do not have this same seam in the terrain. Do you by chance have an ATi video card?
User avatar
lordikon
Administrator
 
Posts: 342
Joined: Thu Apr 03, 2008 11:26 pm
Location: Colorado

Postby Takuan on Fri Dec 19, 2008 4:09 pm

lordikon wrote:Interesting, I looked multiple times and I do not have this same seam in the terrain. Do you by chance have an ATi video card?


No, I have an NVIDIA GeForce GO 7400 actually.

I thought I had the problem solved as noted above, but I was mistaken, and the problem seems to exhibit slightly differently based on the selected LOD level.

I'll try to pull together a more coherent repro case after work tonight and see if I can provide a better clue.
Takuan
Beginner
 
Posts: 6
Joined: Mon Nov 24, 2008 4:57 am

Postby Takuan on Sat Dec 20, 2008 4:40 am

Well, I decided to spend some time tonight implementing per-patch LOD with skirts to hid gaps between patches of different LOD levels, as well as restricting LOD changes to no more than one level between patches, and while the problem still exists it's functionally unnoticeable now.

By the time you are near enough to the problem areas, the viewable terrain is at the highest detail possible and it's impossible to see the seam.

So the problem is resolved, as far as I'm concerned 8)
Takuan
Beginner
 
Posts: 6
Joined: Mon Nov 24, 2008 4:57 am

Postby lordikon on Tue Dec 23, 2008 3:13 am

That is very cool. A dynamic LOD is something we've meant to do eventually, it would help solve the issue of framerate drops when the player looked into the distance at the terrain. Someone else did this and posted it on the XNA Forums, I just haven't had a chance to download it yet. They based it off the engine's terrain stuff but then made it from scratch, so even if I download it I'll have to manually code it into the engine. But if you got this working off the current version and you felt like creating a patch for us to integrate that would be awesome of you.

Anyway, I'm glad you got some cool stuff working. Good job.
User avatar
lordikon
Administrator
 
Posts: 342
Joined: Thu Apr 03, 2008 11:26 pm
Location: Colorado


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron