Is it safe to use different-sized lightmaps?

Ask questions about mapping in general, and show off your in-progress work.
Post Reply
User avatar
illwieckz
Project Head
Posts: 717
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Is it safe to use different-sized lightmaps?

Post 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?

This comment is licensed under cc ​​by 4 and antecedent.

User avatar
illwieckz
Project Head
Posts: 717
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

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

Post by illwieckz »

Another example with x4 Lanczos2Sharp interpolation:

Before:
Image

After:
Image

This comment is licensed under cc ​​by 4 and antecedent.

User avatar
illwieckz
Project Head
Posts: 717
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

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

Post 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:

This comment is licensed under cc ​​by 4 and antecedent.

User avatar
illwieckz
Project Head
Posts: 717
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

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

Post 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

This comment is licensed under cc ​​by 4 and antecedent.

kangz
Programmer
Posts: 178
Joined: Mon Feb 18, 2013 12:10 am UTC

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

Post by kangz »

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

User avatar
illwieckz
Project Head
Posts: 717
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

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

Post by illwieckz »

Some more screenies,

Before:

Image

After:

Image

:grin:

This comment is licensed under cc ​​by 4 and antecedent.

Post Reply