Jump to content
The Dark Mod Forums

Bounce lights and the light gem:


Bikerdude

Recommended Posts

Thanks, that will be useful.

 

Although I think a constant falloff is the better solution. It makes sense that the light makes you more visible, it just should be in proportion with what you see in its surroundings.

Link to comment
Share on other sites

  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

There is a plan to add cubemap projected lights with spherical falloff in an upcoming release so that will make the falloff behavior more predictable.

That said, the current "LightFalloffImage" method is pretty flexible. You can make the falloff pattern go bright to dim to bright again to dim again by

making that pattern in the texture... I think you can even invert the falloff pattern which would be ideal in your use case.

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 wouldn't look as good without the specular portion. And we already use zone ambient.

 

The whole issue is not THAT important though. It's fine in most cases and you can get by without it. But where we use it, it looks damn good.

 

Zone ambient and ambient bounce lights are two different things. Zone ambient applies a uniform illumination to all surfaces in the zone. Ambient bounce lights only apply illumination to the surfaces w/in their light volume. So that's not a reason not to apply the ambient texture.

 

The relevant reason for not relying on the ambient texture of the bounce light is the lack of specular. So if that's important, then an ambient texture isn't the solution for you.

Link to comment
Share on other sites

Are falloff images relevant to the LG illumination calculation?

 

When I worked with the "can an AI see this?" code, I found that the falloff images weren't available to the illumination calculations, so they couldn't be used. The simpler linear falloff method is used instead.

Link to comment
Share on other sites

I am aware of everything you mention in the first post, but thanks.

 

I don't know very much about the lightgem. Isn't that just rendered and lit like everything else but in a separate pass? I guess I'll have to try and put a constant falloff image on a light and see what it does.

Edited by Baal
Link to comment
Share on other sites

Are falloff images relevant to the LG illumination calculation?

 

When I worked with the "can an AI see this?" code, I found that the falloff images weren't available to the illumination calculations, so they couldn't be used. The simpler linear falloff method is used instead.

Yes, falloff works for the lightgem because its brightness is "calculated" by the renderer. It draws a white shape where the player is, using all light and shadow just like when drawing the main screen view, then captures an image of the shape and samples it to see how bright it ends up.

Link to comment
Share on other sites

Hmmm, Im not sure I got what a "bouncelight" is either, but if im undertanding correctly, what I did in my map to simulate bounced lights was to set up a very low value projected light illuminating the shadowed surface, from the opposite direction and on a safe distance. So if you are walking inside the shadow area, the spot light wouldnt affect you much. And yes, if you walk right next to the source of it, it should light you up pretty well, but you can avoid that by simply putting the light source in an already well lit area, or above the player, facing downwards.

 

This would probably mean redoing many light setups inside the map though, so maybe an example for the future.

Link to comment
Share on other sites

Whats the realistic time frame for this, I ask because would it require a new main .exe or could it be scripted..? so I could add it to an existing map.

 

There's no way I can see to script it unfortunately. I'll do it in the next day or two, but it'll be a 2.04 thing.

Link to comment
Share on other sites

  • 4 weeks later...

I added a "lightgem" spawnarg for lights that defaults to 1 a couple of days after the above posts. grayman has raised a point that's worth debating though: should this spawnarg also affect the visibility (to AI) of other things like ropes and bodies? At the moment it just causes the light to be ignored when calculating the player's lightgem. If you're using it in a map though, would you expect or want it to affect AI sight in general, not just the player/lightgem?

Link to comment
Share on other sites

Making these bounce lights affect AI visibility would seriously limit the use case here as it would make bodies (etc)

just as "unnaturally bright" as the player.

 

If we had an arg to invert the falloff so that the light_center was darkest and the volume boundary was brightest

then we wouldn't need to exclude these lights because they would act like real bounces.

 

As a simple workaround option, neither player vis nor AI vis should include these lights.

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

If we had an arg to invert the falloff so that the light_center was darkest and the volume boundary was brightest

then we wouldn't need to exclude these lights because they would act like real bounces.

Wouldn't that give the lights hard square corners?

 

As a simple workaround option, neither player vis nor AI vis should include these lights.

Thanks, that's +1 in favour of their not affecting AI vision at all (as opposed to their ignoring only the lightgem).

 

Perhaps rename the spawnarg something more generic like "ai_see" instead, still showing up in the editor and defaulting to 1.

Link to comment
Share on other sites

 


 

Wouldn't that give the lights hard square corners?

 

 

It would if your light volume did not extend past the wall of the room (etc) but since we are targeting walls with this type of

light, this scenario would be rare. Of course you could also modulate it a bit with a custom projection image.

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

Should these lights also not contribute to the "ambient light" with the ambient zoning system? E.g. must the script code be updated to ignore such lights?

"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

You could include them in ambient zone calculations but I presume you'd want to reduce their statistical weight or influence there.

To some degree, these act as an alternate ambient model so I guess it depends on the mapper preference.... FM authors?

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

What I meant was that the code currently calculating the dynamic ambient light does NOT exclude these lights and if they are fairly close to the player, they probably increase the ambient quite a bit.

 

The same problem exists with fog lights, ambient lights (which are usually huge, so they are weighted unfairly, too) and the player lantern.

 

Basically, every light that is either huge, or very close to the player.

 

These should all be ignored in this calculation. And I think any light with "ai_see" "0" should be, too. Otherwise these lights are ignored by AI, but they raise the dynamic ambient, which then makes the AI see better... :ph34r:

"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

  • 6 years later...

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

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 2 replies
    • 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.
      · 7 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
×
×
  • Create New...