Jump to content
The Dark Mod Forums

can ambient lights change in a given mission?


ithel

Recommended Posts

I'm at a point where I need to make a decision how I'm going to handle something in the story. Can scripts change ambients? ie....can a single mission go from day to night? I presume AI can with clever scripting have their behavior change on the fly (non-hostile as the norm to hostile-on-sight, for instance). If ambients can change, I don't necessarily need instructions how to do so at this point, I just need to know so I can plan out what is built next and how it is constructed. Thanks again, very much. Your replies so far on other topics have been very helpful to me, and I hope for others as well out there.

Link to comment
Share on other sites

The Location Setting article has specifics about "Dynamic Ambient Light" but that is a zoned approach rather than a timed approach. It is possible in Doom 3 to script light fades (etc) whether those same types of scripts would conflict with anything in TDM is hard to say. I think that there used to be light scripting in the mission "Thieves" before it was replaced with location settings?

 

http://modetwo.net/d...cation_Settings

 

Edit:

 

Actually you could just make one giant Info Location and set the fade-in or fade-out time to a very very very slow value... :unsure:

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

That is a great article, but I guess I had in mind something less about location or time than about a triggered event or script that would change the value of a given ambient for a given area.

 

If ambients can't be changed, though, the article you linked does give me another idea about how to achieve the same result: I could clone the mission with different lighting for each of the twins and teleport the player from the "daytime" part to the "nighttime" part. Not very elegant, but it might be workable. :D It would especially be workable if the engine would permit a brief cutscene between the parts. I need to think this through.

Link to comment
Share on other sites

Simple answer is yes.

 

Lights in Doom3 are dynamic, and ambient light is just another light.

 

More specific (and yet still simple)

 

World_Ambient light is a specific light that casts no shadows and lights everything evenly. It's purpose is to get away from the Doom3 pitch black shadows, to more realistic shadows where the eye adjusts and you can at least see something.

It's also better for the game because you don't have fingers to prod around in the dark and find your way, being in game you at least need some visual clues at all times or it's just plain frustrating.

 

The location info is just a way to change lighting. You can set the entire mission to be one location, or the sewer can be a seperate location (so it's a bit more green). Those locations have to be separated by vis_portals.

 

But probably what you want is one light that covers the entire map (much like world_ambient does). But you don't want a 'world ambient' entity, you just want a light, so it will still cast shadows.

There should be an easy enough way to script it to turn on, or brighten, change color, whatever. Though I suck at scripting.

 

The downside is it will impact performance by one more light , so you'll just need to be a little more careful to not place too many lights in any spot.

 

Other than the name 'world_ambient' no lights in Doom3 are 'ambients' where as Dromed used that as a light source with no source (ie: point light compared to a torch)

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

It looks like you could directly change the ambient global values with a script command rather than location settings:

 

http://modetwo.net/d...lobal_variables

 

But I think they only affect the Enhanced Ambient mode...?

 

The skybox can be an ROQ video and can be scripted to playback at various speeds I believe.

 

Here is an example for Doom 3, it might work alright in TDM as long as it's tied to a trigger or S&R?

 

http://www.doom3worl...hp?f=65&t=15535

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

It's not clear exactly what you want to do but as Tels says, the bottom line is that all lighting can be controlled dynamically but it might be complicated / advanced /tedious to achieve some effects.

 

The main ambient lighting for the whole map 'ambient_world' is designed to represent almost complete darkness so there are no areas of total blackness. Except for special cases it should not be set very high or the player will have no shadows to hide in.

 

If what you actually want is to be able to change your mission from night to day then you don't want to change ambient_world much if at all. If you set ambient_world bright then even if you go down into a windowless cellar it will be bright (assuming no local settings.)

 

I think I would set up parallel lights outside to represent sunlight and/or moonlight. Another complication would be to set up different textures / lighting indoors to represent this (eg, change internal window texture from say dark / moonlight to sunlit - maybe add sunbeams.) A further complication is if you want the day/night to proceed in (accelerated) real time (like in Oblivion, GTA, etc.) then the light will need to move slowly across the sky. This is not really suitable for a Dark Mod type game imo except possibly for an abbreviated form eg, game starts an hour or so before dawn and finishes a few hours or so after.

 

The whole thing might be very advanced and complex but probably do-able. It could turn out to be horrible. It could turn out to take weeks and weeks of work and tinkering and still not be very good.

 

It would be a lot easier if you just want night to change to day while the player is indoors, eg, starts at night, goes down mineshaft for main mission, when complete, exits to find it is daytime.

Link to comment
Share on other sites

It would be a lot easier if you just want night to change to day while the player is indoors, eg, starts at night, goes down mineshaft for main mission, when complete, exits to find it is daytime.

 

Hm, yes, a full daytime/nighttime cycle is probably doable, but might be a lot of work to setup the first time. As Fidcal says, switching from night to day during locations is much easier, because you can use the location_info setup all the time.

 

Think f.i. pitch-black underground, dark mineshaft (glowing mushrooms, greenish), dimly lit staircase/elevator, lit hallways (with brighly lit windows and sunbeams), brightly lit outside as a transition with several zones.

 

Each zone would set a new ambient_world, and when the player crosses the visportal into the next zone, the light slowly fades to the new value. You can set the speed of the fade, and the new light value for each zone.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Thank you again for the very helpful replies, despite the lack of clarity in my question.

 

I don't need a gradual day-into-night movement. An instantaneous shift from day to night is perfectly acceptable. The questions arise out of a desire to tell a three-act story within the confines of a single mission. It might be less messy to tell the story as three smallish missions than one biggish.

 

Act One: daytime setup, hint of Sinister Plot, and establishment of new player-character...something bad happens at the end

Act Two: fact-finding in same area as Act One, but now at night and with more structures open to be explored. Who and why and where of Sinister Plot.

Act Three: adjacent, overlapping area as Act Two, rescue/exposure of Sinister Plot, justice served.

 

I'd thought this could all be in one mission, given it is mostly one geographic area. But Fidcal rightly points out that day-to-night involves much more than changes of light (and ambient light has little to do with it, anyway). Not to mention drastic changes to AI behavior that would more easily be accomplished with a new mission rather than through some complicated script change or through teleporting the player to a cloned world with new though identical AI.

Link to comment
Share on other sites

You could use the Campaign support and make each clone a mission within a Campaign. The only gotcha is that I don't think you can return to a previous map in the current version. :unsure:

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

You could use the Campaign support and make each clone a mission within a Campaign. The only gotcha is that I don't think you can return to a previous map in the current version. :unsure:

 

You can't. That's a separate problem from Campaign support.

 

Mayhaps I'll look at it someday, since I'll be needing it at some point.

 

 

Link to comment
Share on other sites

Alright... I found it:

 

http://www.doom3world.org/phpbb2/viewtopic.php?p=66116#66116

 

See the post by goliathvt

 

You script changes to the "light center" property...

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 1 reply
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...