Page 1 of 1

all in a day

Posted: Thu Oct 30, 2014 4:37 am
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.

Re: all in a day

Posted: Thu Oct 30, 2014 9:57 am
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.

Re: all in a day

Posted: Fri Oct 31, 2014 5:15 pm
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]

Re: all in a day

Posted: Fri Oct 31, 2014 7:58 pm
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.

Re: all in a day

Posted: Sun Nov 02, 2014 4:16 pm
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.

Re: all in a day

Posted: Sun Nov 02, 2014 4:37 pm
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 )

Re: all in a day

Posted: Sun Nov 02, 2014 10:52 pm
by Baker
That video is awesome.

Re: all in a day

Posted: Sun Nov 02, 2014 11:38 pm
by toneddu2000
yep, unfortunately Old source code is not on icculus repo anymore... :(

Re: all in a day

Posted: Mon Nov 03, 2014 11:27 am
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?

Re: all in a day

Posted: Mon Nov 03, 2014 3:47 pm
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

Re: all in a day

Posted: Mon Nov 03, 2014 6:58 pm
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.