L3DT users' community
Large 3D terrain generator

blended texture from a dithered attribute map

Got a problem or need advice?

blended texture from a dithered attribute map

Postby botanyothername » Fri Mar 27, 2015 8:36 am

I'm using an imported attribute map that's designed to use dithering to create smooth transitions between textures in the final texture map. To this end I left all the blend radii of the land types at -1, and rendered the texture map with anti-aliasing set to 16. The attribute map is the same resolution as the final texture. This mostly works, but wherever there's dithering, a subtle grid or vertical line pattern appears in the final texture. This artifact appears in slightly diferent forms at all the antialiasing radii i've tried (2, 8, 16). Attached is a small piece of the final texture and the attribute map. Anyone have a suggestion how to resolve or avoid the texture looking like this?
Attachments
texture_example.png
attrib_example.png
botanyothername
New member
 
Posts: 4
Joined: Fri Mar 27, 2015 8:22 am

Re: blended texture from a dithered attribute map

Postby Aaron » Fri Mar 27, 2015 2:13 pm

Hi botanyothername,

How curious. Can you tell me what the distance is, measured in pixels in the output texture, between the repeating grid/line features? If you use the 'ruler' toolbar button to click and drag between two adjacent lines on the texture map, L3DT will show a message like "(124, 111) to (4345,444), distance = 43874km". The distance in pixels is the difference between the first ordinal in the brackets for the start and end coordinates (e.g. 4345 - 124 = 4221 pixels).

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

Re: blended texture from a dithered attribute map

Postby botanyothername » Fri Mar 27, 2015 2:58 pm

Thanks for replying. In most places the distance is 4, in others, 2.

PS I forgot to mention that all the texture layers involved have a resolution of 1 relative to TX/HF, and the heightfield is also the same resolution as the output texture.

PPS maybe I'll make a small test which just uses two land types, both with a solid color as a texture.
botanyothername
New member
 
Posts: 4
Joined: Fri Mar 27, 2015 8:22 am

Re: blended texture from a dithered attribute map

Postby botanyothername » Fri Mar 27, 2015 3:21 pm

Yup, definitely 4
Here's a 256x256 test, 16 antialiasing, two land types have no appearance, so they just appear as their colors.
Attachments
dithertest-att.png
attributes
dithertest-att.png (17.91 KiB) Viewed 11540 times
dithertest-tex.png
texture
dithertest-tex.png (74.5 KiB) Viewed 11540 times
botanyothername
New member
 
Posts: 4
Joined: Fri Mar 27, 2015 8:22 am

Re: blended texture from a dithered attribute map

Postby Aaron » Wed Apr 01, 2015 1:48 pm

Hi botanyothername,

Thanks for the info. I've reproduced the fault; it looks to be in the anti-aliasing. I will post back here when it's fixed (which may be a week or two, due to current commitments). Thanks again for the bug report, and sorry for the inconvenience.

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

Re: blended texture from a dithered attribute map

Postby botanyothername » Tue Apr 07, 2015 3:45 pm

Great :-)
botanyothername
New member
 
Posts: 4
Joined: Fri Mar 27, 2015 8:22 am

Re: blended texture from a dithered attribute map

Postby Aaron » Thu Apr 09, 2015 10:26 am

Hi Botanyothername,

Drat, it looks like I've got some work to do here. The previous anti-aliasing routine used a sub-sampling mask to speed up the texture calculation, but this was causing the undesirable patterns in the output. If I omit the masking, the patterns go away and you get nice smooth blended output, but the performance hit is pretty severe. I'll see if I can come up with a better mask and/or more performance optimisations to get some speed back.

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


Return to Help and support

Who is online

Users browsing this forum: No registered users and 70 guests