L3DT users' community
Large 3D terrain generator

barcodes in green on texture

Please report software faults here.

barcodes in green on texture

Postby Ionus » Thu Aug 25, 2016 3:03 pm

Hi Aaron

With a map from SRTM, in 3D texture mode, I have large squares repeating with their edges in a green barcode, similar to what you might see on a texture which has wrap around. The water map has the top right hand quarter of it as a blue shaded height map, in the manner of the grey height maps.
Ver : L3DT Pro 16.05.0.5 x 64(dev)

Now I cant upload the file, it says it is too big (1.36MiB).
Ionus
Member
 
Posts: 10
Joined: Sat Jul 30, 2016 6:29 am

Re: barcodes in green on texture

Postby Aaron » Fri Aug 26, 2016 12:32 pm

Hi Ionus,

I apologise for this inconvenience.

This is a longstanding issue with the way Sapphire renders high-resolution textures or textures with non-power-of-two resolution ratios. By default, Sapphire splits the heightfield into 64x64 pixel 'patches', and L3DT splits the texture map int 512x512 pixel tiles. The thing here is, Sapphire assumes that each heightfield patch is covered by one, and only one texture tile. This holds when the texture tile size is divisible by the heightfield patch size, which is true under default conditions (512 is divisible by 64). However, if you use a texture tile size that is not a multiple of 64, then the heightfield patches near the edges of the texture tiles will fall across two tiles, which Sapphire does not handle, and you get the nasty streaking you observed. This can also happen when you use a large texture resolution (e.g. greater than 8x), because then each texture tile covers less than the area of a single patch, so again, we have patches with more than one texture tile, and streaking occurs.

Anyway, long story short, were you using a texture tile size that is not a power of two (e.g. 512x512, 1024x1024, 2048x2048, etc)? Or perhaps a texture resolution in the texture wizard that was not a power of two? Also, did Sapphire throw a warning about this? (I think it's supposed to).

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

Re: barcodes in green on texture

Postby Ionus » Sat Aug 27, 2016 6:13 am

Hi Aaron,

I am lost. I am using the default textures and recommended sizes. I do have a AMD Radeon 5700 and I read on these forums where that may not fully support OpenGL though I have the latest drivers from Feb. I followed your guide with importing SRTM and they are 6001x6001. I assume I need to resize those but your guide lacks a mention of any need to do so in texturing. I note the nearest size will be 4096x4096 or 64squared by 64 squared. This will be 64 lots of 512x512 Texture Maps and 4096 lots of 64x64 Sapphire Heightfields. Is this a lucky guess or can you elucidate my error ?

Also the maps come with a pixel scale of 92.69m. Is this desirable from strictly an L3DT point of view ? From the point of view of a turn based Strategy game, probably 100m would be better.

I note the water line is ragged. Is there a problem if I cut off the non-data below the sea level at 0 instead of -100 ?

Cheers!
John
Ionus
Member
 
Posts: 10
Joined: Sat Jul 30, 2016 6:29 am

Re: barcodes in green on texture

Postby Aaron » Sun Aug 28, 2016 1:22 pm

Hi John,

Could you please load the project, view the map in Sapphire, and then send me the log file? (to aaron@bundysoft.com) You can get the log file from disk at:

C:\users\[your username]\L3DT\logs\[version]\log.txt

Ionus wrote:I assume I need to resize those but your guide lacks a mention of any need to do so in texturing.


You shouldn't need to resize (unless L3DT tells you to.) The restrictions on texture tile sizes & resolutions only applies if you want the texture to render properly in Sapphire. The texture data will be just fine at any tile size/resolution, regardless of whether Sapphire can render it properly. It will still be OK for exporting to Panda3D/etc.

Ionus wrote:Also the maps come with a pixel scale of 92.69m. Is this desirable from strictly an L3DT point of view ? From the point of view of a turn based Strategy game, probably 100m would be better.


As far as L3DT is concerned, it doesn't matter. However, please note that if you change the horizontal scale of an existing map, you will change the gradient of slopes unless you also change the vertical scale.

Ionus wrote:I note the water line is ragged. Is there a problem if I cut off the non-data below the sea level at 0 instead of -100 ?


Maybe try -1. For sea flooding to work, the seafloor must be below 0.

Best regards,
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 21 guests

cron