L3DT users' community
Large 3D terrain generator

Tile frustrum culling in Sapphire

Please report software faults here.

Tile frustrum culling in Sapphire

Postby Aaron » Mon Nov 05, 2007 2:46 am

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.
Last edited by Aaron on Mon Nov 05, 2007 10:51 am, edited 2 times in total.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Aaron » Mon Nov 05, 2007 4:23 am

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.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Rummy » Tue Nov 06, 2007 7:04 pm

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.
Rummy
Contributing member
 
Posts: 49
Joined: Wed Jan 31, 2007 2:28 pm

Postby Aaron » Tue Nov 06, 2007 8:48 pm

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.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 13 guests

cron