L3DT users' community
Large 3D terrain generator

Sapphire texture streaking

Please report software faults here.

Sapphire texture streaking

Postby CBFASI » Sun Jul 03, 2011 1:39 pm

No logs, the software is not reporting any problems at all.

I am getting visual stretchs in sapphire (3d view)

I dont remember having this problem in the past, but I am also unsure when this started as I do not use the 3d view that often

Does not matter what map or climite it is (checked 3 maps and re-did attributes/texture using l3dt climates, still same issues)

Not sure how best to describe it so I am putting pictures below.

I have a WinXp system with 1Gb ATI Radeon 5800 series card

Image

Image
CBFASI
Member
 
Posts: 12
Joined: Wed Jan 26, 2011 9:03 pm

Re: Sapphire visual problem

Postby Aaron » Mon Jul 04, 2011 11:58 am

Hi CBFASI,

Thanks for the bug report. This is a longstanding issue with the way Sapphire renders high-resolution textures or textures with non-power-of-two resolution ratios, and can be avoided with the judicial selection of texture tile size or renderer patch sizes, as explained in this user guide page.

To summarise, the terrain is split into a number of ‘patches’ (typically 64x64 heightfield pixels), and each patch must be covered by one, and only one, texture tile. This means that the texture tile size must be equal to the patch size times the texture resolution, or be an integral multiple thereof.

If you haven’t noticed this problem in previous versions, I’m guessing it’s because you normally use a non-power-of-two texture resolution (e.g. 10x), and you normally don’t split the texture into tiles. In the latest version, L3DT may split the texture into tiles even if you don’t ask it to, in which case it will default to a tile size of 512px. This default will work properly for texture resolutions of 1x, 2x, 4x, and 8x, but will not work for texture resolutions larger than 8x, nor for prime-number resolutions (3x, 5x, 7x).

Assuming you’ve kept the default patch size in Sapphire, the allowed texture tile sizes as a function of texture resolutions are given below:
  • Tex. res. = 1x, tile size = 64 or integral multiple (128, 256, 512, etc.)
  • Tex. res. = 2x, tile size = 128 or integral multiple (256, 512, 1024, etc.)
  • Tex. res. = 4x, tile size = 256 or integral multiple (512, 1024, 2048, etc.)
  • Tex. res. = 8x, tile size = 512 or integral multiple (1024, 2048, etc.)
  • Tex. res. = 10x, tile size = 640 or integral multiple (1280, 2560, etc.)
  • Tex. res. = 16x, tile size = 1024 or integral multiple (2048, etc.)
  • Tex. res. = 32x, tile size = 2048.
If you’re using an odd texture resolution not mentioned above (e.g. 7x), you can calculate the required tile size using the formula already mentioned (patch size x texture resolution). If increasing the texture tile size is not an option, then you can reduce the renderer patch size, as explained in the userguide linked above. This is recommended when using high texture resolutions, as small patch sizes are preferable to large tile sizes. Note however that the patch size must be a power of two for efficient triangle tessellation.

I believe Sapphire already automatically adjusts the patch size to correct for large texture resolutions. However, I don’t think it also corrects for non-power-of-two texture resolutions. I will look into it and let you know what I find.

Hmm...one solution to this problem would be for Sapphire to detect when the combination of tile size / texture resolution / patch size is going to be a problem, and automagically copy the texture to a temporary mosaic with a ‘correct’ tile size. This becomes hairy if the texture is huge (thus copying takes too long), or if the user wants to edit the texture map, as there will then have to be some more copying between the temporary map and the project texture map. There will probably be identical complications if the user wants to edit the attributes map. Hmm...some more thinkering will be needed here before I start coding.

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3277
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: Sapphire texture streaking

Postby CBFASI » Mon Jul 04, 2011 6:23 pm

Thats great news

I have a 512 res heightfield at 1 point per 5m

The texture res however is at 10x (1 pixel per 0.5m)
(and yes I used to use the power of 2, which I thought L3DT was limted to, until you advised me otherwise)

This means texture tile of 640 (or 320)
CBFASI
Member
 
Posts: 12
Joined: Wed Jan 26, 2011 9:03 pm


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron