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

    • 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
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
    • Ansome

      Well then, it's been about a week since I released my first FM and I must say that I was very pleasantly surprised by its reception. I had expected half as much interest in my short little FM as I received and even less when it came to positive feedback, but I am glad that the aspects of my mission that I put the most heart into were often the most appreciated. It was also delightful to read plenty of honest criticism and helpful feedback, as I've already been given plenty of useful pointers on improving my brushwork, level design, and gameplay difficulty.
      I've gotten back into the groove of chipping away at my reading and game list, as well as the endless FM catalogue here, but I may very well try my hand at the 15th anniversary contest should it materialize. That is assuming my eyes are ready for a few more months of Dark Radiant's bright interface while burning the midnight oil, of course!
      · 4 replies
×
×
  • Create New...