Clipping errors after increasing the view distance

Ask questions, discuss ideas, get answers
Post Reply
BF-Gamer
Posts: 8
Joined: Wed Apr 04, 2012 5:42 pm
Location: Germany

Clipping errors after increasing the view distance

Post by BF-Gamer »

I increased the view distance of some maps in this way:
init.con:
Game.setViewDistance X -> X = "old value" *2 or 3 (min. 1000)
renderer.fogstart X -> X = 500-800
renderer.fogend X -> X = 800-1000

init/Terrain.con:
GeometryTemplate.lodDistance X -> X = "old value" *10 (~5000)

After that on some maps (especially "Eagles Nest") I've got some clipping(?)-errors like this:
Image

Before increasing the view distance there were no errors. What went wrong?
dudejo
Posts: 71
Joined: Tue Nov 30, 2010 2:33 am

Re: Clipping errors after increasing the view distance

Post by dudejo »

I used to have that problem with the Russian maps (Kursk and Kharkov)

I increased GeometryTemplate.lodDistance to ~2400 and it worked. However, performance took a big hit. I'm not sure if there are other ways to fix this.

Until then, it's a trade-of between clean terrain and performance.
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Clipping errors after increasing the view distance

Post by fo0k »

yeah lod distance increase always sorted this problem for me.. in terrain.con fyi.
User avatar
Sarge31FR
Posts: 25
Joined: Sun Dec 16, 2012 5:55 pm
Location: Germany
Contact:

Re: Clipping errors after increasing the view distance

Post by Sarge31FR »

While working on BG42 1.8 final, i also noticed that the engine seems to be having problems with loddistance settings higher than 900 in the terrain.con.
On some maps, which should have a large view distance, i set the viewdistance to 1100 and the loddistance to 1150, resulting in exactly those clipping problems. I then reduced the loddistance to 950, but that didn't help either. Problems still occured, so i set the loddistance to 850 (with the viewdistance set to 800 and the fogend to 700) and the problems were gone. I haven't seen another one yet.

I'm still in the progress of checking the maps, but i recommend that you shouldn't use a loddistance greater than 850, just to make sure. A setting of 2500 is far too high, especially on maps with lots of vehicles, statics etc.

I'll post more once i find it.

Cheers,
Sarge
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: Clipping errors after increasing the view distance

Post by Senshi »

Odd. I often used insanely high terrain lod distances and didn't notice any perfomance hit or visual errors with the terrain. Then again I didn't have a mod the size of BG42 ;) .
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Clipping errors after increasing the view distance

Post by Swaffy »

I've noticed this with normal objects with multiple LODs for different distances. If the vertices weren't welded then the further away (lower detailed) models would show this "tear" effect because the faces were seen as separate instead of welded. Maybe it's the same with the heightmap.

Look at it like this. Every square on the heightmap has four vertices, on the edges. They are used to raise/lower the terrain. One vertex is the corner of four squares. If the squares' corners are not welded, there will be four vertices in one spot instead of a single one holding corners of the four squares together. So when the game renders the lower detailed heightmap (for further away LODs), these "unwelded square corners" will not line up perfectly thus causing rips.

Take it into 3DS Max and weld all the squares' corners and see what it will do.

Refer to this thread:
http://bfmods.com/viewtopic.php?f=6&t=1 ... lit+vertex

Maybe it will work for the heightmap.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply