Page 1 of 1

Streaky Terrain Rendering

PostPosted: Sun May 16, 2010 11:00 am
by David Walters
Hi Aaron, I was just messing around / beta testing the L3DT beta, dialing things up to 11 so see how good I could make them look. Unfortunately I found a problem where flickering tiles of streaky texture / bad UVs would pop in and out as I fly or walk around:


Here is a link to the project information: ( I blame the 16x TX ratio, it was fine before that ).

I can upload the whole thing if you like, but as it's ~130Mb I thought I'd see what you make of this off the bat to save time (which I don't mind doing, but it'll take 40 mins to upload it).

Some information that might be useful:

* This is L3DT 2.9 beta 1
* I'm running Vista x64 on a Core2 Quad with 4Gb of RAM
* I have a 9800GT with 1Gb of VRAM, running NVidia driver 196
* I've quit L3DT and reloaded and it comes back.

* The error only changes when you move the view (in any axis) - rotating or doing nothing causes no change.
* Erroneous tiles will sometimes flick to being correct as you move around. The error happens more often nearer the view than in the distance, but I can't quite predict it. I've had it stay wrong for the whole map or look relatively correct.
* If I immediately jump to 3D mode on loading it seems worse, closing Sapphire and viewing the Texture (after it generates mip-maps) makes it better initially but doesn't fix it.

Hope this is enough info to help, and I haven't given any misdirections. Let me know if there is anything I can do to assist with testing!


ps. When it does work it looks great :)

PostPosted: Sun May 16, 2010 12:00 pm
by Aaron
Hi David,

Thanks for the bug report. This is a known 'feature' of the terrain renderer in Sapphire (documented here). Basically, each 'patch' of terrain (typically 64x64 pixels) supports one and only one texture tile. If you use a sufficiently high texture resolution*, the texture tiles may not cover a whole terrain patch, and consequently you get the nasty streaking.

For 16x texture resolution, you should either use a texture tile size of 1024, or else a ROAM patch size of 32 (assuming texture tile size is default 512). The ROAM patch size is accessible from the 'Extensions->Sapphire->Edit settings' menu option, under the 'Terrain->ROAM->PatchSize' tree item.

To properly fix this fault I will have to re-engineer Sapphire somewhat. It's on the to-do list, probably for some time after release v3.0.

Best regards,

* That threshold is 16x, assuming you're using the default texture tile size of 512px and the default ROAM patch size of 64.

PostPosted: Sun May 16, 2010 3:32 pm
by David Walters
Ah it's good to hear you know about this, and that there is a work around.

Some automation for this would be nice, but you'll have no argument from me over prioritising this till later :)

Keep up the good work!

edit: Simply dropping the ROAM patch size down to 32 fixed my problems, great!