Page 1 of 1

Is it safe to use different-sized lightmaps?

Posted: Wed Aug 12, 2015 9:28 am UTC
by illwieckz

Hi, some lightmaps like Transit lightmaps have a very poor resolution and in some place the aliasing is ugly, for example here:

Image

In can do some antialiasing offline, I just have to resize the lightmap (lik doubling it) using a sharp interpolation algorithm, then I got that:

x2 with LanczosSharp:
Image

x4 with LanczosSharp:
Image

It's not a good idea to do that an all textures blindly, because you can get issues like that on lightmap edges:

Image

So, is it safe to have one lightmap with 256x256 resolution when all other lightmaps have a 128x128 resolution? Currently it works, but is it safe?


Re: Is it safe to use different-sized lightmaps?

Posted: Wed Aug 12, 2015 9:36 am UTC
by illwieckz

Another example with x4 Lanczos2Sharp interpolation:

Before:
Image

After:
Image


Re: Is it safe to use different-sized lightmaps?

Posted: Wed Aug 12, 2015 9:47 am UTC
by illwieckz

Applying some blur algorithm:

Image
Image

Before:
Image

After:
Image

Before:
Image

After:
Image

I just do:

Code: Select all

for n in 03 04 09 12 25 38 49 50; do i="lm_00${n}.png"; convert -resize 512x512 -filter Lanczos2Sharp -filter Gaussian -define filter:sigma=1.5 $i $i; done

:wink:


Re: Is it safe to use different-sized lightmaps?

Posted: Wed Aug 12, 2015 10:22 am UTC
by illwieckz

Just saying, the Spline algorithm is better than the ones from the Laczos family to antialias shadows in lightmaps:

Original:
Image

-filter Lanczos2Sharp:
Image

-filter Spline:
Image

-filter Spline -filter Gaussian -define filter:sigma=1.5:
Image


Re: Is it safe to use different-sized lightmaps?

Posted: Wed Aug 12, 2015 5:28 pm UTC
by kangz

That is very amazing, you are a tool genius :D


Re: Is it safe to use different-sized lightmaps?

Posted: Sun Aug 16, 2015 2:34 pm UTC
by illwieckz

Some more screenies,

Before:

Image

After:

Image

:grin: