Journal #8498

Posted 7 years ago2015-01-25 10:08:23 UTC
Dr. Orange Dr. OrangeSource good.
Light, without it we wouldn't be able to see. And so it is in videogames. Lights are fundamental, every game have some sort of light, if ever so simple. In todays 3D games, there need to be some way to compute lighting data within 3D space, as volumetricaly most of the light eixst outside of a 2D face where the light is visible. How does the lighting really work in the GoldSrc engine? Does anyone know except for Valve themselves?
This is my theory on how it works:
User posted image
Of course I can't be sure... But anyone should know.

20 Comments

Commented 7 years ago2015-01-25 11:10:39 UTC Comment #67569
So you're taking your mspaint drawing as more valid than a detailed demonstration including screenshots and a test map?
It's not even a very good drawing.
Commented 7 years ago2015-01-25 13:07:43 UTC Comment #67568
Pretty sure it just changes the brightness of the textures based on rays traced from light sources. The lightmap grid holds light information every 16units i think by default.
Models get their light data based on their origin and player gets light data from whatever floor surface you're standing on.

I think...
Commented 7 years ago2015-01-25 13:46:22 UTC Comment #67585
Tet is right, lighting in gs is simple.
Its just precomputed radiosity (rad).
It is possible to bake lighting, the only problem is that the player will be fullbright or black.
Commented 7 years ago2015-01-25 14:35:09 UTC Comment #67584
How Can Light Data Be Real If Our Eyes Aren't Real
Commented 7 years ago2015-01-27 21:30:29 UTC Comment #67586
^^^ I love this comment.
Commented 7 years ago2015-01-28 04:53:09 UTC Comment #67570
Incidentally, without light, we would be able to see. The world would be fullbright.
Or so my understanding goes.
Commented 7 years ago2015-01-28 09:40:43 UTC Comment #67577
Imagine trying to sleep if that were the case. Even the insides of your eyelids would be fullbright.
Commented 7 years ago2015-01-29 00:57:24 UTC Comment #67571
Supposedly we'd evolve with that in mind. Unless someone recompiled with a leak.
Commented 7 years ago2015-01-29 01:44:56 UTC Comment #67578
That's probably not unlikely to happen, with the skybox being spherical. That's some risky geometry to be sealing us off from the void.
Commented 7 years ago2015-01-29 01:49:13 UTC Comment #67572
Maybe, but how often is someone going to need to change that? I mean, even for space travel and all that, I imagine they'd just use trigger_changelevels. Might be more likely that some bugger sticks an entity out there.
Commented 7 years ago2015-01-29 15:47:03 UTC Comment #67579
And that's why we should ban satellites with lights on them.
Commented 7 years ago2015-01-30 11:19:56 UTC Comment #67573
Wait, how can the universe have moving lights?
Commented 7 years ago2015-01-30 14:30:28 UTC Comment #67580
Many many slight variations of the same map and a very well refined level change system.
Commented 7 years ago2015-01-31 03:18:40 UTC Comment #67574
Now explain to me who really believes someone made THAT mod in seven days.
Commented 7 years ago2015-02-01 06:05:43 UTC Comment #67581
Unless...
Maybe it was created by atom?
Commented 7 years ago2015-02-01 07:13:53 UTC Comment #67575
Hmmm... He hasn't submitted any maps... Who knows what he's capable of?
Commented 7 years ago2015-02-01 08:06:13 UTC Comment #67576
And are any of those tutorials about creating universes?
Commented 7 years ago2015-02-01 08:41:14 UTC Comment #67583
Figuratively, yes. ;P
Commented 7 years ago2015-02-16 04:39:10 UTC Comment #67587
It's based on the Quake engine, which is heavily documented. If you do a few minutes of research you'll find your base answer. Valve pretty much added Radiosity lighting to the engine, which is why it looks so pretty and colorful. So yes, many many MANY people know how lighting works in Half-Life.

Edit: Actually the lighting apparently comes directly from Quake II, so again, highly documented and the code is open.

You must log in to post a comment. You can login or register a new account.