( search forums )
lighting engine
Soldat Forums - Soldat Talk - Game Improvements / Suggestions
bucky_brad
May 30, 2004, 12:53 pm
Was just wondering if it was possible to implemet a lighing engine in soldat?

Aquarius
May 30, 2004, 1:22 pm
Lighting / dynamic lighting would be cool, but I'm afraid it is to hard to program...

And it would run much slower...

Dathker
May 30, 2004, 3:22 pm
not only is it hard to program.. wtf is it suppose to do?
its not like we have lighting inthe first place...

Endo
May 30, 2004, 4:01 pm
ok i suggested this long ago... But it's possible to have a false lighting engine...

You could make certain polygons change your screens filter when you stepped on them... so say your in a dark building... when you walk to the polygon by the window you would see some light shine in.... hmmmm this isn't coming out right... It's hard to explain....

I need more time to gather my thoughts....[:P]

BMF
May 30, 2004, 4:34 pm
Yeah like light from explosions, and from rockets and stuff. Would be nice =)

Again, many other things to fix besides fancy graphics.

BlackSpear
May 30, 2004, 4:43 pm
and some lamps and light giving objects in some maps where people can see you better then when you're outside of the light, this will also make dark places where you are hard to see possible, but light giving objects should NOT at all be implated in every map, just in some maps like the icy ground in snowman ect...

zephyr
May 30, 2004, 5:23 pm
quote:Originally posted by BlackSpear
and some lamps and light giving objects in some maps where people can see you better then when you're outside of the light, this will also make dark places where you are hard to see possible, but light giving objects should NOT at all be implated in every map, just in some maps like the icy ground in snowman ect...


God we have some Splinter Cell junkie in here!Anyway, sure it's a good idea, but adding a lightning engine would surely be a lot of time (We are talking about a cool Engine, that is)and would probably raise more than a bit the System Requirements (Not everyone run a amd 2.0+)

b00stA
May 30, 2004, 6:11 pm
[IMAGE]
[IMAGE]
[IMAGE]

blah, the angles are totally wrong
should definately be an option, because it's likely to use lots of CPU and it can be pretty distracting too.

Deleted User
May 30, 2004, 6:15 pm
*looks at b00stas pictures*

...so this is what its like to be in love...

Chakra
May 30, 2004, 7:51 pm
very pretty. I like lots.

BlackSpear
May 31, 2004, 2:14 pm
quote:Originally posted by zephyr
God we have some Splinter Cell junkie in here!Anyway, sure it's a good idea, but adding a lightning engine would surely be a lot of time (We are talking about a cool Engine, that is)and would probably raise more than a bit the System Requirements (Not everyone run a amd 2.0+)

nah I was a Thief junkie :P splintercell doesn't run on my pc couse I have a AMD 800 hehe so I don't think you won't need a 2.0+ for that else I wasn't in for it :P
but it should be an option couse it will raise the system req. but that would also mean that there are some people who have the advantage in some maps with dark effects...

bucky_brad
May 31, 2004, 2:33 pm
omg, that looks so good o_O

DeMonIc
May 31, 2004, 6:22 pm
Wow, real cool pics :D If THAT would be in soldat, it would definetly make a difference.At least it would make some advantage for darker clothes in darker stages.

Dathker
June 1, 2004, 3:04 am
its... to complex... to many shaddows that it would create...

Fangus Deef
June 1, 2004, 4:00 am
yea, like it's have to factor in the soldats, who are made up of so many different images. and what about scenery? it'd look a bit funky at times.
How'Bout:
in the mapmaker, you can create light and dark angles using a special polygon. you can set it to be lighter or darker(not just blacker and whiter), level of shading and possibly color. this way they dont overlap like when using scenery.
maybe(i have no clue) they dark areas can be programmed to go to neutral lighitng with an explosion, with a different diamter for different darknesses.
ill try to get some pics(not as good as b00sta's, i only got MS-Paint)

Kazuki
June 1, 2004, 5:06 am
This all seems like a very nice idea, but wouldn't it take ages to code? It would have to recognize polygons and make them into shadows. Also, it would have to fade and stuff like that. I'm not a real expert, but this does seem a bit complicated to me.

Edit: Nice use of Photoshop, Boosta.

blackdevil0742
June 1, 2004, 11:08 am
I like your pics b00stA they are nice

b00stA
June 1, 2004, 11:40 am
arr thanks, I used PhotoImpact XL

it would be pretty slow I guess.. we have an explosion, so we'll just use one single point for the light source (not a circle). Now create a big circle around it and make a "radial fill/blur" or whatever it's called, but only "above the background" and behind the polygons. The shadow of a soldier should be simplified, just consider the Soldier as a simple square :)
The hard part is calculating where the light can't go as Kazuki said. So maybe this isn't really possible without using lots of CPU power.
Maybe torches / fixed light sources are possible? Soldat would have to calculate the angles only once (when the map maker compiles the map or every time the map loads), so it wouldn't need that much CPU after all.

bucky_brad
June 1, 2004, 4:19 pm
seeing as you modds have the most contact with michal, is there any chance you could ask him about the possiblity of this being implemented?

Kazuki
June 1, 2004, 10:23 pm
Bucky Brad does have a point. I guess Michal would have the most information on how this COULD be done, and the most information on if he will do it or not. >_>

Shyo
June 2, 2004, 12:53 am
well.. what If you have like 5 nades exploded at once? yes, FPS loss.. because soldat would have to calculate the lights for all 5 nade explosions..would be usable as a blend nade also =/

but I like teh idea.. really cool!

btw. if you'd turn it off you'd have an advantage over peoples who have turned it on =/

Element_101
June 2, 2004, 1:07 am
You have to remember one of soldats big advantages is its low system requirments, if you take this away a lot of people will leave.

b00stA
June 2, 2004, 1:06 pm
Element, I already play without anti-aliasing, smooth polygon edges, weather effects, bullet trails, BUT I still think that feature would rock.

bucky_brad
June 2, 2004, 1:47 pm
how old is your PC b00stA?

b00stA
June 2, 2004, 1:58 pm
PIII 450mhz, 384MB RAM, GeForce 2 Ti
runs fine with all options turned on, but as soon as I play with some more users/bots.. CPUlag++

I'll upgrade soon >_>

Kazuki
June 2, 2004, 3:20 pm
Jeez, Boosta, I mean my computer isn't any pony ride either, but wow... <_< You need to get your computer some digital peptobismol.

Aquarius
June 2, 2004, 4:13 pm
I have P500/160MB RAM and all programs I need for work/entertainment runs jus fine. I don't play the newest games but I don't cry...

It's a madness with all the upgrades. W98 runs smoothly on P133 with 32 MB RAM. Try to run WinXP on such configuration... I won't spend my money for something I don't need. Of course software/hardware producers try to convince people that PIV 3 GHz + 1 GB RAM + the newest video card is necessery to work faster and more efficient and to have more fun with "better" games, but it's a bullsh!t. I work fast and I have great fun with programs and games which I can run on my P500.

Here is a phrase which I found on some site:

"It took the power of a C-64 to fly to the moon. Today it takes a Pentium III 600 Mhz to run Windows 2000. Something went wrong."

I think the guy who wrote it is really a wise man.
Efficiency is not in the power of CPU, but in your brain. Just learn how to use it... efficient.

DeMonIc
June 2, 2004, 4:48 pm
That's the best smart sentance which I've seen since a looong time...
The sad is it's too true.There are some gossips about the programs today are makeable 2 run even on a 486, but money talks, dog barks.
On topic:(But related to my reply so far)
I think if it would be possible 2 make the lighting engine to run on weaker machines, like myne (400MHZ,192RAM, voodoo 2), then Soldat would be more unique than it is.(if THAT's possible XD)

Alamo
June 2, 2004, 5:00 pm
weeeeee eye candy! me wants teh candy! me loves candy! :)
no, really... nice idea, nice pics.... that would rock (but that will be hard to program...

b00stA
June 2, 2004, 5:27 pm
Aquarius, I totally agree.
..just imagine all those hardcore overclockers with extremely fast CPUs, yet they can't protect their system from viruses.. and they don't even know what the hell to do with it except playing games.

errr, back on topic.
The "fixed" light sources could be done even for slower computers because the only real effort it takes is.. displaying it, not calculating angles.

DeMonIc
June 2, 2004, 5:30 pm
So if its possible, we only need 2 decide should it be told to Michal for implemention :D
I vote YES

BlackSpear
June 3, 2004, 1:46 pm
hell yeah that it would be cool if it was in soldat, but the nade lights should DEFENATLY be turned off if you want to!!! couse like boosta already said, that takes the most cpu and WILL give problems if there are 2 people trowing nades for thier lifes, even wondering if it will run smoothly on my own 800mhz system at all times.
and with the nade lights turned off there aren't any advantages, just a bit less distraction, but if you turn the weather effects off you'll have a bigger advantage then with the nade light turned off and no-one has any problems with that...

sanity
July 1, 2004, 3:48 pm
we really need this!.. i think it would bring soldat to a whole new level. also shadows for each soldat would be cool. i dont really see how this could be too complicated, theres alot of 3d games with complex lighting (wouldnt 2d would be easier?). as for higher system requirements, there could just be an option to disable it.

i know this is an old topic but i just saw it then and think it needs more attention [:P].

bucky_brad
July 1, 2004, 4:41 pm
uh... sanity, 3d games have more than one person working on them... alot more than one person. It is a good idea (my idea) but i think that it is probley to hard to code.

sanity
July 1, 2004, 5:20 pm
uhh.. bucky, sorry to break it to you but ive seen a few freeware 3d games (made by one person doing lighting) that has light-sourcing (and on 2d it would be even easier). sure its not something we need right away, im just sayin it would look great if it was implemented. anyway you suggested it but now you say its too hard to code... make up your [:-censored]ing mind.

Dragon88
July 1, 2004, 7:52 pm
I like this idea.

I really don't think it would use as much CPU as you guys are making out anyways... And if it's an option, why does it matter? The low-end dudes could turn it off. If everyone wrote their games for low-end hardware, we'd still be playing Doom (heck, we'd be pwning at galaga)

IMHO, it should be done.

Aquarius
July 2, 2004, 6:00 am
I still play Doom sometimes.

peemonkey
July 2, 2004, 6:15 am
i play pacman more than i play soldat XD

sanity
July 2, 2004, 6:44 am
even Doom has a lighting engine. [:P]

bucky_brad
July 2, 2004, 5:02 pm
sanity you got any links to them freeware fps? i dont really think i would be to hard to code just to time consuming. if this is ever put in soldat it should be a much later version once most of the bugs are fixed.

kilroy1501
July 2, 2004, 8:09 pm
What if the explosion just created a trasparent light object that fades out?

The farther from the center the more transarent...

It wouldnt be hard to code

b00stA
July 2, 2004, 8:51 pm
That wouldn't look very good and it would probably be more irritating than just "nice".

kilroy1501
July 2, 2004, 11:47 pm
to get the angles thing you could have an object that move from the center and get more tranparent the longer it lives

the explosion could create 360 of these and each could move in a different dirrection

kilroy1501
July 3, 2004, 2:10 am
screw that itd never work

BlackSpear
July 3, 2004, 12:28 pm
quote:Originally posted by kilroy1501
screw that itd never work

it CAN be implanted FOR SURE, but if michal can find the time for it is a second thing...

sanity
July 3, 2004, 4:23 pm
quote:Originally posted by bucky_brad
sanity you got any links to them freeware fps?


try [URL] or similar?
i know these are mostly more then one person and so it would prolly be harder for just michal.. but its still possible.

kilroy1501
July 3, 2004, 9:33 pm
quote:Originally posted by BlackSpear
quote:Originally posted by kilroy1501
screw that itd never work

it CAN be implanted FOR SURE, but if michal can find the time for it is a second thing...


i was talking about my idea of all the tiny objects...
itd take hours to load and just plain sucks

bucky_brad
July 4, 2004, 2:01 pm
thanks sanity, you got any you would recomend?

BlackSpear
July 4, 2004, 2:27 pm
quote:Originally posted by kilroy1501
quote:Originally posted by BlackSpear
it CAN be implanted FOR SURE, but if michal can find the time for it is a second thing...


i was talking about my idea of all the tiny objects...
itd take hours to load and just plain sucks

sorry didn't know that :P

BManx2000
July 4, 2004, 3:17 pm
Maybe instead of making the glow, it could light up the vertices of the nearest polys.

sanity
July 4, 2004, 4:03 pm
quote:Originally posted by bucky_brad
thanks sanity, you got any you would recomend?


i like egoboo: [URL] buts theres heaps of other good ones.

BManx2000
July 4, 2004, 4:59 pm
Cube is also an open source FPS.

Endo
July 4, 2004, 11:24 pm
This would pwnz... And I don't understand why it wasn't in the origanal planning stages... That.. and fecking doors... but I think people would take soldat as a more serious game if it had more innovative features... such as... light... and doors.... [xx(]

Alamo
July 5, 2004, 12:11 am
quote:Originally posted by BManx2000
Maybe instead of making the glow, it could light up the vertices of the nearest polys.


If you lit up whole polys it would look very odd on well shaded maps because you would have very hard color changes b/c of that.

Michal Marcinkowski
July 5, 2004, 12:43 pm
That would look cool, the background and vertices would flash, it would give a movie action element.
I don't know how hard it would be to make this, I'm not an expert on graphics programming. Probably lighting vertices would be easier, I'll check how it can be done.

N1nj@
July 5, 2004, 3:11 pm
woohoo! can you post back any results?...

sanity
July 5, 2004, 4:05 pm
hello michal.

i agree it would look great.. hope it gets implemented! [:D]

edit: also it would be cool if the soldats cast a shadow.

bb_vb
July 8, 2004, 9:29 am
This would be an awesome graphics improvement!

For the background lighting and shadows effect shown in b00stA's beautiful pics, I'm sure the line of sight algorithm used for realistic mode would come in handy... I still don't know exactly how you would do it though...

For lighting vertices, I have actually tried to do this myself once in a small test game, and it's not really that hard. My idea was to use a 'normal' lighting method, like used in 3D, but for 2D, where the angle between any light source and the normal (perpendicular) vector to any edge of any polygon is taken, and the closer they are together (the smaller the angle), the brighter the edge of the polygon becomes.

It's a bit trickier to put into practice, but it's definetly possible. Any edge where the angle > 90 degrees is unlit, and a simple distance test can be used to cull unnesicary polygons from the loop process.

Anyway, I would absolutely love to see this in Soldat, so I wish you luck Michal.

CbbLe
July 8, 2004, 10:48 am
it should be a clientside option however. Otherwise we will just have more lag

Alamo
July 8, 2004, 11:33 am
But like that it will be unfair b/c of different looks with and w/o the lighting engine. Just make it client side but not an option.

CbbLe
July 8, 2004, 1:55 pm
no it should be an option...Those who have slwo computers will get more lag

sanity
July 8, 2004, 2:10 pm
quote:Originally posted by Alamo
But like that it will be unfair b/c of different looks with and w/o the lighting engine. Just make it client side but not an option.

unfair how? it wouldnt give any real advantage... just looks better.

b00stA
July 8, 2004, 2:11 pm
CbbLe, it wouldn't create lag as in warping/bad ping. Your frame rate would probably drop everytime there's an explosion, but as mentioned before, it should be a client-side option.

Alamo, why is it unfair? Imho, people WITHOUT the lightning effects have an advantage (for example in Quake3. When the light is the same everywhere, you see a lot better and have a better overview, instead of dark/bright places).
..and of course it's client-side! What else? :)

Edit: too late.

JayBDey
July 8, 2004, 8:16 pm
How is it unfair? Well, imagine online splinter cell, now image that SOME people DONT see the shadows. Starting to see the problem now? It must be on for everyone.

b00stA
July 8, 2004, 8:35 pm
Maybe we're just talking about two different subjects.
I was referring to the light effects caused by explosions (or fixed objects like torches), because that's what I think Michal replied to ("movie action").
and those would be eye candy, just like maximum particles, smoothed polygon edges, bullet trails etc.