Page 1 of 1

Tile frustrum culling in Sapphire

PostPosted: Mon Nov 05, 2007 2:46 am
by Aaron
Hi All,

I just noticed a bug in Sapphire that causes it to cull (not show) terrain tiles that should be visible (see below):

Image

This seems to only affect maps with very small horizontal scales (e.g. 0.1m/pixel terrain). I've not yet fixed the bug, but I have added an option to the Sapphire menu to turn off frustum culling ('Options->Frustrum culling'). So, if you find that some tiles are not visible, turn off frustrum culling.

I'll post here when I've fixed the bug properly.

Cheerio,
Aaron.

PostPosted: Mon Nov 05, 2007 4:23 am
by Aaron
Hi All,

Hmmm...I've partially fixed this for release 2.5b. Some problems may persist on step terrain with very small horizontal scales. I'll put a proper fix on the to-do list for v2.6.

Cheerio,
Aaron.

PostPosted: Tue Nov 06, 2007 7:04 pm
by Rummy
Out of curiosity, what is the bug causing this? I noticed it on a mountainous area where horz scale is about 4.6 by the way.

PostPosted: Tue Nov 06, 2007 8:48 pm
by Aaron
Hi Rummy,

I'm not really sure. I've made a mistake somewhere in the maths where Sapphire calculates whether a tile is visible before drawing it. It's just a few vector operations (subtract, dot product, etc.), which shouldn't be too hard. Anyway, since I haven't found the bug yet, I've just upped the clipping threshold so it should be less problematic.

Cheerio,
Aaron.