L3DT users' community
Large 3D terrain generator

Lighting seams

Please report software faults here.

Lighting seams

Postby David Walters » Tue May 18, 2010 9:47 am

Hi Aaron, Unfortunately I've just discovered there's a problem in the lightmap generator of L3DT. I'm finding it's creating seams at the very edges of both the lightmap and specular map textures when high res mode is enabled. All this time I'd assumed it was my own engine and so haven't bothered reporting it :oops: but after focusing on this issue properly I stumbled upon the problem with the input data.

Luckily, recreating the problem is easy with no changes to the new project parameters required (apart from checking the edge wrapping mode), only a 2x lightmap is needed to show this problem, but it's definitely present in 4x and 16x too. The problem does not appear to occur in 1x mode.

Exporting the Specular map on it's own and using the offset tool in Gimp / Photoshop you will see there is a seam. Generating a light map without specular also has the problem, although it's less pronounced.


Will it be possible to fix this? - I hope it is as making a fully lit texture with at standard resolution seemingly works fine. I appreciate this is bad timing in the release schedule though!

With the wrapping tiling system I'm using it's really important to me that the shading is continuous across world edges. As you can imagine any seam at all is really obvious at ground level :(
David Walters
Doyen
 
Posts: 129
Joined: Fri Apr 24, 2009 1:10 pm

Postby Aaron » Tue May 18, 2010 11:17 am

Hi David,

My guess is that it's to do with the sizes of the bump maps not being integral divisors of the output light map (the rock textures/bump maps are 228x228 pixels*). This means that as they are tiled over the map, the xmax/ymax edges of the light map will not coincide with the edge of the bump maps. Thus, for wrapping terrain, a seam will be evident.

The solution in this case should be to resize the texture and bump map images for the rock land types to be 256x256px. Do you want to give this a try? If successful, I'll update the resources in the installer accordingly.

Thanks for the bug report!

Best regards,
Aaron.

* For no apparent reason. That's just the way I found 'em.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby David Walters » Tue May 18, 2010 11:28 am

Okay, I'm just going onto my lunch break now so I'll give it a try and report back :)
David Walters
Doyen
 
Posts: 129
Joined: Fri Apr 24, 2009 1:10 pm

Postby David Walters » Tue May 18, 2010 12:05 pm

Hi, unfortunately it's still a problem.

I resized rock1.jpg, rock1_bump.jpg and rock2.jpg to 256x256px.
I then offset rock1_bump a bit to ensure that it definitely tiles.

Making a new map, with 2x normals and 2x lighting I get the following output
(presented here with a 64px offset applied to both X and Y):

Image

As you can see there's a subtle but definite seam through 64,64

I should point out that this definitely happens in both Arctic and Temperate climates.

FWIW here's the result of a 1x export -- again offset by 64,64px. This looks perfect to me.

Image
David Walters
Doyen
 
Posts: 129
Joined: Fri Apr 24, 2009 1:10 pm

Postby Aaron » Tue May 18, 2010 10:10 pm

Hi David,

Thanks for the images; I think I get it now. It's the heightfield linear interpolator that's used when generating high-resolution light maps. There are no seams in the 1x res light maps because interpolation is not used/required.

I guess I never made the interpolator 'go around the corner' when interpolating wrapping maps. I'm testing the fix now.

Best regards,
Aaron.

Edit: The fix seems to work. I'll include this change in the second beta release of v2.9, which, if time permits, I'll upload later today.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby David Walters » Tue May 18, 2010 11:06 pm

aaron wrote:Edit: The fix seems to work. I'll include this change in the second beta release of v2.9, which, if time permits, I'll upload later today.

Hooray!
David Walters
Doyen
 
Posts: 129
Joined: Fri Apr 24, 2009 1:10 pm

Postby Aaron » Wed May 19, 2010 11:44 am

Hi David,

The fix is included in L3DT v2.9 beta 2, which is on the Pro downloads page now. Please let me know if you find any further problems with it. Thanks again for the bug report.

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

Postby David Walters » Wed May 19, 2010 6:35 pm

Hi Aaron,

Thanks ever so much for your speedy response in fixing this bug, I now have an infinite expanse of pristine arctic wasteland with not a seam in sight!

All in all 2.9 is shaping up to be great release for you, well done and keep up the good work!

Kindest Regards,
David
David Walters
Doyen
 
Posts: 129
Joined: Fri Apr 24, 2009 1:10 pm

Postby demi » Thu May 20, 2010 12:08 am

I noticed it but thought it was just the way things were so never reported it. Anyway I just stopped the generator and download it. Was making a x16 mega texture but I just started it an hour ago.
:lol:
demi
Oracle
 
Posts: 227
Joined: Thu Nov 24, 2005 4:56 am


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 13 guests