Home | Download | Discussion | Help | Site Map | New Posts | Sign in
Replies: 7 (Who?), Viewed: 7757 times.
Pettifogging Legalist!
staff: moderator
Original Poster
#1 Old 8th Apr 2009 at 4:01 PM Last edited by plasticbox : 8th Apr 2009 at 4:19 PM.
Default How to fix the backwards lot impostor lighting
This has been annoying me no end, ever since the base game – the lighting of lot impostors is exactly opposite the actual light inside the lot, which is just wrong. Turned out that it's surprisingly simple to fix:

1. Open (Base Game) > TSData > Res > Lights > Lighting.txt

2. Find "lightingState day" (line 204 in my file), and copy the parameters below that:

skylight (1,1,1) 0.5
light sun (1.5, 1.2, 2) (1, .94, .875) 2
light sky (-1.5, -1.2, 2) (.8,.8,.8) .5
light fill1 (1, 1, -1) (1,0.8,.9) .5

3. Find "lightingState neighbourhoodImposter : neighbourhood" (line 446 in my file), and replace the parameters below with the ones from the day state.

4. Voilà.

Next time you buildmode-change and save a lot, the light in neighbourhood view will be correct. People who use lighting mods will have to change this in their lighting mod files I guess (for all I remember, the Radiance mod did *not* fix this).


I assume the critical part is in the first bracket

light sun (-2, -2, 1.5) (1, .9, .8) 1.5

-- this looks like the position of a light source as X, Y, Z (the second one I'd assume are RGB values). The original value for neighbourhoodImposter is:

light sun (1.5, 1.2, 2) (1, .94, .875) 2

which is about the opposite. Not exactly sure how much of a role light sky and light fill1 play, but I guess it can't hurt to have them match the in-lot lighting (I actually can't think of a reason to have them NOT match?), that's why I'm replacing everything.

I haven't yet checked whether or not this matches the light direction in the rest of the neighbourhood (the light that is cast on hills, deco objects etc) but the light sources all defined in the same fashion so it would be very easy to make them match.


Always back up game files before you change them.

All my stuff for TS2 · TS3 · TS4

In the kingdom of the blind, do as the Romans do.
7 users say thanks for this. (Who?)
Advertisement
Top Secret Researcher
#2 Old 8th Apr 2009 at 4:53 PM
I am too ignorant to even know what is wrong. I've probably seen what was 'wrong' at one point, but have now gotten so accustomed to ignoring it that I haven't a clue.

Can you give us a screenshot or something to help me see.

You can find more of my creations at The Sorceress & Company
Pettifogging Legalist!
staff: moderator
Original Poster
#3 Old 8th Apr 2009 at 5:09 PM
Here's an example (screenshots are from when I just tested this in the Base Game, with a random unfinished lot):


Lot impostor, before:



This impostor has been generated *without* the fix, as it's an old lot. Look at where the shadows are.


The actual lot:



Note how the actual shadows are exactly the other way around. I made a buildmode change (added the path to the front door), saved and went back to hood view ..


Lot impostor, after:



Correct shadows.

--
Screenshots

All my stuff for TS2 · TS3 · TS4

In the kingdom of the blind, do as the Romans do.
Top Secret Researcher
#4 Old 8th Apr 2009 at 5:34 PM
Aah... I've probably never noticed that, but if I had, it would have driven me crazy. Maybe I'm still marginally sane today because I usually have shadows turned off.

Thank you.

You can find more of my creations at The Sorceress & Company
Site Helper
#5 Old 8th Apr 2009 at 6:22 PM
Cool. Excellent find!
Top Secret Researcher
#6 Old 15th Apr 2009 at 12:55 PM
yay! Thankyou.
#7 Old 15th Apr 2009 at 7:18 PM
Thank you. Just curious, but how do you know that it is the lot imposter lighting that is backwards, and not the in-lot lighting? Are there other shadow-directions that agree with one but not the other? What happens if we copy the definitions the other way, instead?

This Space Intentionally Left Blank
Pettifogging Legalist!
staff: moderator
Original Poster
#8 Old 15th Apr 2009 at 8:32 PM
You can change the directions in any way you want, of course. Like I said, they're defined in exactly the same way for everything -- it's always an X Y Z matrix. I'm just assuming that most people would build their lots according to where the sun is *in the lot*, hence why I'm thinking of that as the "right" direction.

All my stuff for TS2 · TS3 · TS4

In the kingdom of the blind, do as the Romans do.
Back to top

Section jump