Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Light  (Read 1720 times)

Kyselina

  • Bay Watcher
    • View Profile
Light
« on: August 24, 2007, 04:59:00 am »

Well, its pretty dark in the Mountain, then why not put some light in there? Lamps,torches,fireplaces....
Logged
Tun Athelbuket, farmer cancels sleep: Caged.

Deathworks

  • Bay Watcher
  • There be no fortress without its feline rulers!
    • View Profile
Re: Light
« Reply #1 on: August 24, 2007, 05:04:00 am »

Hi!

It seems that Toady One is planning this and more for the future:
http://www.bay12games.com/dwarves/dev_req_51-100.html

Req 96:

quote:
# Req96, LIGHTING, (Future): Should be pitch black inside adventure caves and on cloudy moonless nights. Vision state should influence what you can see. Can try to make sunlight shine inside caves a bit by casting light lines on map-gen. Can track light with RGB filters so that things through red gem windows look red, etc. Things seen through glass statues could be distorted from their proper positions. Once fire is in, can do torches and other such light sources. Might force dwarves to place fires or gem lamps passed the river. Before the river, light is assumed to come through windows/vents in the mountain. Alchemy could make extensive use of gems in this fashion, and the different colors of light can please certain nobles etc.

Deathworks

Logged

Kyselina

  • Bay Watcher
    • View Profile
Re: Light
« Reply #2 on: August 24, 2007, 06:46:00 am »

Didn't know about that he is planning light in mountain. Sorry.
Logged
Tun Athelbuket, farmer cancels sleep: Caged.

Asehujiko

  • Bay Watcher
    • View Profile
Re: Light
« Reply #3 on: August 24, 2007, 10:14:00 am »

Gems + Alchemist = Laser?

Screw the world flooder, get a deathstar instead.

Logged
Code: [Select]
Tremble, mortal, and despair! Doom has come to this world!
.....EEEE..E..E.E...EEE.EE.EE.EEE.EE..EE.EE.E.EE.EE.E.EE.
......E..EE.EE.EE.EE..E...EEEE..E..E.E...EEE.EEE...E.EEE.
.☺..EE.E...E.EE.EE...E.EE..E..EE.EE.EE.EE..E...EE.EE..E.E
.....E..E.E.E.E.E.EE.E.E.EE.E...E.EE.EE...E.EE.EE.EEE...E
....E.EE.EEE.EE..EE.EE.E..EEEE..E..E.E...EEE.EEE..E.E..EE

PTTG

  • Bay Watcher
    • View Profile
    • http://www.2funnyguys.com
Re: Light
« Reply #4 on: August 24, 2007, 10:55:00 am »

Boy, Raytracing stuff, as in tracing rays of light, is tough. That's what they use for Pixar movies and high-quality 3D renders in games. They aren't normaly used for 3D because you are lucky if you get 0.01 FPS. Though, of course, a simpler raytracer, in 2d (or 2.5d) would, while not necessarily speedy, could keep up with the game if it was run once every few frames. This colour tinting sounds neat- and  as for lazers, I could easily see dwarves harnessing bright sunlight to burn and blind the desidens of the darkness.
Logged
A HREF="http://www.2funnyguys.com">www.2funnyguys.com

,".,''.,,''..,'',.'',,.''
.'',G''(Im in ur fotrez)
''.,.,(steln ur babyz:0)

mickel

  • Bay Watcher
    • View Profile
Re: Light
« Reply #5 on: August 24, 2007, 10:56:00 am »

Maybe a laser as a siege engine? I imagine a big contraption with bronze dishes as mirrors, a crystal glass lense, and a ruby...
Logged
I>What happens in Nefekvucar stays in Nefekvucar.

Draco18s

  • Bay Watcher
    • View Profile
Re: Light
« Reply #6 on: August 24, 2007, 11:40:00 am »

quote:
Originally posted by PTTG:
<STRONG>Boy, Raytracing stuff, as in tracing rays of light, is tough. That's what they use for Pixar movies and high-quality 3D renders in games.</STRONG>

We're talking about five foot wide swathes of space where as long as there's "some" light the entire square is lit.
The glass statues I'd think would merely disrupt the positioning of the tiles behind it.


quote:
Originally posted by PTTG:
<STRONG>They aren't normaly used for 3D because you are lucky if you get 0.01 FPS.</STRONG>

*Cough* Significantly less.  If we're talking something that gets pre-rendered any raytraces cut the render speed in half.  Which starts at less than 1 FPS due to the textures and geometry and various lighting (more lights -> more time).
For something that's intended to be rendered in Real Time (tm), then ray tracing cuts the frame rate by a factor of at least 2, depending on the quality, speed of the hardware, number of lightsources (ussually only one is ray-traced at any one time), number of reflective surfaces, and how much geometry has moved since last frame.
Logged

mickel

  • Bay Watcher
    • View Profile
Re: Light
« Reply #7 on: August 24, 2007, 02:28:00 pm »

An ex boyfriend of mine wrote a fairly efficient raytracer for use in nongraphic MUDs. Don't ask, I don't know why either, it could be his medication...

Anyway, I'm completely out of my depth in this subject, but can't the raytracer be fairly simple? DF isn't a Pixar movie after all. (Personally I think it's a lot more entertaining.  :) )

There are already routines for calculating your line of sight in Adventure mode, the same routine could be used to cast rays for a light source, with the addition of light being diminished for every square. Things like a diffusion might be handled by the diffusing square subtracting a larger value from the light-ray or something. (So you could have open space diminishing light with 1 for every step, and then the diffusing square eats up 10 units instead. Or something like that.)

Or am I just being extremely ignorant?

Logged
I>What happens in Nefekvucar stays in Nefekvucar.