Page 1 of 1

Time of day in original Trespasser levels

Posted: Wed Feb 27, 2019 11:37 am
by nihilyst
Hello, here a question that I could not find via the search. I really wondered, if it is possible to modify existing original levels of the game to use a different time of day opposed to their original design. In the original course of the game, the beach level starts in the morning, with really long shadows and a general really nice lighting.
As the level progresess, the sun and shadows accordingly progress. Later levels seem to take place during evening hours with the sky changing accordingly.
Is it (easily?) possible to modify certain level parameters to change the time of day of each level, or is that hard coded into the game engine? For example: playing The Town in the morning ours?
Sorry if this question is dumb, I have no idea until now how to create or modify level content. If it is possible, which tools can beused (TresED?)?

Have a nice day :-)

Re: Time of day in original Trespasser levels

Posted: Wed Feb 27, 2019 3:39 pm
by tatu
This is all possible to change with only TresEd.

The light is "controlled" by an object named DLight and works like a sun. I am not sure if this also control the position of the sun that appears ingame.
The fog can be changed in one of the triggers along with some other triggers that control how the colors appear, searching for "Fog" should give you the trigger.
The CE patch could also be used to create even better looking skies, but it is quite difficult but be sure to check out the document in CE for that. That way do not require any editing to a level :)

Re: Time of day in original Trespasser levels

Posted: Mon Mar 04, 2019 9:17 pm
by nihilyst
Hello again. Thank you for your quick reply. I tried to change the object properties with TresED. Maybe I am too stupid, but I don´t think, that my changes had any effect. I did the following:

- Loaded some Level in TresED
- Searched for the object ("DLight_Ascent" for example)
- Edited properties

Hovever, the changes did not seem to habe any effect. Shouldn´t the shadows change according to my object changes?

Re: Time of day in original Trespasser levels

Posted: Mon Mar 04, 2019 9:42 pm
by machf
You need to rotate the object for the shadows to change...

Re: Time of day in original Trespasser levels

Posted: Tue Mar 05, 2019 9:08 am
by nihilyst
Well, thank you, I will check this out, when I get back home. So, what influence has the position of the DLight object?
Another question: is the object always named 'DLight_*' with the levelname at the end? I did not find that object via the TresED search in the Beach level. Sorry for all these basic questions. But I just startet working with the level editor...

Re: Time of day in original Trespasser levels

Posted: Tue Mar 05, 2019 1:25 pm
by tatu
nihilyst wrote:Well, thank you, I will check this out, when I get back home. So, what influence has the position of the DLight object?
Another question: is the object always named 'DLight_*' with the levelname at the end? I did not find that object via the TresED search in the Beach level. Sorry for all these basic questions. But I just startet working with the level editor...
It will effect which way the shadows are pointed. I do not know how it effects the position of the sun tho, maybe machf knows more about that.

Not all levels have a DLight, otherwise it is named "DLight". For Beach I actually don't know if it only uses a default position. But you can import one into the level (name doesn't matter) and play around :)

No worries, feel free to ask any question and we will happily help. We are aware of the lack of tutorials so ask whenever you need help :)

Re: Time of day in original Trespasser levels

Posted: Tue Mar 05, 2019 3:02 pm
by machf
nihilyst wrote:Well, thank you, I will check this out, when I get back home. So, what influence has the position of the DLight object?
The position itself is irrelevant, it could be even under the terrain; the only thing that matters is the angle, as that's what defines the direction on which the shadows will fall. The "sun" is supposedly somewhere at an infinite distance and its rays all reach the Earth in parallel.
Another question: is the object always named 'DLight_*' with the levelname at the end? I did not find that object via the TresED search in the Beach level. Sorry for all these basic questions. But I just startet working with the level editor...
No, the name of the directional light is mostly a convention, it doesn't have to follow it, just be an object defined as being of the class "CLightDirectional".

Re: Time of day in original Trespasser levels

Posted: Wed Mar 06, 2019 3:42 am
by Draconisaurus
So if you want to get a black sky... you can edit the Fog trigger to have a black color, and edit the sky height in the appropriate start trigger to be so high that it doesn't render. Alternately you can import the Sky object from "TestScnNight"

Re: Time of day in original Trespasser levels

Posted: Wed Mar 06, 2019 9:10 pm
by nihilyst
Thank you for your patience :) . And I am still unable to change the appearence of the shadows and sun angle in any of these levels. What I did was:

- Load IngenLab level in TresEd
- Searched for the DLight_IngenLab Object.
- Opened dialog "Instance Properties" and changed values x,y,z for Rotation
- "OK"
--> Nothing changes. Is there anything else what I need to do?

Re: Time of day in original Trespasser levels

Posted: Wed Mar 06, 2019 10:49 pm
by machf
Did you save and reload the level?

Re: Time of day in original Trespasser levels

Posted: Thu Mar 07, 2019 4:14 am
by TheIdiot
It should have worked after you changed the orientation - are you sure you didn't just move it rather than rotate it? And that you rotated it enough to be noticable?

As for fog, you can actually do some really cool things with it if you're willing to fiddle around with the triggers enough. The specific triggers you're looking for are typically grouped together, usually ending in "_fog" or "_sky" or something like that. As tatu said, you can search "fog" and you should be able to find them. Check out the T-script reference as it tells you what everything means, and then try playing around with the settings there. :) You should be able to do anything you can think of. If you want Town at night, you can go into another level which takes place at night (TestSceneNight or East Dock, for instance) and just copy the values of its fog/ambient/sky triggers over and the orientation of the DLight.
With a CE sky, you can do even more creative stuff, you've just got to make sure you check the examples in the CE documentation.

Re: Time of day in original Trespasser levels

Posted: Sun Jun 26, 2022 2:14 pm
by nihilyst
Came back to this topic after all this time. It seems, no matter how long I am distracted or busy otherwise and far away from this game, I always tend to come back to trespasser at some time :)

Anyway, I tried it again, and It actually works! A few questions remain:

- do the position and rotation ("Properties") of Fog and Sky have any effect or are just the TScript variables important?
- the clouds seem to be pre defined by some bitmap object (TheSky-00 in the Lab level for example). Is that correct?

The changes seem to be effective for example in the Lab Level. I copied from the "Jungle Road" Level:
- the Position and Rotation if the DLight object
- the Fog and Sky TScript values (but not Position, Rotation)

Looks quite nice to see the old level in a different way now, but it may be actually darker than the "Jungle Road" Level now. It may be even darker than the original Lab Level. Am I missing something else?

Re: Time of day in original Trespasser levels

Posted: Sun Jun 26, 2022 5:09 pm
by TheIdiot
- do the position and rotation ("Properties") of Fog and Sky have any effect or are just the TScript variables important?
Not that I know of. The Sky object has some T-Script values which affect the direction and speed that it moves, though.

EDIT: Forgot to mention, Trespasser CE has a custom sky function that allows you to make significantly more complex skies than retail Tres would allow. You can also try checking that out if you're interested.
- the clouds seem to be pre defined by some bitmap object (TheSky-00 in the Lab level for example). Is that correct?
Yes. You can easily replace the textures yourself if you like after exporting the files from TresEd and the re-importing with GeomAdd, either with those from another level or your own.
Looks quite nice to see the old level in a different way now, but it may be actually darker than the "Jungle Road" Level now. It may be even darker than the original Lab Level. Am I missing something else?
You might have missed the Ambient light settings. Make sure you get the values from the triggers which typically end in "_Ambient" and replace those in your level as well with the ones from the level you want to copy the lighting from. You also need to make sure you got the "GlobalClut" trigger's values copied over as well since those define the colour correction and lighting in your level as well. :)

Re: Time of day in original Trespasser levels

Posted: Sun Aug 14, 2022 6:44 pm
by Draconisaurus
Interesting topic.
TheIdiot wrote:You also need to make sure you got the "GlobalClut" trigger's values copied over as well since those define the colour correction and lighting in your level as well. :)
Was going to mention this. The color range set by this object, is related to the color of the fog etc. It's interesting to do tweaks with it.