Author Topic: Shadows are a problem in trem  (Read 14624 times)

PROEM

  • Posts: 14
  • Turrets: +0/-0
Shadows are a problem in trem
« on: August 25, 2009, 02:35:52 am »
(I just want to make it clear that I have no idea how any of this could be written into the game, the technical limitations of trem's engine, how practical any of this is, etc. so just tell me if something isn't possible or isn't easy. Constructive criticism is welcome.)

The problem
Lighting in trem presents a problem. Dark areas are a very nice thing to have in a map as they really help the atmosphere. Unfortunately, the only way to see in these areas is to crank up the brightness, which does solve the visibility problem somewhat, but doesn't compensate for the loss of color in these dark areas - the walls will be badly desaturated. To see what I mean, just crank up the brightness and head in a really dark area in any map - the colors will be all wrong and the textures will often be unrecognizable. To add to the problem, lighter areas will appear bleached and less colorful as well. Aliens DO need to be able to see too, humans aren't the only ones that are going to be cranking up their brightness. If you're playing a dretch and you want to hide in some dark cranny way up in the ceiling of a room you'll probably have to do some wallwalking, and these areas tend to have a lot of pipes and little details that can make navigating in the dark difficult. Since I imagine just about everyone plays with their brightness cranked up using dark corners to become less visible is pretty much useless - as far as gameplay goes dark areas are irrelevant.

Possible solutions
a) Give the humans some kind of light source/nightvision for free, and the aliens some sort of adaptive nightvision as well, so both teams can see well in the dark while preserving the map's textures and/or color and atmosphere. Shadows remain irrelevant to gameplay.

b) Turn dark areas into a game mechanic by:
     a) Limiting the maximum gamma allowed by the client (Might not work, there are other ways to change brightness and
         some people might complain about the limit)

     b) Have aliens hiding shadows turn partially translucent to blend in better, but turn more opaque as more light is
         shined on them or as they're viewed with night vision and have nightvision/light sources cost the humans credits,
         while the aliens have it naturally, thus making light sources or nightvision equipment important for the humans to
         have, and making shadows good to hide in for aliens (probably a sounder way to do it).

Implementing in humans

Possible solutions for S1:
Honestly, I think it would be best to make light sources an S2 thing, but if it were included in S1 I think some kind of flashlight attachment for the weapons would be a good way to accomplish it since all the weapons are two-handed. The attachment would be a standalone upgrade and wouldn't technically be attached to any weapon, but would rather appear on whatever weapon you happen to have out, whether it's a blaster, a rifle, or a luci. The flashlight would be toggleable.

Possible solutions for S2:
Supposing light sources weren't available until S2, I think including a head mounted flashlight on the helmet would be an elegant way to do this. The attachment could be included with the helmet for no extra cost, or be optionally attached for a few extra credits. It would be toggleable as well.

Possible solutions for S3:
I think the battlesuit would be an excellent thing to include nightvision with. The nightvision could be in monochrome green like real life nightvision goggles, or something else entirely. Alternatively, some kind of wide range area lamp or mounted spotlight would be suitable (no pun intended). Like the S2 idea, these could either come with the suit for free or come separately at an additional cost, and would be fully toggleable.

Implementing in aliens
I think some kind of adaptive nightvision would be the best option for aliens. The brightness would increase or decrease depending on how bright the area the alien is in - if the alien went into a dark area, the surrounding lighter area would appear bright and bleached while the dark area would be well lit with the colors preserved, much as if it wasn't dark at all. Think of it as something similar to when you're outside in the sun for a while and your eyes have to adjust when you go inside, but when you go back outside it seems too bright, except the alien's eyes will adjust much faster.

Teh end
...Aaaand that's all I have :)

Archangel

  • Guest
no
« Reply #1 on: August 25, 2009, 02:59:24 am »
we've already done without flashlights for years, why now?

PROEM

  • Posts: 14
  • Turrets: +0/-0
Re: Shadows are a problem in trem
« Reply #2 on: August 25, 2009, 03:42:04 am »
we've already done without flashlights for years, why now?
Color. Right now it's a choice between preserving a map's color or being able to see in the dark, everyone is going to play with max brightness so they don't accidentally step on a dretch and get their head bitten off. But like I said, this tends to make the maps look ugly. And the opportunity to turn shadows into a game mechanic is intriguing, at least to me. It's not exactly a vital feature but currently it's a choice of curses, and I'd like to see some dark maps with this stuff implemented.

Archangel

  • Guest
Re: Shadows are a problem in trem
« Reply #3 on: August 25, 2009, 04:12:38 am »
i play with my gamma at 1.2. tremfusion puts it at 1.5 as default. 1.1 is 1.0. i've got absolutely no problem playing as having something sneak out of the dark is exciting.

PROEM

  • Posts: 14
  • Turrets: +0/-0
Re: Shadows are a problem in trem
« Reply #4 on: August 25, 2009, 04:22:47 am »
i play with my gamma at 1.2. tremfusion puts it at 1.5 as default. 1.1 is 1.0. i've got absolutely no problem playing as having something sneak out of the dark is exciting.
Well, good for you. You're at a disadvantage alot of players aren't willing to accept and will therefore have an edge over you, which is why they have their gamma up to begin with. You're missing the point. It'd be nice to be able to enjoy the full color of a map without being disadvantaged, or at the very least being disadvantaged in a way others don't share.

Archangel

  • Guest
Re: Shadows are a problem in trem
« Reply #5 on: August 25, 2009, 04:23:44 am »
it's a gameplay aspect. the flashlight would pretty much unbalance the humans->aliens balance worse than it already is.

PROEM

  • Posts: 14
  • Turrets: +0/-0
Re: Shadows are a problem in trem
« Reply #6 on: August 25, 2009, 04:29:35 am »
it's a gameplay aspect. the flashlight would pretty much unbalance the humans->aliens balance worse than it already is.
True. But that's not to say that there aren't ways to balance humans/aliens. Technical difficulties aside, it wouldn't work in the game as it is, but with some proper balancing in the human's favor it could work out.

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Re: Shadows are a problem in trem
« Reply #7 on: August 25, 2009, 05:14:05 am »
it's a gameplay aspect. the flashlight would pretty much unbalance the humans->aliens balance worse than it already is.
True. But that's not to say that there aren't ways to balance humans/aliens. Technical difficulties aside, it wouldn't work in the game as it is, but with some proper balancing in the human's favor it could work out.
you might as well say "technical difficulties aside, superluminal travel would be awesome". it's effectively impossible to turn into a gameplay mechanic because of varying hardware (with my monitor's brightness set very low, tremor is the only map that is dark with 1.0 gamma) and there are ways to make the image brighter without even considering modifying the source code.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

PROEM

  • Posts: 14
  • Turrets: +0/-0
Re: Shadows are a problem in trem
« Reply #8 on: August 25, 2009, 05:25:32 am »
it's a gameplay aspect. the flashlight would pretty much unbalance the humans->aliens balance worse than it already is.
True. But that's not to say that there aren't ways to balance humans/aliens. Technical difficulties aside, it wouldn't work in the game as it is, but with some proper balancing in the human's favor it could work out.
you might as well say "technical difficulties aside, superluminal travel would be awesome". it's effectively impossible to turn into a gameplay mechanic because of varying hardware (with my monitor's brightness set very low, tremor is the only map that is dark with 1.0 gamma) and there are ways to make the image brighter without even considering modifying the source code.
Man, you guys are just constant downers aren't you? I'm just following the Rule of Cool. Abiding that Law of Awesome. The Guidelines of General Pwnage. You know what I'm sayin'? 8)

I like the transparent idea because it doesn't really matter what your gamma is, and I think something of the sort has already been done in KoR with the basi. But, my main concern is the atmosphere in maps. In a nutshell, a proper way to see in the dark is what I'm going for. Games like trem are all about the shadows in the corner, the flickering flourescent lights, the dark and bold colors, it's essential to atmosphere.

RealPandemonium

  • Posts: 20
  • Turrets: +5/-3
Re: Shadows are a problem in trem
« Reply #9 on: August 29, 2009, 05:38:23 am »
The solution is to play gloom.  Trem sucks.  Gloom has flashlights and alien night-vision.  It also has a gamma cap that enforces darkness as a gameplay mechanic. 

Norfenstein

  • Posts: 628
  • Turrets: +81/-78
Re: Shadows are a problem in trem
« Reply #10 on: August 29, 2009, 03:18:30 pm »
The solution is to play gloom.  Trem sucks.  Gloom has flashlights and alien night-vision.  It also has a gamma cap that enforces darkness as a gameplay mechanic. 
Kev is right. When Timbo started Tremulous he made the decision to not be like Gloom in trying to use darkness as a gameplay mechanic because it can't be done fairly. It doesn't work in Gloom either -- the brightness caps are different for people on different hardware and the only way any fairness is enforced is by vigorous, human, moderation. You basically have to assume everyone can see you no matter how dark it is where you're hiding.

Bissig

  • Posts: 1309
  • Turrets: +103/-131
Re: Shadows are a problem in trem
« Reply #11 on: August 30, 2009, 12:41:29 am »
The solution is to play gloom.  Trem sucks.  Gloom has flashlights and alien night-vision.  It also has a gamma cap that enforces darkness as a gameplay mechanic. 

How do you enforce, not turning up the monitors brightness?

RealPandemonium

  • Posts: 20
  • Turrets: +5/-3
Re: Shadows are a problem in trem
« Reply #12 on: September 10, 2009, 05:35:51 am »
The solution is to play gloom.  Trem sucks.  Gloom has flashlights and alien night-vision.  It also has a gamma cap that enforces darkness as a gameplay mechanic. 
Kev is right. When Timbo started Tremulous he made the decision to not be like Gloom in trying to use darkness as a gameplay mechanic because it can't be done fairly. It doesn't work in Gloom either -- the brightness caps are different for people on different hardware and the only way any fairness is enforced is by vigorous, human, moderation. You basically have to assume everyone can see you no matter how dark it is where you're hiding.

Shh these kids need to play gloom!

Winnie the Pooh

  • Posts: 442
  • Turrets: +45/-85
Re: Shadows are a problem in trem
« Reply #13 on: September 10, 2009, 10:53:31 pm »
@PROEM: Concerning Archangel: When you get to the highest level of tremulous skill, there are no more challenges so you must create them yourself. I do it myself sometimes to challenge myself. Other times I turn it up because of a dark map or a skillful hider.

In any case, tremulous models aren't exactly affected by lighting conditions. You can see another player anywhere. I believe Tremfusion has some cvar to try and counter that, but most people aren't playing Tremfusion, they're playing the default client. With it's default cvars.

This whole topic is moot without doing it right. The way to do it with the best results is to use a completely new engine (once again, something that Amanieu is working on for Tremfusion.).
One that uses dynamic lighting and deluxemapping. Then, players will be dark in dark places like it should be. Then, dretches can go unnoticed in the shadows no matter what other player's brightness levels are. Then, flashlights will become a reality and mappers will employ strategy in their mapping.
Quote
I also realize that this is the internet, but even more so this is the forum for a video game on an internet, then even beyond that this is TREMULOUS forums the Satan version of all video game forums for a video game that is ON the internet.

RealPandemonium

  • Posts: 20
  • Turrets: +5/-3
Re: Shadows are a problem in trem
« Reply #14 on: September 15, 2009, 08:04:43 pm »
@PROEM: Concerning Archangel: When you get to the highest level of tremulous skill, there are no more challenges so you must create them yourself. I do it myself sometimes to challenge myself. Other times I turn it up because of a dark map or a skillful hider.

In any case, tremulous models aren't exactly affected by lighting conditions. You can see another player anywhere. I believe Tremfusion has some cvar to try and counter that, but most people aren't playing Tremfusion, they're playing the default client. With it's default cvars.

This whole topic is moot without doing it right. The way to do it with the best results is to use a completely new engine (once again, something that Amanieu is working on for Tremfusion.).
One that uses dynamic lighting and deluxemapping. Then, players will be dark in dark places like it should be. Then, dretches can go unnoticed in the shadows no matter what other player's brightness levels are. Then, flashlights will become a reality and mappers will employ strategy in their mapping.

Yes because you are the best in trem fo sho

Jedarus

  • Posts: 281
  • Turrets: +36/-10
Re: Shadows are a problem in trem
« Reply #15 on: September 15, 2009, 09:33:20 pm »
I hope Winnie's not serious. (your post made me chuckle)
Quote from: Creative1
Go get some gasoline and light your fucking pubes on fire

Winnie the Pooh

  • Posts: 442
  • Turrets: +45/-85
Re: Shadows are a problem in trem
« Reply #16 on: September 15, 2009, 10:14:57 pm »
The first part was a joke but the rest was all srslyness.
Quote
I also realize that this is the internet, but even more so this is the forum for a video game on an internet, then even beyond that this is TREMULOUS forums the Satan version of all video game forums for a video game that is ON the internet.

Arachnophobic

  • Posts: 3
  • Turrets: +0/-1
Re: Shadows are a problem in trem
« Reply #17 on: September 17, 2009, 02:24:23 am »
The thing about this is that basilisk already suck ass (while humans get a super OP shotgun with 1 kill, aliens get this slow, weak, fat alien spider thingy).  The only reason they are somewhat usable (and Scrap is the only person I've ever seen who is a good basilisk player, ad he uses his surroundings to his advantage.  Basilisks need to be unseen to function, and having a feature like this (unless if they made basilisk get a temporary invisibility function/make them have a camouflage), ruins them completely, might as well get rid of the poor alien. 

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Re: Shadows are a problem in trem
« Reply #18 on: September 17, 2009, 03:40:50 am »
The thing about this is that basilisk already suck ass (while humans get a super OP shotgun with 1 kill, aliens get this slow, weak, fat alien spider thingy).  The only reason they are somewhat usable (and Scrap is the only person I've ever seen who is a good basilisk player, ad he uses his surroundings to his advantage.  Basilisks need to be unseen to function, and having a feature like this (unless if they made basilisk get a temporary invisibility function/make them have a camouflage), ruins them completely, might as well get rid of the poor alien. 
you should check out how basilisks actually work in the upcoming 1.2 balance, they're just as overpowered (for their cost) as the shotgun.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

KillerWhale

  • Spam Killer
  • *
  • Posts: 469
  • Turrets: +63/-26
Re: Shadows are a problem in trem
« Reply #19 on: September 17, 2009, 04:12:36 am »
You also obviously have not played with many good people if Scrape is the only good basi you've ever seen.

*rants off about DarkWolf and Stasis and ER, losing all interest of the people*


Also, what you posted makes NO sense. Having shadows for basis to hide in would make them thousands of times more useful.

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Re: Shadows are a problem in trem
« Reply #20 on: September 17, 2009, 07:58:40 am »
This whole topic is moot without doing it right. The way to do it with the best results is to use a completely new engine (once again, something that Amanieu is working on for Tremfusion.).
One that uses dynamic lighting and deluxemapping. Then, players will be dark in dark places like it should be. Then, dretches can go unnoticed in the shadows no matter what other player's brightness levels are. Then, flashlights will become a reality and mappers will employ strategy in their mapping.
Trem already has dynamic lighting. Deluxemaps have nothing to do with darkening a player. It's the lightgrid's job to do that. The client, however, forces a minimum level of brightness so player models will never be too dark to see. This is a Quake III Arena thing and is used to help enforce a level of visibility so it's not too hard to see players. In my opinion the minimum should be removed because it has no benefit in Tremulous, besides making it harder for aliens to hide. I had made a patch to do this for ShinyTrem(r_minEntityLighting).

Winnie the Pooh

  • Posts: 442
  • Turrets: +45/-85
Re: Shadows are a problem in trem
« Reply #21 on: September 17, 2009, 10:24:10 pm »
Trem already has dynamic lighting? Then why is there so much controversy over this flashlight?

Shouldn't someone just make the flashlight if we already have dynamic lighting? Then we can test it out with balances and so on and so forth.

No, trem doesn't have the dynamic lighting I'm talking about. The lighting I'm talking about is where the flash of the gun muzzle reflects off of the deluxemap (which is what I was talking about) and illuminates other objects. Dynamic lighting where the light map changes.

It's obvious that I don't know technical facts but you get the idea.
Quote
I also realize that this is the internet, but even more so this is the forum for a video game on an internet, then even beyond that this is TREMULOUS forums the Satan version of all video game forums for a video game that is ON the internet.

Plague Bringer

  • Posts: 3815
  • Turrets: +147/-187
Re: Shadows are a problem in trem
« Reply #22 on: September 17, 2009, 10:59:26 pm »
More dynamic lighting for entities is possible, but the lightmap is compiled with the map and it's stuck the way it's compiled. It's an engine thing. This is a real pain for mappers, because, for example, an elevator shaft has to have the same lighting throughout, and doors can't start open if they are to start in an unlit area.
U R A Q T

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Re: Shadows are a problem in trem
« Reply #23 on: September 17, 2009, 11:26:03 pm »
Trem already has dynamic lighting? Then why is there so much controversy over this flashlight?

Shouldn't someone just make the flashlight if we already have dynamic lighting? Then we can test it out with balances and so on and so forth.

No, trem doesn't have the dynamic lighting I'm talking about. The lighting I'm talking about is where the flash of the gun muzzle reflects off of the deluxemap (which is what I was talking about) and illuminates other objects. Dynamic lighting where the light map changes.

It's obvious that I don't know technical facts but you get the idea.
you do know that deluxe maps are used for static lighting, right?
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

gimhael

  • Posts: 546
  • Turrets: +70/-16
Re: Shadows are a problem in trem
« Reply #24 on: September 18, 2009, 09:29:17 am »
Trem already has dynamic lighting? Then why is there so much controversy over this flashlight?

Shouldn't someone just make the flashlight if we already have dynamic lighting? Then we can test it out with balances and so on and so forth.

No, trem doesn't have the dynamic lighting I'm talking about. The lighting I'm talking about is where the flash of the gun muzzle reflects off of the deluxemap (which is what I was talking about) and illuminates other objects. Dynamic lighting where the light map changes.

It's obvious that I don't know technical facts but you get the idea.

The Quake 3 Engine was written for the hardware of 1999, so it uses no programmable shaders, only the fixed OpenGL pipeline. The fixed pipeline supported only very crappy lighting, and has been almost completely deprecated in OpenGL 3, because everybody was writing his own lighting anyway since OpenGL 2 and GLSL became available.

Quake 3 had to simulate ligthing with some clever texture mapping tricks, but this also meant that the result was limited in several ways:
  • static lighting is precomputed and stored in lightmaps. The lighting model can be very complex including indirect lighting, shadows etc. but the resolution of the lightmap is limited
  • the influence of dynamic lights on a surface is only computed on the vertexes (the corners of the triangles) and interpolated accross the triangle surface - this makes sharp changes in lighting like specular reflections impossible
  • also dynamic light influence is based only on distance and ignores the angle, which is physically incorrect. This goes so far that the dynamic lights illuminate even surfaces facing away from the light source. This also means that every dynamic light is a point light which illuminates in all directions.
  • there are no shadows for dynamic lights
  • the dynamic lighting is a post-processing step, i.e. first each triangle is rendered with static lighting only and then dynamic lights are painted over it. The problem with this approach is that it cannot compute the correct formula output_color = texture_color * (static_light + dynamic_light), but it computes output_color = (texture_color * static_light) * (1 + dynamic_light), so if the static_light is 0, the area will stay black no matter how many dynamic lights you add.

All of this can be changed, but you would have to essentially completely rewrite the renderer with a OpenGL 2 or OpenGL 3 backend.

Also the indirect illumination that you are talking about (light reflecting off a wall and illuminating other objects) doesn't exist in any game yet. The best I've seen is this video (warning: 42 MB MP4 video), which is rendered on an 8-core CPU with a GTX 280 GPU. Note that this is only a graphics demo, not a game engine - so realistically this may be available in mainstream games in a few years.

janev

  • Spam Killer
  • *
  • Posts: 534
  • Turrets: +130/-26
Re: Shadows are a problem in trem
« Reply #25 on: September 18, 2009, 07:53:26 pm »
@PROEM: Concerning Archangel: When you get to the highest level of tremulous skill, there are no more challenges so you must create them yourself. I do it myself sometimes to challenge myself. Other times I turn it up because of a dark map or a skillful hider.
If there is no skill in a game i just unbind the forwards key and do the maps backwards... It also makes for a fun challenge.

As for the OP's problem make a "flashlight" bind
Bind something for high brightness and low brightness. That way you do not have to play lighter areas with shit brightness.
Author of "The quick beginner's guide to playing tremulous"
Founding member of the "undefeated in clanwars since 2006" club and narcissist extraordinaire.


"Your quote-tower trolling reminds me of two dogs fighting over a piece of poo." [c] Ingar

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Re: Shadows are a problem in trem
« Reply #26 on: September 19, 2009, 04:53:07 am »
Also the indirect illumination that you are talking about (light reflecting off a wall and illuminating other objects) doesn't exist in any game yet. The best I've seen is this video (warning: 42 MB MP4 video), which is rendered on an 8-core CPU with a GTX 280 GPU. Note that this is only a graphics demo, not a game engine - so realistically this may be available in mainstream games in a few years.
Hah, it was nice to see Nexus6 lit like that.

MitSugna

  • Guest
Re: Shadows are a problem in trem
« Reply #27 on: September 23, 2009, 07:37:54 pm »
you do know that deluxe maps are used for static lighting, right?
static lights*

Stannum

  • Posts: 336
  • Turrets: +108/-321
Re: Shadows are a problem in trem
« Reply #28 on: October 02, 2009, 04:02:18 pm »
Also the indirect illumination that you are talking about (light reflecting off a wall and illuminating other objects) doesn't exist in any game yet. The best I've seen is this video (warning: 42 MB MP4 video), which is rendered on an 8-core CPU with a GTX 280 GPU. Note that this is only a graphics demo, not a game engine - so realistically this may be available in mainstream games in a few years.

You can do this with deferred lighting. Not many engines have implemented this yet but its doable.

Oh my. A Natural Selection model in a Tremulous map... /o\
« Last Edit: October 02, 2009, 04:10:18 pm by Stannum »
Blue © 2004 Natural Selection.

DeadMeat

  • Posts: 61
  • Turrets: +3/-0
Re: Shadows are a problem in trem
« Reply #29 on: December 06, 2009, 12:36:15 pm »

You can do this with deferred lighting. Not many engines have implemented this yet but its doable.

Oh my. A Natural Selection model in a Tremulous map... /o\

omg, thats a fail  :D anyway stalker has some similar lighting