all in a day

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

all in a day

Post by r00k »

I was just pondering a way to mimic a solar day.

argfhh

Code: Select all

lightstyle
but im thinking more directional like for shadows in DP/FTE.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: all in a day

Post by Spike »

sunlight is actually kinda awkward really. at least shadowmapped ones. logically the light needs to be an infiniteish distance away, with infinite radius. of course, computers don't do infinite, which results in some really nasty precision issues if you try doing sunlight with some generic rtlight.
the solution, then, is to constrain the near+far planes of your light to either contain the frustum (or part of it if you're using some weird multi-shadowmap approach), or it need to contain the entire map (nearest point to furthest). but in doing so, you ensure that only one shadow axis needs rendering instead of 6.
neither fte nor dp actually support such special-case lights.
a dynamic light can be added using ef_fulldynamic/pflags stuff (api derived from tenebrae). this will allow you to move an rtlight dynamically. you can also change the intensity with it too. expect problems with lights needing to be nearer than the sky.

if you want it to work in any engine, you can just use lightstyle creatively to change lighting over time. By using separate morning/evening lights that are changing indepndantly, it should be vaugely possible to at least partly hide the fact that its not actually moving. You'll also need a light util that can cope with multiple suns with independant lightstyles.
Cobalt
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA
Contact:

Re: all in a day

Post by Cobalt »

Thats a good idea. I was wondering the same thing late last night. The ID maps that are completely underground, like DM1 for example, the light more or less ought to be depending on the wall torches. I mean it ought to be REALLY dark on those maps. There are other maps like E2M7 where a segment is outdoors, and most of the rest is underground. Why not "bake" sunlight into the skyboxes, and let them do the lighting for the outdoors stuff? One issue I see would be establishing the 'orbit' of the light ent(s) representing the SUN or for base style outerworld maps, the moons or other interstallar bodies the map designers would comeup with.

Heres something I did as an experiment one day with a sprite that was like a corona and the normal light globe which was nodepthtest and scaled using DP:

Image

Another thought, if you take a map like EFDM12 by Electric fish, its a base map where you can step outside into space. How could you alter the gravity so it becomes a space walk? Would maybe a BIG trigger field encompassing the area covering the space area and some clever QC d it?


[quote="Spike"
if you want it to work in any engine, you can just use lightstyle creatively to change lighting over time. By using separate morning/evening lights that are changing indepndantly, it should be vaugely possible to at least partly hide the fact that its not actually moving. You'll also need a light util that can cope with multiple suns with independant lightstyles.[/quote]
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Re: all in a day

Post by frag.machine »

Cobalt wrote:Another thought, if you take a map like EFDM12 by Electric fish, its a base map where you can step outside into space. How could you alter the gravity so it becomes a space walk? Would maybe a BIG trigger field encompassing the area covering the space area and some clever QC d it?
Hipnotic does this using the .gravity field (available since Quake 1.08). With some custom QC you can have triggers at the hatch changing .gravity of any other entity that touches the trigger.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Cobalt
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA
Contact:

Re: all in a day

Post by Cobalt »

Oh wow, never knew that. The extras mod uses .gravity but had no clue it was more or less a built in function.
frag.machine wrote:
Cobalt wrote:Another thought, if you take a map like EFDM12 by Electric fish, its a base map where you can step outside into space. How could you alter the gravity so it becomes a space walk? Would maybe a BIG trigger field encompassing the area covering the space area and some clever QC d it?
Hipnotic does this using the .gravity field (available since Quake 1.08). With some custom QC you can have triggers at the hatch changing .gravity of any other entity that touches the trigger.
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: all in a day

Post by toneddu2000 »

Dunno if it can helps. Made by BloodOmnicide team in DP. I guess it's all quakec and GLSL. But I might be wrong (it happens all the time! :D )
Meadow Fun!! - my first commercial game, made with FTEQW game engine
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: all in a day

Post by Baker »

That video is awesome.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: all in a day

Post by toneddu2000 »

yep, unfortunately Old source code is not on icculus repo anymore... :(
Meadow Fun!! - my first commercial game, made with FTEQW game engine
Spirit
Posts: 1065
Joined: Sat Nov 20, 2004 9:00 pm
Contact:

Re: all in a day

Post by Spirit »

What a gorgeous log: http://omnicide.legacy-of-kain.ru/en/dev/svnlog.html

They have a detailed wiki at http://omnicide.legacy-of-kain.ru/w/index.php/Main_Page and seem active, why not ask them? Also you can get old revisions out of SVN, have you tried that?
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
gnounc
Posts: 428
Joined: Mon Apr 06, 2009 6:26 am

Re: all in a day

Post by gnounc »

baaaaaaagh, dont remind me of omnicide. im highly anticipating that game.

Also, Cobalt, fte has a gravity direction field, so you can fall up. or to the right.
Another quick mockup mod i want to do is a deadspace-like mod

Sooo many things to get to, dhl needs to hurry up with my graphics card
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: all in a day

Post by r00k »

toneddu2000 wrote:Dunno if it can helps. Made by BloodOmnicide team in DP. I guess it's all quakec and GLSL. But I might be wrong (it happens all the time! :D )
that's exactly like i was looking for.
Post Reply