Jump to content
The Dark Mod Forums

Enemy Visibility In Accordance To Lighting?


woah

Recommended Posts

I was just curious how the team plans to go about enemy visibility in accordance to lighting. Will there be preset areas of darkness as in the Thief series? Will the darkness intensity be based on the Doom 3 engine's dynamic lighting? I know there will be a light gem, but will the light gem be a representation of the model's visibility, or will the light gem's visibility factor be of itself with the assumption that the player model visibility will be adequate to the light gem's?

 

I also noticed that in Doom 3 there was never really any different intensities to light--there was hard black or plain light. Is this modifiable?

Edited by woah
Link to comment
Share on other sites

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

The lightgem is a representation of the visual awareness that a real person would have. Of course a real person wouldn't need this, because it is pretty well aware about it's surroundings, but this is not so obvious in a game environment. The value that the lightgem shows is derived from the actual light the mode receives in a given frame.

 

As for D3 lighting. Of course you can have all kind of light intensities, but shadows will be hard always, because softshadows are way to performance intensive for current machines. There was a testmap with the T3 engine on TTLG which tried to create softshadows, but this was using 16 lightsources. Needles to say that such a map is not playable. Even though D3 is much more effecient then the T3 engine, this would be the same.

Gerhard

Link to comment
Share on other sites

Soft shadows just refers to the edges of the shadow itself, and yes, it's difficult to make the edges fuzzy. But shadows in D3 don't have to be full-black. It is possible to place soft ambient lights so that your shadows will be various shades of grey.

 

If you check out this thread: http://www.doom3world.org/phpbb2/viewtopic.php?t=10469 you'll see that there are plenty of shadows that are not pitch black.

Link to comment
Share on other sites

That's wrong. All the lights are using projection textures which create the soft falloff. You can use this also for a dynamic lightsource. IMO in D3 (the game) most of the lights were artificial lights and therefore had a very crisp and hard shadow as well, but this has nothing to do with them being dynamic lights or not.

Gerhard

Link to comment
Share on other sites

Spar implemented an awesome light gem which also looks at the falloff texture to get the value of how lit the Thief is, so even though the falloff is done with a texture and the actual light is hard edged, as far as the light gem is concerned the fall off is real :)

 

Oh I see what you mean - you mean sillhouette instead of contrast right? Then the answer is yes. Guards won't see your dark form if you are in shadow but the background is bright (creating a sillhouette). You are in shadow and that's the end of it.

Link to comment
Share on other sites

Well, that remains to be seen, Dom. Silouhettes are on our list of things to explore...there's no guaruntee we'll be able to do them, but there are some ideas on the drawing board.

Link to comment
Share on other sites

well assuming that you could figure out code to check silouettes you could use a line of sight check to optimise it's usage.

 

but there's another problem of that once you go the silouette route the light gem doesn't represent enough information. because you might be in darkness but when contrasted you can be seen easily. but the contrast will depend on a guards perspective, so how do you represent perspective based contrast? could modify the brightness of the gem as to indicate that you are contrasting, the more you contrast and the more directions you contrast in the brighter it gets.

 

or you could simply ignore it and require the player remember the bright spots around him and avoid contrasting.

 

oo, nightmare mode: no light gem :)

Link to comment
Share on other sites

How about this: (creating new work for everyone)

 

The player chooses his/her getup in the store. Each cloak has a contrast value associated with it.

 

Each material can have either a sampled, or tagged constrast value assigned to it (black and white detection in the eye is more sensitive than color detection in low-light conditions). The clothing contast value is compared to the texture contrast valueif the surface beyond the player along the line of sight. The "light gem" could have an outer ring that shows the contribution to the light gem brightness caused by visible contrast with the most different of the surrounding surfaces.

 

Essentially, a simple way to do it would be to raycast out in the 6 directions of a cube from the player and see what the worst contrast would be (other than up?) and then have a second part of the light gem that included that information.

 

Perhaps even cloaks could be a piece of equipment. ie, switch from the green cloak to the brown cloak when going inside....

 

Ok, now I'm preparing myself for the fashion model jokes.

Link to comment
Share on other sites

How about this: (creating new work for everyone)

 

Not only that, but it would make the game a lot more difficult - unnecessarily so in my opinion. There is such thing as too much realism.

 

One thing I have been wondering about visibility is the relationship between the light gem and r_shadows. If you have shadows turned off, will the light gem be affected or is the visibility code independent of that of the renderer?

Link to comment
Share on other sites

I hope no one would actually play the game with the shadows off, and I hope that the visibility code does depend somewhat on the renderer so that people don't have that sort of cheat available to them... That would utterly defeat the purpose of playing a shadowy stealth game... I do hope a computationally affordable method can be found to take sillhouettes into account... That would really make a difference to me at least :)

 

Don't forget about AMBIENT LIGHT people, that is the big advantage of lightmaps, they help to give you a more realistic set of shadows, because you can do a realistic global illumination calculation with radiosity or photon mapping. Downside is they aren't dynamic. I guess realtime radiosity is still a while away, but you can simulate it to a degree in Doom 3 with careful use of ambient lighting and non-shadowing fill lights. Unless your map is set deep underground, there will always be a tiny bit of ambient light in a room, even if there are no obvious light sources, so always make sure you adjust ambient lighting in each room to an appropriate level.

 

Does the Doom 3 engine allow you to trigger ambient light levels with a script, so if you doused a torch or switched an electric light off, you can change the ambient light level accordingly?

Link to comment
Share on other sites

OrbWeaver - the answer is that the light gem would not be affected. Doom 3 still has the light data there, but the console command only stops the game from rendering it. The only thing it saves is video card load - so for me it doesn't show a performance increase because my video card is already running as fast as it can, it's my processor that is slowing the game down.

Link to comment
Share on other sites

but there's another problem of that once you go the silouette route the light gem doesn't represent enough information. because you might be in darkness but when contrasted you can be seen easily. but the contrast will depend on a guards perspective, so how do you represent perspective based contrast?

 

Well, that's your problem (as the player). The lightgem does NOT tell you wether your are seen or not, or how good you can be seen from indidivudal AIs. the lightgem only tells you how bright you are lighted. This is the same as in RL when you look down your body and say to yourself "Damn! I'm standing in bright light, so I have to find a darker spot." It also won't tell you if you are standing out for individual, enemy positions.

 

The AI has enough disadvantages as it is, so if the silhouette can be properly coded than it will be one disadvantage less.

Gerhard

Link to comment
Share on other sites

OrbWeaver - the answer is that the light gem would not be affected.  Doom 3 still has the light data there, but the console command only stops the game from rendering it.  The only thing it saves is video card load - so for me it doesn't show a performance increase because my video card is already running as fast as it can, it's my processor that is slowing the game down.

 

Actually if the new lightgem system will work properly, then it would mean that the lightgem reflects exactly what the player sees on the screen. If he disables shadows than there wont be any shadows. With the current lightgem this is different because it doesn't know what the renderer does.

Gerhard

Link to comment
Share on other sites

the lightgem only tells you how bright you are lighted.

 

That's not the way the lightgem works/worked classically. Otherwise there would have been no reason for it to get brighter when holding a weapon, or running, because neither of those things are going to suddenly cause more light to fall upon you.

 

The light gem basically was an indication of how noticable you were.

 

However, in this case, I'd agree that there's no real way for the lightgem to factor in silhouette. Whether or not your silhouette is visibile is determined by the location of the guard looking for you, meaning that it is based on the individual, not something that can be represented in general.

 

Bh

Link to comment
Share on other sites

I'm sure this has already been asked somewhere, but will the player cast shadows, as in TDS, and will there be some kind of body-awareness similar to TDS? I really liked the way that was done (except for that strange delay when you walked). It would also be very good (IMO) if the AI responded to the players shadow, although I don't know if that is possible to code.. I would rather look at my hands and feet to see how brightly they were lit rather than have a lightgem, not that I ever pay a great deal of attention to the lightgem in Thief anyway.

Link to comment
Share on other sites

Of course such factors (holding a wepaon, being near a wall) will also influence the lightgem. My major point though, was that it will NOT indicate how visible you are for a given AI.

 

I think I agree with you, but just to clarify, by "how visible", you are referring to the silhouette issue, yes? Because, otherwise, the lightgem should show how visible you are in general, which would also hold true for any given AI.

 

Bh

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

    • 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
    • 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
×
×
  • Create New...