Lighting without lights!!!!! Dark corners...

Started by
17 comments, last by HellRaiZer 20 years, 10 months ago
Hey all... First of all let me clear that i haven''t played with shadow algorithms in the past. I know what they do (shadow volumes and shadow maps), i know the basics on how to use them, but i haven''t implemented any of them, so i can''t be sure what exactly they can do!!! All my knowledge on lighting and shadows include static lightmaps and radiosity. Ok, here the question. I was thinking how can i hide a monster (alive-dynamic object) in a dark corner. Imagine a dark room (completely dark), which includes a dynamic-movable object in it. How can i darken the object, so it can be hidden in the shadows. I mean, in a dark room there are no lights from where i can cast shadows, or something. And i think casting dynamic shadows from walls (via stencil shadow volumes, etc.) its not an option, because this will make the system crowl!!!! And lets say that i have a system that can recognise how dark a room is and it can draw model''s polygons applying to them a constant dark color, if the object is in this room. But then what about spots, where light fades to dark (!!!!)? That''s just a thought. Nothing to implement, so any answer acceptable. This is theoritical question!!!! HellRaiZer
HellRaiZer
Advertisement
by precomputing shadow volume brushes which is very effective but very complex too a simpler method would be checking whether one of the corners of the boundingbox is lightened
otherwise it is hidden
http://www.8ung.at/basiror/theironcross.html
quote:Original post by HellRaiZer
I was thinking how can i hide a monster (alive-dynamic object) in a dark corner. Imagine a dark room (completely dark), ...


Ummm, if the room is completely dark then you can''t see anything anyway.

You can light the monster with a spot or point light that falls off near the corners of the room.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
This is the question. By default the monster will a colorfull texture, not just black. In a dark room, where darkness has been calculated with, lets say, radiosity, how can i paint my monsters texture (run-time) and make it black. If i don''t paint it, i''ll a floating monster in the middle of nowhere (in case we have a completely dark room)!!!!!! How can i recognise that my monster is in a dark area, so i paint it with some way (which way???) black???

Thanks for the replies. I repeat this is just a theoritical question. No thoughts on implementation yet!!!

HellRaiZer
HellRaiZer
glColor3f( 0, 0, 0 );

DrawMonster();

There you have one very dark, very hiden, very scary monster.

RRRRRRRRRRAAAAAAAAAAAAAAAAAAAAA!
You could setup some sorts if "inverse lights". That is, a node that darkens nearby objects. The closer a monster is to that node, the darker it becomes.

Then all you need is to place those by hand around your level, in the shadowed areas.

Not as nice as actual shadow projection, but it can be pretyt fast if done properly.
I think HellRaiZer means something like what we see in Quake. Entities are renedered using flat(gouraud?) shading while static architectures use shadowmaps. Even if they use different ways (one precomputed, the other real-time) if a monster hides in a very dark corner it cannot be seen, since it appears black as the background. The question is, how to draw an entity simulating the amount of light of the enviroment surrounding it?
cignox1 i think you said it the right way. This is the question actually.

The question is, how to draw an entity simulating the amount of light of the enviroment surrounding it?

And thanks for the gourand shading tip!!!

HellRaiZer
HellRaiZer
Quake engines use a ''lightgrid'' which is a 3d grid of colour values holding light intensity at every point. They''re spaced at about a foot apart usually, and each model/player is lit by interpolating the vertex colours by the nearest grid values.
In older Quake engines, each entity is lit based on the light value directly underneath its origin (trace a ray downward until it hits something, use the lightmap from that surface). The models are always shaded as if the light was above and slightly offset to one side, which looks a bit fakey nowadays.

Thief engine uses a raycast from the nearest N light entities to the center of the model. Since you can use the same equations for light attenuation as you use for generating your lightmaps, this can look pretty good. Even better, if you trace to the corners of the bounding box and use a gradient you can have things partially shadowed. You can also use the same light entities for directional lighting (gouraud shading etc).

Quake3 uses a global light grid where light value is calculated and stored at points roughly 64 units (height of a character) apart. It''s faster than the ray trace model but doesn''t account for direction of the light and isn''t very accurate. It also uses a lot of memory.

This topic is closed to new replies.

Advertisement