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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...