Sun position in LVL file

Homepage: www.mtm2.com/~traxx/index.shtml
Post Reply
User avatar
Phineus
Glow Ball
Posts: 24
Joined: Tue Feb 02, 1999 7:00 pm

Sun position in LVL file

Post by Phineus »

The sun position is defined on the eightteenth line of the LVL file.

<blockquote>0
track.txt
track.raw
track.clr
track.act
track.tex
zero.raw
track.pup
track.ani
track.tdf
cloudy2.raw
cloudy2.act
track.def
track.nav
track.wav
track.fog
track.lte
0,-46333,46333
47400
32000,-46333,0
64000
255
!waterHeight
10</blockquote>

The following are the traxx proximate (x,y,z) locations.

North
0,-46333,-46333

South
0,-46333,46333

East
-46333,-46333,0

West
46333,-46333,0

Directly overhead
0,-64000,0

Therefore, the x-axis is east-west, the z-axis is north-south. Highest value is 65535 but mid terrain is actually 46333. Thus, we can extrapolate. For example.

South-east
-46333,-46333,46333
User avatar
Fila
Member
Posts: 1460
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Post by Fila »

For some reason i find this a funny feature :)
And for some reason (although when you drive a track you don't really notice) i find this pretty cool.
"...and there's Pantano having an 'I'll go join that crash' moment." - Martin Brundle (UK F1 commentator)
User avatar
Phineus
Glow Ball
Posts: 24
Joined: Tue Feb 02, 1999 7:00 pm

Post by Phineus »

Guitar Bill gave us five positions. For alphaville, seeing lens flare just spoiled the atmosphere so I had to get rid of it. Now, this week I found I needed this info again (for best effect acropolis needed the sun in the south-west) so I figured I might as well post it so I don't have to figure it out all over again every time I need it. And yes, little tweaks can make a big difference.
User avatar
Fila
Member
Posts: 1460
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Post by Fila »

So what happens if i select 0,-50000,50000
User avatar
Drive2Survive
Member
Posts: 495
Joined: Fri May 04, 2001 2:01 pm
Location: Bathurst, NSW, Australia
Contact:

Post by Drive2Survive »

'twould be in the south - a little further and higher than 'normal' - making no obvious visual difference? (A guess)
10 years of MTM2 ~ 1998-2008
"Thanks for the MTMories"
User avatar
Fila
Member
Posts: 1460
Joined: Mon Jul 02, 2001 2:01 pm
Location: Lost in Translation
Contact:

Post by Fila »

I'd test it but i am too lazy to take the .pod apart and rebuild it :D
Sky
Member
Posts: 130
Joined: Sat Nov 02, 2002 2:01 pm

Post by Sky »

So what is the 20th line for? looks like the numbers have the same range as the sun position?

are they for ambient light, darkness of shadows? or who knows?
User avatar
Phineus
Glow Ball
Posts: 24
Joined: Tue Feb 02, 1999 7:00 pm

Post by Phineus »

Good question. I also don't know where "dark, bright, alt bias, shadows" show up in the game files.
Sky
Member
Posts: 130
Joined: Sat Nov 02, 2002 2:01 pm

Post by Sky »

I've been messing with them in game and im getting some really inconsistent results.

Moving dark to 0, alt bias to zero, bright to 99% and shadow to 100%

Gets you absolutely no shadows from the mountains and terrain, but the trucks are almost black, as are the ground boxes and models

Sliding the dark control upwards automatically raises the bright to match this means; you can;t have the dark slider higher than the bright.

alt bias makes the lower terrains levels darker without a "sun shadow effect" (IE (trenches are darker while mountains are brighter)..althgout this can be troublesome too because the bright and dark levels also tie into alt bias levels.

It was very interesting to see a well lit truck pass behind a mountains and turn pitch black without a shadow from the mountain itself. this leads me to belive the trucks ground boxes and models are shaded dynamically in game.

I'm going ot make a test track with 1 mountain range and a few models with the rest of the terrain flat and see what i an come up with.

Working the sliders and trying for a intended effect leads to some frustrating results.

Like I mentioned earlier it seems to be really inconsistent too, sometimes the changes on the sliders do nothing to effect the light in game. I am wondering if a traxx save, or something else triggers the map and lte file builds because sometimes nothing happens at all.

Editing the LVL by hand without knowing exactly what numbers coincide with which effect is an exercise in frustration as well. Bulding and rebuild pods from a lst file, while having to delete the map and lte files becomes tedious quickly when guessing.

One thing I learned very early on is that lighting can change a track from looking good to excellent. Dry falls for mtm1 when run in mtm1 is an excellent example of good lighting.

So i am trying to figure it out as best I can. Tomorrow I will build a test track with a trench and mountain, and a couple of square models, and change one number ata time then post some screen shots of the results. i have a need to understand how things work, and this ones got my attention.

if anyone has insight I am all ears..
User avatar
Phineus
Glow Ball
Posts: 24
Joined: Tue Feb 02, 1999 7:00 pm

Post by Phineus »

> Working the sliders and trying for a intended effect leads to some frustrating results.

Tell me about it.


> a test track with a trench and mountain, and a couple of square models
> if anyone has insight I am all ears..

Plant a tree, and put in a ground box over-pass. And it probably matters if the sun is overhead or to a side.

A thought might be to place a computer truck in various places in the terrain... that way you can quickly switch locations to see the change of effect in the same track. (tip, use gold mode to freeze the comp trucks, then chase far, then 'k' to switch trucks).

Here's one for the math whizes... four sliders, each slider positioned at 0%, 25%, 50% and 100%..... how many total possible combinations?
User avatar
OLD_YoMega
Member
Posts: 240
Joined: Fri Jul 06, 2007 2:00 pm

Post by OLD_YoMega »

Phineus wrote:>
Here's one for the math whizes... four sliders, each slider positioned at 0%, 25%, 50% and 100%..... how many total possible combinations?
16 with just 0%, 25%, 50%, and 100%. Lol. Much higher number with 0-100% on all four sliders.
Still around. Somewhere.
User avatar
Phineus
Glow Ball
Posts: 24
Joined: Tue Feb 02, 1999 7:00 pm

Post by Phineus »

Guess I left out 75%... and I think it'd be much more than 16. I'm not the factorial guy but wouldn't it be closer to 4 to the fifth power?
Sky
Member
Posts: 130
Joined: Sat Nov 02, 2002 2:01 pm

Post by Sky »

I must have wrote two pages and accidentally hit delete.

Here's why we are having issues with lighting, a picture's better than al ong post anyhow. The suns position is to the right in this picture, the terrain should be casting a shadow but is instead casting light.
settings dark 50% bright 50% alt bias 0 shadows 100%

The terrain and GB's are castinglight instead of shadows. in software mode it is workign as one would expect, dark shadows opposite the sun.

I noticed the same effect when I kept every setting the same except I slid dark down to zero. The terrain itself was a little lighter, and the "pseudo shadows" not as bright" sliding up the dark makes the shadows brighter.
Image
http://www.skyscomputers.com/pod/weird.jpg

Ill investigate and post further but I am thinking perhaps Bill programmed the lighting in software mode? Or the card drivers handle lighting the opposite as they did when the game came out.

I have learned with shadows at zero, any lighting effect is pretty much cancelled out, no shadows or shading of object and GB's. so to achieve lighting at all one must have some percentage of shadow. In all my experience I was not able to "lengthen the shadows" I am assuming this is done with the suns height relative to the horizon.

more to come when I have some quite time ;D

if anyone has any insights please toss them forward. I am happy to pass around the TXX so we can test lighting on different machines and see if it is a driver issue. IMHO there;s too many variables to use more than one test track.
Sky
Member
Posts: 130
Joined: Sat Nov 02, 2002 2:01 pm

Post by Sky »

FWIW tire tracks and the "smoke" from the tires are both affected the same way flat trees are by the lighting
Sky
Member
Posts: 130
Joined: Sat Nov 02, 2002 2:01 pm

Post by Sky »

After further testing, it seems that setting the shadow to anything over 94% kicks in the reverse shadows.


a setting of 94% and below produces very dark almost black shadows, anything more and the opposite bug kicks in. This is shot at 94% shadow
Image
http://www.skyscomputers.com/pod/proper_shadow.jpg

So that's why sliding the shadows to 100% for testing shadow length did not work and left me clueless.

Hopefully more to come
User avatar
OLD_YoMega
Member
Posts: 240
Joined: Fri Jul 06, 2007 2:00 pm

Post by OLD_YoMega »

Phineus wrote:Guess I left out 75%... and I think it'd be much more than 16. I'm not the factorial guy but wouldn't it be closer to 4 to the fifth power?
It would technically be more then 16. I was doing combinations at just those percentages. I don't want to do all that math.
Still around. Somewhere.
Post Reply