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

    • 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.
      · 5 replies
    • 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...