Page 1 of 1

blended texture from a dithered attribute map

PostPosted: Fri Mar 27, 2015 8:36 am
by botanyothername
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?

Re: blended texture from a dithered attribute map

PostPosted: Fri Mar 27, 2015 2:13 pm
by Aaron
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.

Re: blended texture from a dithered attribute map

PostPosted: Fri Mar 27, 2015 2:58 pm
by botanyothername
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.

Re: blended texture from a dithered attribute map

PostPosted: Fri Mar 27, 2015 3:21 pm
by botanyothername
Yup, definitely 4
Here's a 256x256 test, 16 antialiasing, two land types have no appearance, so they just appear as their colors.

Re: blended texture from a dithered attribute map

PostPosted: Wed Apr 01, 2015 1:48 pm
by Aaron
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.

Re: blended texture from a dithered attribute map

PostPosted: Tue Apr 07, 2015 3:45 pm
by botanyothername
Great :-)

Re: blended texture from a dithered attribute map

PostPosted: Thu Apr 09, 2015 10:26 am
by Aaron
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.