Page 1 of 1

Clipping errors after increasing the view distance

Posted: Wed Apr 04, 2012 6:39 pm
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?

Re: Clipping errors after increasing the view distance

Posted: Fri May 04, 2012 12:46 am
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.

Re: Clipping errors after increasing the view distance

Posted: Fri May 04, 2012 10:54 pm
by fo0k
yeah lod distance increase always sorted this problem for me.. in terrain.con fyi.

Re: Clipping errors after increasing the view distance

Posted: Mon Apr 01, 2013 3:39 pm
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

Re: Clipping errors after increasing the view distance

Posted: Sat Apr 06, 2013 10:55 am
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 ;) .

Re: Clipping errors after increasing the view distance

Posted: Sat Apr 06, 2013 11:06 pm
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.