Jump to content
The Dark Mod Forums

Nightvision: an Alternative for Ambient_world?


Sotha

Your input  

8 members have voted

  1. 1. Which was better?

    • Traditional ambient_world method
    • Nightvision method
    • Both have their own pros and cons


Recommended Posts

Implementing Nightvision in your FM is ultra easy. You need:

1) the script given here:

void update_player_nightvision()
{

vector adjusted_origin;
adjusted_origin=$player1.getOrigin() + '0 0 64'; //must adjust origin a bit higher so that the light is in the players head.

$darkvision.setOrigin(adjusted_origin);

}

2) a trigger_timer (start_on 1 ; wait 0.01)

3) a atdm:target_callscriptfunction (call update_player_nightvision)

4) have the trigger_timer to target the atdm:target_callscriptfunction

5) a light called "darkvision" (I used for Coersion version: light_radius 400 400 400 ; noshadows 1 ; texture lights/biground1 ; _color 0.024 0.024 0.059)

  • Like 1

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I played for a little while.

 

1 - Provides darkness that's more real than when a general ambient is used.

 

2 - Every nearby surface reacted like I was wearing a miner's cap casting a faint blue glow. The metals became shiny blue as I approached, and the walls showed a point source of blue moving across them as I walked along.

 

3 - After dousing a few torches and candles, the middle and far distance became black, and I couldn't see any oncoming guards. I could hear them, but not see them. At the end of my test, a heretofore unseen guard swept out of the black yelling, "Now I've got you!" and I was dead.

 

4 - I passed a guy sleeping on a bed in a blackened room. I didn't know he was there until he woke up and asked if someone was there.

 

5 - Doors popped into existence (surprise!) as I approached and they suddenly highlighted. Less realistic than seeing the door first and then having it highlight when I closed in on it.

 

I would probably adjust the blue light to grey and tone it down some, to reduce the "miner's cap" effect.

 

I want to try this in an outdoor scene and see what it looks like. WS4 is mostly outdoors in a rainstorm with an overall bluish ambient. Surviving requires seeing oncoming patrolling guards, and I'm wondering if the nightvision approach would enhance or diminish the experience.

  • Like 2
Link to comment
Share on other sites

Thief 4 used a hybrid approach, which might be a good compromise.

 

I would remove the specular stage from the light attached to the player so you don't get any gleaming.

Link to comment
Share on other sites

I don't know the technical details, but they had a low-level ambient (dark areas were not totally dark), and areas in a small radius around the player were lit up further.

Link to comment
Share on other sites

Thanks for the feedback! I would be really pleased if you found this useful.

 

In my tests, with the test map, I could see clearly stuff in darkness within 200 units of so (the lamp radius is 400 units.) Thus, I believe it is a monitor brightness thing, and you would probably get a better experience with slightly increased gamma levels, or touching up the darkvision lamp light level a bit in the .map file.

 

Now that I think about it, the Nightvision should be re-calibrated in the TDM gamma-room so that people have matching experience. Monitor brightnesses will vary.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

Link to comment
Share on other sites

Very cool! I like the effect you have here.

 

Have you tried out any of the other light textures? It might benefit from a stronger falloff- so objects appear / disappear at a shorter distance. I would say that a combination of this and world ambient is a pretty elegant solution for most FMs. However, I would be mindful of the blue coloring as some people might find it jarring.

Edited by kingsal
  • Like 1
Link to comment
Share on other sites

To put my lot in, I would suggest you use atdm:ambient_world instead of a generic light entity for the bound light. This way, when you set up locations, you can adjust the ambient light colours in those and atdm:ambient_world would react accordingly, allowing you to give the light location-appropriate tints.

Edited by Spooks

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Link to comment
Share on other sites

  • 2 weeks later...

To put my lot in, I would suggest you use atdm:ambient_world instead of a generic light entity for the bound light. This way, when you set up locations, you can adjust the ambient light colours in those and atdm:ambient_world would react accordingly, allowing you to give the light location-appropriate tints.

  • the ambient_world light is rendered differently from the other lights, so it might not yield the desired effect
  • if you want to adjust the light bound to the flame you can alter the scriptobject handling the locations (tdm_locations_settings.script or something like that). the script is intuitive and well documented as far as I remember

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

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...