Tech Goggles/Vision Aug Light Amplification

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Tech Goggles/Vision Aug Light Amplification

Post by Cybernetic pig »

Methods I've tried:

Code: Select all

if (player.RendMap != 6)
    Player.RendMap = 6;
Changes all textures to unlit. works, but looks absolutely horrid.

Code: Select all

CurrentBrightness = float(player.ConsoleCommand("get" @ "ini:Engine.Engine.ViewportManager Brightness" ));
player.ConsoleCommand("set" @ "ini:Engine.Engine.ViewportManager Brightness" @ 1.0);
player.ConsoleCommand("FLUSH"); 
Ups the brightness. Most accurate method as it does amplify all existing light, but flushing the cache in play is bad for performance.

Code: Select all

player.changeZoneLight(True);
Function I added (and subsequently removed) to change a zone's ambientBrightness. Would have been great if it worked, but I guess Zones are not meant to be dynamically fucked with.

Code: Select all

Player.ClientAdjustGlow(0.3, vect(32,32,32));
According to someone else who created nightvision in their Unreal Tournament mod this helps you see in the dark, but I noticed no difference.

Other methods I've not tried:

Using the renderer to add a post-processing effect perhaps.
Spawning in a light that follows the player. Doubt it would look good and may be a big hit on performance if used in combination with the light aug.

...I guess vanilla it is then.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: Tech Goggles/Vision Aug Light Amplification

Post by Hanfling »

Try modifying Level.Brightness.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: Tech Goggles/Vision Aug Light Amplification

Post by Cybernetic pig »

No good. Same issue I got when changing Zone's ambient brightness: some textures remain bright afterwards and a flush of the cache is needed.
Made in China
MJ12
Posts: 466
Joined: Thu Apr 02, 2009 7:55 pm

Re: Tech Goggles/Vision Aug Light Amplification

Post by Made in China »

I'm a little bit ignorant on these things, but isn't there enough memory today to hold both normal lighting and high brightness at the same time? Create them both at the start of the level and switch between them using pointers rather than flushing and recalculating everything from scratch every time.
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: Tech Goggles/Vision Aug Light Amplification

Post by Cybernetic pig »

No memory management with UnrealScript, and no engine access either. Somehow Hanfling finds a way to modify some aspects of the engine, maybe he can find a solution.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: Tech Goggles/Vision Aug Light Amplification

Post by Hanfling »

Cybernetic pig wrote:No good. Same issue I got when changing Zone's ambient brightness: some textures remain bright afterwards and a flush of the cache is needed.
Mh you could try spawning some LE_NonIncident with maximum radius and low brightness to force a refresh. Sucks though.

And yeah a flush of GCache is probably needed, but sadly the 'FLUSH' command does more than just flushing GCache. You should really start doing a bit of C++ programming, as this vastely increases the possibilities, often with just some minor C++ code part. Like you could make a native which just calls GCache.Flush(), or even better just flushes the lighting related parts of GCache (CID_ShadowMap, CID_IlluminationMap, CID_StaticMap, CID_DynamicMap, irrc), otherwise other parts as animation tweening should be affected too.

For uc only, modiying remove const for Client in Engine.uc, run AllObjects iterator to grab the engine Object, save Client aside, set Engine.Client to None, call 'FLUSH' consolecommand, restore Client. Not sure if it works though, especially if in case Client is None the flush command will be executed at all. Otherwise it should just flush GCache.

Another idea you could try would be to iterate over all Actors and set bLightChanged=True, afaik thats some thing the editor uses and set it on the next frame to false again. But that might completely break all shadows for that one frame, but you can probably work around with some effect when switching on the light amp thing...

And just for the sake of it beeing said:
In the end, there is code which should be done in UC (nearly all gameplay related) and C++ (utility/helper code, performance critical code,etc.).
http://web.archive.org/web/200104120448 ... ative.html
And SampleNativePackage source out of ut/runepubsrc is always a great start.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
Post Reply