FansOfAll
Lazy Duchess
Lazy Duchess

patreon


Coding good looking indoor lighting

Hi!

So lately I've been thinking about lightmapping and indoor lighting in The Sims games, specifically to draw inspiration for OpenTS2.

Originally, The Sims 2 doesn't really have the nice soft lighting and shadows the later games have indoors, just lights, no shadows:


There are outdoor shadows, which for lot shadows are really interesting on their own as they use a height map, which means that just placing a roof by itself will create the same shadow as if it actually had walls leading up to it, but no indoor shadows at all.

The first time we saw lightmapped indoor shadows was in The Sims 1 for console, somehow (Notice the counter casting shadows):

So it is a little silly that they didn't make it into TS2.

They finally make an appearance on PC with TS3:


 Now, this is what I've been working on:

They're raytraced with multiple samples and scattered rays, so they also make some nice penumbras and soft shadows:

One of the coolest parts though, in my opinion, is this system I came up with that allows for realtime shadows that blend in with the lightmap:

Imgur Video 

These realtime shadows are way less accurate and cheaper than the non-realtime raytraced lightmap, but I think they blend in quite well:

This will hopefully be used in OpenTS2 for indoor lighting when the time comes, and animated things that walk around like Sims, pets, etc. will use these cheap realtime shadows, and I think it'll look pretty good!

Generating the lightmap does take a second or two like in TS3 and TS4, but if I manage to make it multithreaded or run on the GPU it could potentially be faster and higher resolution. We'll see.

Coding good looking indoor lighting

Comments

I never noticed that sims 2 on PC was missing light maps/shadows in indoor lighting. Its kinda strange considering that despite missing some lighting features like the shadows indoors, the games base lighting is still leagues ahead of Sims 3's lighting in terms of looks. The new shadows for OpenTS2 are looking very impressive so far! :D

Anime_Boom


More Creators