Forum Archive

Go Back   3D Realms Forums > 3D Realms Topics > Other Apogee/3D Realms Games > Prey
Blogs FAQ Community Calendar

Notices

 
 
Thread Tools
Old 02-21-2008, 09:50 PM   #1
New Horizon
Fix for Prey Ambient lighting
As some of you may or may not know, the ambient lighting in the D3 engine is rather ugly. This was caused by a bug in the interaction.vfp shader file that made the ambient light cast harsh, black shadows upon itself from a fixed angle.

The file at this link is a modified interaction.vfp file that fixes that problem. This was made with the D3 version of the file, but I think all versions are the same. If it doesn't work...someone may need to search through the file and find the relevant parts.

http://www.trisoup.net/temp/d3ambient/
New Horizon is offline  
Old 02-22-2008, 01:25 AM   #2
ryche

ryche's Avatar
Re: Fix for Prey Ambient lighting.
Never noticed that...
__________________
{<- machines have no conscience ->}
{<- “Shoot him!” They say, Who will be the killer? Who will be the winner? ->}
ryche is offline  
Old 02-22-2008, 04:04 AM   #3
Micki!

Micki!'s Avatar
Re: Fix for Prey Ambient lighting.
It looks like it's removing the bump map effect, or is that just me..?
__________________
A true genius does not need boundaries such as 'common sense'
Micki! is offline  
Old 02-22-2008, 04:18 AM   #4
ryche

ryche's Avatar
Re: Fix for Prey Ambient lighting.
I couldn't tell ya...I've gotten so lost in what's what with engines that I couldn't tell bump mapping to better lighting from the game engine

I loaded up Prey with the mod and can't tell a difference in how it looks...still looks the same to my blind eyes
__________________
{<- machines have no conscience ->}
{<- “Shoot him!” They say, Who will be the killer? Who will be the winner? ->}
ryche is offline  
Old 02-22-2008, 07:45 AM   #5
New Horizon
Re: Fix for Prey Ambient lighting.
From what rebb at doom 3 world has said, it doesn't completely remove the bumpmaps from the ambient lights, it's simply changing the way it treats them.

If you lit your level with a single ambient light, it might look flat since an ambient light is placed uniformly on all surfaces. For example.

Old ambients


Fixed ambients


This fix is likely more important to mappers than players.
New Horizon is offline  
Old 02-22-2008, 01:29 PM   #6
Hudson

Hudson's Avatar
Re: Fix for Prey Ambient lighting.
Looks better broken to me :\
__________________
Staying Frosty Since 09/06/07 - I love you Katie <3
“Software is like sex; it's better when it's free.” - Linus Torvalds
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” - Calvin & Hobbes
[INSERT SYSTEM SPECS THAT NO ONE CARES ABOUT HERE]
Hudson is offline  
Old 02-22-2008, 01:38 PM   #7
Steve

Steve's Avatar
Re: Fix for Prey Ambient lighting.
Where as I like the fixed version
Steve is offline  
Old 02-22-2008, 03:03 PM   #8
Hudson

Hudson's Avatar
Re: Fix for Prey Ambient lighting.
In game shots? I don't have Doom 3 installed anymore.
__________________
Staying Frosty Since 09/06/07 - I love you Katie <3
“Software is like sex; it's better when it's free.” - Linus Torvalds
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” - Calvin & Hobbes
[INSERT SYSTEM SPECS THAT NO ONE CARES ABOUT HERE]
Hudson is offline  
Old 02-22-2008, 03:06 PM   #9
New Horizon
Re: Fix for Prey Ambient lighting.
Quote:
Originally Posted by Hudson View Post
Looks better broken to me :\
Well son...you're either not a mapper or don't have a keen eye for what a base level ambient is supposed to look like. You don't use an ambient light as your sole form of lighting. An ambient, by definition from several sources, is non-directional..and lights everything evenly. The buggy lights in D3 were from a fixed direction and caused incorrect 'hard' shadows.

For example:

This is a level lit with the 'fixed' non-directional, no fall off ambient. Everything appears slightly more uniform due to the perfectly even lighting. You would never want to have an ambient this bright in a real level. I think I have it at around 20 or 25 here.



This image has the ambient turned down to a reasonable level of 2 or 3. Then a 'real' light is placed to light the area. All the ambient does is keep the shadows from being completely pitch black.

Last edited by New Horizon; 02-22-2008 at 03:13 PM.
New Horizon is offline  
Old 02-24-2008, 12:03 AM   #10
peoplessi

peoplessi's Avatar
Re: Fix for Prey Ambient lighting.
Your first screens weren't that informative. Also, will it trigger punkbuster? Since you have modified the files?
__________________
Duke Nukem Forever
Who am I to judge?
peoplessi is offline  
Old 02-24-2008, 01:36 AM   #11
New Horizon
Re: Fix for Prey Ambient lighting.
Quote:
Originally Posted by peoplessi View Post
Your first screens weren't that informative. Also, will it trigger punkbuster? Since you have modified the files?
This was made by rebb at Doom3world. I doubt it would cause any issues with punkbuster, it's just a file for handling lighting.
New Horizon is offline  
Old 02-24-2008, 04:03 PM   #12
Hudson

Hudson's Avatar
Re: Fix for Prey Ambient lighting.
Quote:
Originally Posted by peoplessi View Post
Your first screens weren't that informative.
Indeed
__________________
Staying Frosty Since 09/06/07 - I love you Katie <3
“Software is like sex; it's better when it's free.” - Linus Torvalds
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” - Calvin & Hobbes
[INSERT SYSTEM SPECS THAT NO ONE CARES ABOUT HERE]
Hudson is offline  
Old 02-24-2008, 06:09 PM   #13
New Horizon
Re: Fix for Prey Ambient lighting.
Quote:
Originally Posted by Hudson View Post
Indeed
Well, they had 'default doom 3 ambient' and 'fixed doom 3 ambient' on them. I don't know how much more informative you wanted them to be. Mappers will know what it's about, and that's who the post is for.
New Horizon is offline  
Old 02-25-2008, 03:56 PM   #14
Danule

Danule's Avatar
Re: Fix for Prey Ambient lighting.
so your saying that in game it wont make a difference?
__________________
is it weird when a psychonaut plays psychonauts?
Danule is offline  
Old 02-25-2008, 11:42 PM   #15
New Horizon
Re: Fix for Prey Ambient lighting.
Quote:
Originally Posted by Danule View Post
so your saying that in game it wont make a difference?
It will make a difference if the map uses ambient lighting to lighten up the dark shadows. Before the fix, ambient lighting was very ugly because it was broken and caused harsh black splotches. You couldn't really use it to any degree. At any rate, it's here for mappers/ modders to use in their projects.
New Horizon is offline  
Old 02-26-2008, 11:07 AM   #16
Danule

Danule's Avatar
Re: Fix for Prey Ambient lighting.
would it make any visual difference in prey or doom 3?
__________________
is it weird when a psychonaut plays psychonauts?
Danule is offline  
Old 02-26-2008, 12:11 PM   #17
avatar_58

avatar_58's Avatar
Re: Fix for Prey Ambient lighting.
This all seems useless to me without proper Doom 3 / Prey screenshots. I have no idea what you were trying to show in those previous shots....as it's not either game and you simply removed bumpmapping and shading. Show us what it looks like in-game, since thats all that matters.
avatar_58 is offline  
Old 02-26-2008, 12:21 PM   #18
New Horizon
Re: Fix for Prey Ambient lighting.
Quote:
Originally Posted by avatar_58 View Post
This all seems useless to me without proper Doom 3 / Prey screenshots. I have no idea what you were trying to show in those previous shots....as it's not either game and you simply removed bumpmapping and shading. Show us what it looks like in-game, since thats all that matters.
Bump mapping has not been removed. Go into the prey console and type r_skipbump 1 to see what the game looks like with no bump mapping. The AMBIENT LIGHT has simply been corrected! Ambient lights in the D3 engine were incorrectly pointing in a fixed direction, and now they are non-directional as they were intended. I can't make it any more clear than that. If anyone isn't understanding this, then they're probably not mappers. I can't say how much it will affect your ingame experience in prey because I don't know if the mappers used ambient light very much...if at all. Judging by the screenshots, they did...as there aren't as many pitch black shadows in the game. It's probably of little concern to you. Does anyone on this board map anymore...or am I wasting my time?
Last edited by New Horizon; 02-26-2008 at 12:49 PM.
New Horizon is offline  
Old 02-26-2008, 03:46 PM   #19
Danule

Danule's Avatar
Re: Fix for Prey Ambient lighting.
what is map?
__________________
is it weird when a psychonaut plays psychonauts?
Danule is offline  
Old 02-26-2008, 03:53 PM   #20
New Horizon
Re: Fix for Prey Ambient lighting.
Quote:
Originally Posted by Danule View Post
what is map?
lol
New Horizon is offline  
Old 03-02-2008, 12:56 PM   #21
Kev_Boy

Kev_Boy's Avatar
Re: Fix for Prey Ambient lighting.
I'm a mapper... and don't have a clue what you're on about.
Kev_Boy is offline  
Old 03-02-2008, 01:49 PM   #22
Plagman

Plagman's Avatar
Re: Fix for Prey Ambient lighting.
God, Doom 3 ambient was broken like that? I guess it wasn't very used given the dark nature of the game so I guess no-one noticed.
For all of you commenting that the first shot looks better, a short piece of background:
The lighting model generally used in realtime rasterizers is computed using three components named ambient, diffuse and specular. While diffuse represents the actual light emitted by a light source (and specular its direct reflection on a shiny surface), ambient is designed to approximate all of the indirect reflection of this source, causing areas that aren't directly in the beam to still light up. Due to its nature, ambient lighting doesn't have a direction and is supposed to slightly affect every pixel regardless of its normal, race or color as long as it's in the range of the light (ambient lighting is basically a lousy attempt at approximating secondary rays in raytracing).
The first two screenshots lights don't have any diffuse or specular component, which of course should never happen and isn't natural at all. There are just a demonstration of how broken it was to people who actually know what ambient lighting is.
This fix isn't probably going to affect much of the forementioned games given that they all take place in dark corridors, but it may definitely come in handy for mappers trying to design outdoors areas. I wouldn't be surprised if ETQW already had ambient lighting fixed.
__________________
EDuke32 - "The corrupt doctrine of terror has begun."
Plagman is offline  
Old 03-02-2008, 01:52 PM   #23
Theonewayman

Theonewayman's Avatar
Re: Fix for Prey Ambient lighting.
Quote:
Originally Posted by Kev_Boy View Post
I'm a mapper... and don't have a clue what you're on about.
You must be joking right? You are a mapper (make levels for games or mods) and don't know what is ambient lights?

I'm no mapper and i know what they are (as any 3d modeler does), and New Horizon works for the Thief like DarkMod so he knows what is talking about.

Here is a wiki quote for you guys.


Quote:
Ambient light (also available light or existing light) is a term used by photographers, cinematographers and other practitioners of the visual arts to refer to the illumination surrounding a subject or scene, specifically any and all light not provided by the photographer[1].

Levels of ambient light are most frequently considered relative to additional lighting used as fill light, in which case the ambient light is normally treated as the key light. In some cases, ambient light may be used as a fill, in which case additional lighting provides the stronger light source, for example in bounce flash photography. The relative intensity of ambient light and fill light is known as the lighting ratio, an important factor in calculating contrast in the finished image.
The bolded parts highlight the gaming use of ambient lights. So in short ambient light is a global light that shades equally all surfaces, simulating light bouncing (radiosity), in games and more especially on the Doom3 tech4 engine, is used to fill the shadows so they aren't so pitch black.
__________________
Cheers :)
3DPortfolio
ReactOS_Windows_like_FREE_OS
Theonewayman is offline  
Old 03-03-2008, 01:58 AM   #24
Kev_Boy

Kev_Boy's Avatar
Re: Fix for Prey Ambient lighting.
I know what ambient lights are... I ain't that uninformed. I'm just wondering why you would assume ID didn't know what they were doing?

Adding ambient lights in real-time calculated lighting significantly increases render-time and lowers performance. In a lot of cases it just doesn't pay to have them unless you really feel it needs it or can afford to in the scene.
Kev_Boy is offline  
Old 03-09-2008, 02:45 AM   #25
Plagman

Plagman's Avatar
Re: Fix for Prey Ambient lighting.
Quote:
Originally Posted by Kev_Boy View Post
I'm just wondering why you would assume ID didn't know what they were doing?
It's not debatable that the ambient component wasn't rendered as ambient should be. I'd be inclined to say they preferred it that way or just didn't care about it because it was mostly unused, though. The id people don't strike me as the type that don't know what they're doing.

Quote:
Originally Posted by Kev_Boy View Post
Adding ambient lights in real-time calculated lighting significantly increases render-time and lowers performance. In a lot of cases it just doesn't pay to have them unless you really feel it needs it or can afford to in the scene.
Well, no. Ambient lighting is practically free compared to any other kind of lighting.
__________________
EDuke32 - "The corrupt doctrine of terror has begun."
Plagman is offline  
Old 05-09-2008, 01:20 PM   #26
New Horizon
Re: Fix for Prey Ambient lighting.
Quote:
Originally Posted by Kev_Boy View Post
Adding ambient lights in real-time calculated lighting significantly increases render-time and lowers performance. In a lot of cases it just doesn't pay to have them unless you really feel it needs it or can afford to in the scene.
The problem with doom 3 lighting is that, unless you use an ambient, shadows are pitch black and you must compensate by increasing the radius or intensity of your lights.

For our mod(based on the Thief games), proper ambient lighting is an absolute necessity. Our missions take place at night, and having pitch black shadows completely ruins the playability of the missions since you can't see anything in the black shadows. Ambient is crucial for far more than just daylight missions.

With our improved ambient, we're able to get softer looking scenes like this.




As it turns out, our fix only works with Doom 3. We've also run into Nvidia vs. ATI issues with the fix. It doesn't seem to work properly across the ATI cards, but all Nvidia cards have accepted any attempted fix we throw at them. Thanks ATI!
New Horizon is offline  
Old 05-14-2008, 10:23 PM   #27
MeatWagon

MeatWagon's Avatar
Re: Fix for Prey Ambient lighting.
Those screens look great New Horizon, I know exactly what your talking about with the ambient lighting but I find that sort of ambience makes the scene look a little flat and lifeless. Have you thought about some sort of Ambient occlusion? I'm not talking about the screen space stuff from Crysis etc but ambient occlusion based off a cube map. I use an engine (C4) which has this feature and you can get some excellent results, the downside being, it isn't dynamic and can take a while to calculate.
MeatWagon is offline  
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:41 PM.

Page generated in 0.12295699 seconds (100.00% PHP - 0% MySQL) with 17 queries

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

Website is ©1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.