This OpenSauce extension uses some of the code from the DirectX SDK Post Processing sample to give Halo post processing abilities.
It basically takes what Halo renders, applies whatever effects you define on it and presents that to the screen.
To use simply extract the d3d9.dll and shaders folder into your Halo CE directory. The shaders folder contains a bunch of .FX shaders, the shader list file, and a template shader.
The shader list tells Halo what shaders to apply and in what order, open it in a text editor and it should be pretty clear.
I've also implemented a simple motion blur effect, seperate from other effects, which is why theres a motion blur FX file in the shaders folder. You can turn it on or off in the shader list file.
There's no guarantees of this working mind you, i'm still new to C++ and DirectX so theres a chance it won't work for some of you, but iv'e tested it on an ATI 9600 AIW and an Nvidia 9600GT with no problems.
I've included the files i've added/changed in OpenSauce for your viewing pleasure.
UPDATE: I've made changes so the motion blur cache uses less video memory, so try the updated version of you've had trouble.
UPDATE 2: Fixed SP crashing, better source code.
UPDATE 3: Fixed incorrect build number. Added fake HDR effect. (Based on source from here).
UPDATE 4: Added toggles, and a toggle menu. 2 extra shaders.
OS Post Processing 18-07-09
Pics:
PP_Bloom
PP_Sketchy
PP_Sepia
OS2 Post Processing Alpha
Since this is taking a while to develop i've figured i'd put out an alpha build for you to look at.
As such this comes with no guarantees of any kind, parts are unfinished, it might not run, exceptions may be had etc.
Here's a rundown of what's going on. This project isn't exclusively about post processing anymore, it can be split into two projects. One is some major additions to the DxWrapper part of OS and a number of components it now relies upon, and the post processing system that relies upon the DxWrapper modifications.
DxWrapper
The DxWrapper now has the ability to create a screen space position texture, a screen space velocity texture and a screen space normals texture, which are all exposed to other components though a DxWrapper namespace (as well as some other things). These outputs are used by the PostProcessing component for special effects.
I've added a hs_global "rasterizer_rt_display <short>" which allows you to see these outputs in action (which is handy for debugging too!). The values you can use are below.
0 - Default. Just renders the scene as normal.
1 - Shows you what is in the position output texture.
2 - Shows you what is in the velocity output texture. You'll need to have something moving to see something, Warthog tires will glow!
3 - Shows you what is in the normals output texture (between -1 and +1, so blackness will occur).
4 - Shows you what is in the normals output texture (between 0 and +1, so blackness won't occur).
-1 - All of the above, except 0.
Post Processing
The post processing system now has 4 sub sections.
Per pixel motion blur
Fake HDR
External global shaders, and
Internal map cache shaders.
Per pixel motion blur
Yes, i'm determined to get per pixel motion blur working. It uses the screen space velocity to blur the scene depending on how fast and in what direction an object is moving. This heavily relies on the DxWrapper velocity output so i'll discuss that instead. As far as the Velocity output goes, currently BSP velocity is fine, but object velocity isn't quite right. It will flicker everytime an object is added or removed from the object pool. Or at least I think that is what's happening. This is a bit annoying as the motion blur will distort the objects on screen when this happens, so i've disabled the velocity output for objects by default and added another HS global bool 'rasterizer_object_velocity' so that you can turn it on so see what progress has been made on it. The blur shader itself is pretty resource intensive so don't be suprised if you get a big droop in FPS when the shader is enabled. Regarding the motion blur effect, the shader isn't framerate independent so at the moment if you have a really high FPS you might not notice much. I test it at 30 FPS as my baseline so you'll get the full effect at that speed.
Fake HDR
Disable by default, enabled via the console. I don't like it much to be honest.
External global shaders/Internal map cache shaders.
These are together as their capabilities are be identical. External shaders work the same as in the OS1 version. They are defined in "shaders/PostProcessingSettings.txt" and loaded from the "shaders" directory. The variable names that are used in the shaders have changed so shaders from OS1 will need updating to work. Otherwise they are largely the same, but with a few additions. Shaders can now use up to 4 external textures to create more interesting effects, an example being a pencil sketch effect which is included in the download. They also have access to the textures DxWrapper now outputs. Which means that some interesting effects can be achieved such as depth of field (included), VISR-esque edge detection (included) and plausibly SSAO. Also, up to 8 animated floats are now available for whatever reason you deem fitting.
So, on top of the effects that can be done purely with the rendered scene (Bloom, Sepia, etc.) more cool things are possible :D.
A much needed addition is the ability to chose when an effect is applied, which can now be defined in the settings file. These are listed in order of application.
0 - Pre blur Applied before the motion blur takes place.
1 - Pre alpha blended Applied after the motion blur but before the alpha blended faces.
2 - Pre HUD Default. Applied after the alpha blended faces but before the HUD.
3 - Pre menu Applied after the HUD is rendered.
4 - Post menu Applied after the menu is rendered.
Motion blur is applied before alpha blended faces are rendered as it's nigh impossible to blur a pixel for both the transparent surface and the surface behind it at the same time.
Internal map cache shaders are a completely new feature which is now possible thanks to the wonders of OS2. I have made two new tags (included in this release but used them at your own peril dun Dun DUNNN!!). "shader_post_process" and "shader_post_process_collection" which will allow map makers to create post process effects for their maps, giving them a completly unique look. They have the same capabilities as the external shaders with a few changes.
If I can ever figure out how to make functions with arguments work, they will be partially controllable with HScript.
They can be set to not be applied during cutscenes.
External bitmaps are currently available in the same way as external shaders, however, if I can find out how to load bitmaps from the cache, they will take their place. An interesting application of this would be to have a refractive effect behind the HUD ala Halo3/ODST.
I have included the current tag_groups.map file and the definition file for the new tags so you can give it a go, but while I think i'm done changing it, and i've left space to add things if I want to, there's no guarantee that no tag breaking changes will be made in future.
The current post processing console commands are as follows:
pp_load function Loads everything if not already loaded
pp_unload function Unloads everything if not already loaded
pp_fake_hdr_enabled bool Turns fake HDR on/off
pp_fake_hdr_target_luminance real Adjust fake HDR target luminosity
pp_post_processing_enabled bool Turns effects on/off
pp_motion_blur_enabled bool Turns motion blur on/off
pp_motion_blur_amount real Motion blur amount ~40 works well at 30FPS
With regards to settings, all standard settings are stored in the OpenSauce settings file. They are changed by the console commands and save when you close the game. The shader and effect setup however is in the PostProcessingSettings file mentioned previously. You can change things in this file then unload-load the post processing system while the game is running to see your changes. The way the file is laid out is very specific so stick to it!
So, I think thats covers everything added/changed, so onto the dreaded problems.
Known problems:
Alpha blended faces such as tree leaves are a bit messed up in the Position/Velocity/Normals output. This therefore affects all post processing shaders that use them.
In the Velocity texture flickering occurs when you move and look around, and sometimes objects just look wrong.
Using the Yelo menu to disable and re-enable the HUD will permanently disable a number of features because it replaces a pointer that my code replaces, with the original Halo pointer. I need to find a way around this.
Sometimes using the flashlight or picking up active camo will make the screen go black for a split second.
For the first frame when you load a map or when the camera changes in SP motion blur will be crazy.
UserTool
Along with the internal shaders I am also working on a "usertool" which is a simple command line program that looks and operates in the same way as tool, but will allow developers to add their own commands so that they can compile data into their own tag formats. For instance currently the shader_post_process tag stores the shader in text format, but once the map maker is happy with the shader they will be able to use usertool to compile and replace it with a smaller binary format.
Source
Source is included in the download if your interested. I'm probably going to be re-writing DxWrapper once i've got a fully working velocity output and I need to add internal bitmap loading to the PostProcessing component but the other components should be pretty much done.
Like I said at the beginning of the essay post this is an alpha build so any problems i'd like to know about but don't be expecting a rapid fire fix for anything. It would be handy to know your video card if you do have problems. Performance wise, this is a far more expensive system than previously so some FPS drops shouldn't be unexpected.
Also, as this is built with the original OS2 source any problems with that initial release might be present here. You'll need the latest DirectX too.
Any questions you have are obviously welcome :).
As far as credits go, obviously Kornman deserves his own cookie mountain for OS itself and the help he's given, complete with warm milk and honey.
Skarma also needs a hearty mention for reversing the code that helped getting screen space normals and velocity working.
June 30th, 2009, 05:22 PM
Roostervier
Re: OpenSauce Post Processing
Looks great, downloading. : D
June 30th, 2009, 05:31 PM
Disaster
Re: OpenSauce Post Processing
I thought it wasn't possible to do much graphics wise with OS? Would it be possible to add an ambient occlusion post processing effect?
June 30th, 2009, 05:36 PM
Roostervier
Re: OpenSauce Post Processing
For anyone that has halo spit out that it needs d3dx9_41.dll (or whatever) you can simply download it from some place and it works.
June 30th, 2009, 05:38 PM
FireScythe
Re: OpenSauce Post Processing
I doubt it, this only uses colour information which is easy enough to get. Something like ambient occlusion would require depth information and maybe normals, which would be difficult to get, if possible at all (as far as I know).
not working here, halo window opens and does nothing... no loading at all.
June 30th, 2009, 06:06 PM
FireScythe
Re: OpenSauce Post Processing
Is there any sound? And what do you actually see, the halo startup screen?
June 30th, 2009, 06:18 PM
Masterz1337
Re: OpenSauce Post Processing
This is pretty cool. Only complaint is that I think that it made my screen to bright and I can't run Xfire and this at the same time, but the second one isn't your fault.
June 30th, 2009, 06:20 PM
DEElekgolo
Re: OpenSauce Post Processing
No way!!!!
Now I can make some HLSL shaders for halo CE. Thanks fire scythe!
Edit: I get an exception when I start it up.
June 30th, 2009, 06:38 PM
Masterz1337
Re: OpenSauce Post Processing
After using it, I only have a few suggestions.
1. Can you make it so it doest effect HUD bitmaps?
2. I got a weird white flash every once in a while, not even a flash, more like a white flicker.
3. Can you make objects that have a dynamic light shined on them have an increased bloom?
Great work on this.
June 30th, 2009, 06:43 PM
jcap
Re: OpenSauce Post Processing
For everyone using this, because it uses the original release of OS, you MUST follow the troubleshooting tips in THIS THREAD.
June 30th, 2009, 06:46 PM
StankBacon
Re: OpenSauce Post Processing
the original os works fine tho, this one doesn't.
and no fire, no sound at all, just a black screen... the hard drive doesn't even do anything like it normally does to load all the maps.
June 30th, 2009, 06:49 PM
DEElekgolo
Re: OpenSauce Post Processing
I got it working. I deleted init.txt and closed xfire and it ran nicely. Good job on this! I'll be making some shaders now.
June 30th, 2009, 06:58 PM
FireScythe
Re: OpenSauce Post Processing
@ Masters:
1. As this is done after halo has done its own rendering business I dont think theres a feasible way to exclude the hud.
2. I get that too when windowed, whenever winamp or something pops up to tell me something. I think its an external issue where halo's gamma gets overriden when it looses focus.
3. As with 1. changing things that happen in Halo's own rendering code isn't really feasible, but the bloom shader itself is easily alterable. One of the passes is a bright pass filter to pick out only the brightest areas, so changing that to include lower values may help to pick out the dynamic lights, but would also make everything else have more bloom.
@StankBacon:
Rename the shader_list and PP_MotionBlur files to something different (to disable post processing completely) and see if it loads as normal.
June 30th, 2009, 07:07 PM
Heathen
Re: OpenSauce Post Processing
well since the hud never moves in classic maps, you can make a version that somehow excludes those areas, but then if you zoom or get into a vehicle...
Idk, just a thought.
June 30th, 2009, 07:31 PM
StankBacon
Re: OpenSauce Post Processing
Quote:
Originally Posted by FireScythe
d also make everything else have more bloom.
@StankBacon:
Rename the shader_list and PP_MotionBlur files to something different (to disable post processing completely) and see if it loads as normal.
game now loads fine.... odd.
June 30th, 2009, 07:45 PM
FireScythe
Re: OpenSauce Post Processing
Hmm, try just without the motion blur. If it doesn't work then, it must be doing something your card isn't compatible with.
June 30th, 2009, 08:01 PM
StankBacon
Re: OpenSauce Post Processing
works with motion blur disabled.
June 30th, 2009, 08:09 PM
Saggy
Re: OpenSauce Post Processing
Quote:
Originally Posted by Heathen
well since the hud never moves in classic maps, you can make a version that somehow excludes those areas, but then if you zoom or get into a vehicle...
Idk, just a thought.
This. Is it possible to make a mask of some sort as to where the effect is applied and to where it isn't?
June 30th, 2009, 08:10 PM
FireScythe
Re: OpenSauce Post Processing
Ahh good, must be the motion blur textures using too much video memory, i'll have to look into that.
E: Making masks for the HUD wouldn't work, as different resolutions would need different masks, plus a number of maps use custom UI's.
June 30th, 2009, 08:14 PM
Malloy
Re: OpenSauce Post Processing
Sorry where do I extract the two folders in the .zip to?
June 30th, 2009, 08:18 PM
FireScythe
Re: OpenSauce Post Processing
The contents of the "Halo CE" folder go into your Halo CE directory. The "OpenSauce" folder has the source code, for people interested in how it works.
June 30th, 2009, 08:47 PM
Malloy
Re: OpenSauce Post Processing
Oh thanks alot
ok after running i get the Missing DirectX file prompt. and after following
Quote:
Originally Posted by FireScythe
I doubt it, this only uses colour information which is easy enough to get. Something like ambient occlusion would require depth information and maybe normals, which would be difficult to get, if possible at all (as far as I know).
The website is telling me that my Windows isnt genuine :\ and it wont let me download the update. (which is odd considering I ordered this Windows Vista off the MS website).
Edit: Its k I found 3rd party source.
Edit 2: FFFFFFF----
Its not k, Its asking me where I want to extract the DirectX files too.. in which I have no fucking clue.
Edit 3: Its k, I found another 3rd party source with an auto installer , pheww.
June 30th, 2009, 09:35 PM
DEElekgolo
Re: OpenSauce Post Processing
Is it possible to have effects only work for specific assets?
IE: All spartans or weapons or vehicles on screen have a specific effect to them?
July 1st, 2009, 04:13 AM
Kornman00
Re: OpenSauce Post Processing
FireScythe: Compile using "Release" configuration. Will result in a smaller DLL, faster code and won't require the debug DX DLL.
Nice to see something come out of OS :). I'll check out the code later and see about adding it as an example to the next OS SDK release.
But yeah...besides just postprocessing what Halo has already created, there isn't too much you can do graphical wise without changing the game's own rasterizer code.
July 1st, 2009, 08:40 AM
FireScythe
Re: OpenSauce Post Processing
Oh this is a release build, and the DLL it ask's for isn't the debug version as it doesn't have the "d" suffix.
Apparently Microsoft seperated D3DX to a seperate DLL in February 05 and have have been incrementing its version on every update, with a new DLL. So as this build asks for d3dx9_41 (March 09 SDK) and the original OS asks for d3dx9_37 (March 08 SDK ?) it must ask for the specific DLL version from your SDK. So it might be worth pointing out what DX SDK to build with for OS2.
July 1st, 2009, 09:36 AM
Kornman00
Re: OpenSauce Post Processing
Well, not debug, but for whatever reason when compiling with the DEBUG condition (but not with the debug libs), it causes the resulting DLL to link to the specific DX DLL.
If you search the Debug build of the Yelo DLL for that DX DLL, you'll find the specific DX DLL name. However in a Release build it will just be the generic DX DLL with no specific version appended.
I haven't upgraded my DX SDK since Nov 2008, but I'll probably get the newest DX SDK August mid-month.
July 1st, 2009, 12:36 PM
FireScythe
Re: OpenSauce Post Processing
Hmm, I don't know what's going on then. I've compiled my code using a fresh copy of OS as a release build and its still using d3dx9_41.
I've made some changes so that the motion blur cache uses less texture memory so if you've had trouble with it, try the updated one: Download
July 1st, 2009, 06:24 PM
Syuusuke
Re: OpenSauce Post Processing
What the hell is an .iwd file?
July 1st, 2009, 06:26 PM
StankBacon
Re: OpenSauce Post Processing
yah i think he uploaded the wrong thing or something :|
July 1st, 2009, 06:32 PM
Syuusuke
Re: OpenSauce Post Processing
Yea he definitely did, it's a file for CoD...(you can open it as a zip)
July 1st, 2009, 06:58 PM
FireScythe
Re: OpenSauce Post Processing
Ugh, filefronts done this before, upload something then the link goes somewhere completely different :S. Download
July 1st, 2009, 07:31 PM
t3h m00kz
Re: OpenSauce Post Processing
lol, I set the motion blur to 0.05.
TRIPPYYYYY
July 1st, 2009, 08:00 PM
Heathen
Re: OpenSauce Post Processing
Quote:
Originally Posted by FireScythe
Ahh good, must be the motion blur textures using too much video memory, i'll have to look into that.
E: Making masks for the HUD wouldn't work, as different resolutions would need different masks, plus a number of maps use custom UI's.
I know. I thought of that. Also, when you get in vehicles and during cutscenes blablabla.
July 3rd, 2009, 09:29 AM
FireScythe
Re: OpenSauce Post Processing
Forgot to comment out the statistics code in the last build, so it crashes in SP, new build below. Also, the source has been re-jigged so it doesn't mess with the original OS code as much. Download
July 11th, 2009, 08:35 PM
Con
Re: OpenSauce Post Processing
I dont get this site; do I need an account? It just takes me to their homepage.
July 11th, 2009, 11:42 PM
supersniper
Re: OpenSauce Post Processing
yeah...
someone mirror it please?
July 11th, 2009, 11:44 PM
Roostervier
Re: OpenSauce Post Processing
I think they already deleted the content, because it used to work for me. I'll see if I can mirror the content.
Right, this is the most recent build, and i've put it on skydrive so i'm hoping this link will be a bit more...permanent. Link.
July 13th, 2009, 12:03 PM
FireScythe
Re: OpenSauce Post Processing
Quote:
Originally Posted by Jelly
The latest build appears to change the version number to some obscure one with no servers.
Fixed.
Also, this build has a fake HDR/eye brightness adjustment feature which happens before post processing and motion blur. The PP_FakeHDR.fx shader is part of this. You can change the effect in the .shader_list file as with the other values.
Holy shit that is cool, would it work for tunnel effects similar to the Half life 2 driving section tunnels? (ie: you can't see the end, it's just white light until you get close, and the reverse being true for looking in?)
July 13th, 2009, 08:15 PM
supersniper
Re: OpenSauce Post Processing
Quote:
Originally Posted by MrBig
hmm
Code:
Problem Event Name: APPCRASH
Application Name: haloce.exe
Application Version: 1.0.8.616
Application Timestamp: 489a3b7e
Fault Module Name: d3d9.dll
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 4a5b5cde
Exception Code: c0000005
Exception Offset: 00002c33
OS Version: 6.0.6002.2.2.0.768.3
Locale ID: 1033
Additional Information 1: 4288
Additional Information 2: e811a2a492680b03a1a1def5192ef72c
Additional Information 3: 957a
Additional Information 4: d3479214be82c50bf61f47f0ab02b54d
Holy shit that is cool, would it work for tunnel effects similar to the Half life 2 driving section tunnels? (ie: you can't see the end, it's just white light until you get close, and the reverse being true for looking in?)
I don't think so, no. I think HL2 used a lens flare type technique to manually create that effect as HDR wasn't implemented till the Lost Coast tech demo.
July 16th, 2009, 06:00 AM
Limited
Re: OpenSauce Post Processing
Quote:
Originally Posted by AdmiralBacon
Someone (and not km00) needs to merge the Open Sauce extensions together into one community extension and keep it up to date until Update 2 comes out.
I agree, however it means everything that gets released, needs to be toggable. Okay maybe not needs to, but I wouldnt feel happy combining things that cant be turned off. Someone might only want to use the dll for post processing, another might only want to use the third person. Then later use it together.
July 16th, 2009, 10:36 AM
jcap
Re: OpenSauce Post Processing
Yeah, when you place the dll into your CE folder, Halo should play normally. When you start typing in the console commands, then it starts to turn into your experience.
Is there a way to get the individual post processing effects turned on and off by the console? Keep the config file for the strength and more detailed settings, but it would be great is these effects could be accessed by a script or something too.
July 16th, 2009, 10:41 AM
Syuusuke
Re: OpenSauce Post Processing
The strings.dll would have to be modified wouldn't it?
July 16th, 2009, 10:45 AM
Kornman00
Re: OpenSauce Post Processing
Script function creation in the first release was funked up (yes, funked). It has been fixed and made usable in Update 2, so you don't have to keep using globals for hacking functionality into your extensions
July 16th, 2009, 10:51 AM
Siliconmaster
Re: OpenSauce Post Processing
Okay, I feel like a moron, but the new OS build works fine for me, the one linked in the troubleshooting thread. However, this one asks for the missing DX .dll, and when I try to install the latest dx, that just gives me an error. Since the normal OS works, I thought it would be better to post here than in the troubleshooting thread. D:
And if there's something I blatantly missed, just point me there. Thanks.
July 16th, 2009, 10:58 AM
FireScythe
Re: OpenSauce Post Processing
Well I do have a toggleable build that reloads the shaders and such when toggled back on, but I don't know enough about where to put my global in memory to know its not messing with something else.
As far as setting shaders using the console I suppose it's technically possible, but beyond my capabilities at the moment.
July 16th, 2009, 10:59 AM
Roostervier
Re: OpenSauce Post Processing
Nice job, it looks awesome : D
July 16th, 2009, 11:33 AM
Limited
Re: OpenSauce Post Processing
Quote:
Originally Posted by FireScythe
Well I do have a toggleable build that reloads the shaders and such when toggled back on, but I don't know enough about where to put my global in memory to know its not messing with something else.
As far as setting shaders using the console I suppose it's technically possible, but beyond my capabilities at the moment.
I've put my toggles and entered data in 0x400400-0x400450 region. Its open memory. One thing we do need to keep in mind if we combine different OS projects is what memory isnt used by more than one process.
What kind of settings do the shaders require? Values inputted? If you need any help, contact me I'll gladly try to help.
July 16th, 2009, 11:35 AM
Siliconmaster
Re: OpenSauce Post Processing
Yep- I had missed that it was a slightly different .dll this time. I downloaded that, and now Halo opens, and the gravity commands work. However, I can't get the others to work, or I'm typing the commands wrong. I'm looking at the shader list, and it would seem the commands would be pp_bloom, etc. However, they don't do anything. :/
Edit: Therefore, could someone clarify some of the commands so I could be sure I'm actually testing them?
July 16th, 2009, 12:55 PM
FireScythe
Re: OpenSauce Post Processing
Quote:
Originally Posted by Limited
I've put my toggles and entered data in 0x400400-0x400450 region. Its open memory. One thing we do need to keep in mind if we combine different OS projects is what memory isnt used by more than one process.
What kind of settings do the shaders require? Values inputted? If you need any help, contact me I'll gladly try to help.
I suppose ideally rather than hardcoding the memory locations, OS could keep track of all free memory and allocate it on runtime, so that components don't need to deal with it. I'll tack the toggle bool for this at 0x00400410, just after the 3rd person values for now.
The shaders themselves don't need any values once loaded, but I think what is needed is a function that enables and disable effects, but that'll have to wait till OS2.
Fake E: Just realized that I'm reassigning my globals pointer to a variable anyway:
So would this no longer cause a conflict with anything else?
Quote:
Originally Posted by Siliconmaster482
However, I can't get the others to work, or I'm typing the commands wrong. I'm looking at the shader list, and it would seem the commands would be pp_bloom, etc. However, they don't do anything. :/
That's not how it works :P. In the shader_list file, under the [Shaders] block are all the shaders that are loaded, with an index assigned to them E.g.:
PP_ColorDownFilter4 = 9
loads "*HALOCEDIR*\shaders\PP_ColorDownFilter4.fx" and gives it an index
of 9. But the shaders won't do anything unless they are used under [PostProcessingEffects]. Say you have this list:
Under [PostProcessingEffects], "Bloom = 0" will use the all in one PP_Bloom shader on its own in the scene (The name "Bloom" doesn't matter as long as there is one, with no spaces). However you can combine seperate shaders to make other effects if you want. For instance "Bloom = 3,2,5,6,4" will also create a bloom effect. You use a hash "#" to comment out the shaders and effects you don't want to use.
July 16th, 2009, 12:59 PM
DEElekgolo
Re: OpenSauce Post Processing
Would something like dof and screen fringe be possible? Or possibly vignetting?
July 16th, 2009, 01:10 PM
FireScythe
Re: OpenSauce Post Processing
Can't do depth of field without getting access to the depth buffer, which is practically impossible in DX9 apparently, only other way of getting Depth information is by rendering everything again using a shader that outputs depth information, but we can't do that because we can't change the rasterizer code.
Screen Fringe might be possible to an extent, there is a colour edge detection shader which you could look at.
Vignetting, yes. The motion blur shader uses vignetting to reduce the amount of blur towards the centre of the screen so what you're looking at stays clear.
July 16th, 2009, 01:15 PM
Siliconmaster
Re: OpenSauce Post Processing
Well now, I knew I was missing something. :P Thanks for the assistance. It's definitely doing stuff now, I just need to mess with it so it looks good. This is awesome.
July 16th, 2009, 05:29 PM
Pyong Kawaguchi
Re: OpenSauce Post Processing
Damn, I wish this was mixed with the 3p/fov app :S
July 18th, 2009, 10:43 AM
FireScythe
Re: OpenSauce Post Processing
New build in first post that has script toggles for each part:
pp_loaded - toggles whether the entire post processing system is loaded or not, turning this off and on essentially reloads your shaders.
pp_fake_hdr - Toggles the fake HDR.
pp_effects - toggles whether your effects are used.
pp_motion_blur - toggles motion blur.
Also, for this build i've made a simple OS toggle menu (using TextBlock's already in OS) that is accessible when you are in the menus by holding down left shift and using the top row number keys to select your options. This is seperate from the post processing code and can be easily used by other components that want to be able to toggle their bools :v:. The bools don't need to be script globals either, just pass your bools pointer and the text you want to go with it in the RegisterToggle function and it'll get added to the list.
Also added a Vignette shader and my attempt at a simple Chromatic Aberration shader.
July 18th, 2009, 11:30 AM
Limited
Re: OpenSauce Post Processing
Oh that text block thing is sick :D Nice work.
July 18th, 2009, 11:40 AM
DEElekgolo
Re: OpenSauce Post Processing
Quote:
Originally Posted by FireScythe
Also added a Vignette shader and my attempt at a simple Chromatic Aberration shader.
:downs:
July 28th, 2009, 03:06 PM
kenney001
Re: OpenSauce Post Processing
Ok I must be missing something here:
I had to do a fresh install of haloce, so i installed and patched to 1.08
I then download this openSauce Post Processing file and extract the d3d9.dll to the Haloce Root directory and the shaders to the shaders folder.
I run the game, and I see no difference. I dont understand, what am I missing?
July 28th, 2009, 03:31 PM
klange
Re: OpenSauce Post Processing
Quote:
Originally Posted by kenney001
Ok I must be missing something here:
I had to do a fresh install of haloce, so i installed and patched to 1.08
I then download this openSauce Post Processing file and extract the d3d9.dll to the Haloce Root directory and the shaders to the shaders folder.
I run the game, and I see no difference. I dont understand, what am I missing?
You have to write up a config to enable the post processing. The fact that nothing happened when you started CE is actually a good thing, it means it didn't crash.
July 28th, 2009, 04:13 PM
FireScythe
Re: OpenSauce Post Processing
If it's the latest build you have, then there will be a black "OpenSauce" box at the bottom of the screen whenever your in a menu. If that isn't there then there's something amiss.
July 28th, 2009, 11:54 PM
kenney001
Re: OpenSauce Post Processing
And what do you mean make a config? How would one go about doing that?
I installed a fresh clean HaloCE
I patched to 1.08
I downloaded OpenSauce 2x from here and put the .dll in the root directory
I started the game, started a LAN server, hit escape, no OpenSauce text or black box. (Im assuming this is the menu?) The main menu shows nothing either
My game is showing version 1.09 which it should...
What am I not doing?
This needs better instructions...
July 29th, 2009, 09:08 AM
FireScythe
Re: OpenSauce Post Processing
You need the opensauce d3d9.dll from the first post of THIS thread. The config file is included with the dll in the archive on the first post.
Edit: Just though i'd show something that will be in the OS2 version, you'll be able to load two external textures for use in your shaders and have two floats that increase over time however you want. The number of textures and timed floats is up for suggestion.
Here's a couple of examples that are possible:
Pencil Sketch
Refraction
July 30th, 2009, 09:18 AM
Dwood
Re: OpenSauce Post Processing
doood. This is so epic. I can't believe itsssss
August 13th, 2009, 07:22 PM
FireScythe
Re: OpenSauce Post Processing
If you understand the uses for this, you can have a cookie :neckbeard:.
August 13th, 2009, 07:28 PM
klange
Re: OpenSauce Post Processing
Ooh, depth mapping!
August 13th, 2009, 07:44 PM
DEElekgolo
Re: OpenSauce Post Processing
:o!
DOF now!
August 13th, 2009, 07:56 PM
Siliconmaster
Re: OpenSauce Post Processing
How would you use that data though to make DOF? :/
August 13th, 2009, 08:05 PM
DEElekgolo
Re: OpenSauce Post Processing
The depth information can be used to control the intensity of blurring. Faking DOF.
August 13th, 2009, 08:45 PM
FireScythe
Re: OpenSauce Post Processing
Indeed, Depth of Field should be possible, but also with the screen space position data (second pic) I 'might' be able to do per pixel motion blur. Plus as a bonus I might be able to seperate the hud so that post processes don't affect it.
August 13th, 2009, 10:01 PM
Siliconmaster
Re: OpenSauce Post Processing
Well shit. That would be insane.
August 13th, 2009, 10:09 PM
Roostervier
Re: OpenSauce Post Processing
wow, great work FireScythe
August 14th, 2009, 08:00 PM
Con
Re: OpenSauce Post Processing
What exactly are we looking at in the second picture, and how can that aid in motion blur? Also, you should be able to do the cell-shaded look with edge finding on that depth map. Is there any way to fix the planes showing up for sprites?
August 15th, 2009, 05:00 AM
FireScythe
Re: OpenSauce Post Processing
The second picture shows the vertex/face position in screenspace (Although the full range can't be shown in the 32bit format we see), so if a copy of the previous frames position data is kept, we can get how much an object has moved, and blur it accordingly....in theory :P.
I'm working on the transparent textures. Trees and such should be fine, but I still need to figure out whether I can do particles.
August 15th, 2009, 11:01 AM
Con
Re: OpenSauce Post Processing
If an object is moving across the screen, such as a warthog driving by, then wouldn't the position data between the front of the hog in one frame and the back of the hog in the next be almost the same? The only major change would come from the front and back of the hog where it's compared with the background. I'm not sure how you would pull objects out of the scene. On the plus side, that new SSDO method works using depth and position data doesn't it?
August 15th, 2009, 11:26 AM
Masterz1337
Re: OpenSauce Post Processing
Amazing as always, can't wait to use this on OS2
August 18th, 2009, 03:37 PM
FireScythe
Re: OpenSauce Post Processing
Quote:
Originally Posted by Con
If an object is moving across the screen, such as a warthog driving by, then wouldn't the position data between the front of the hog in one frame and the back of the hog in the next be almost the same? The only major change would come from the front and back of the hog where it's compared with the background. I'm not sure how you would pull objects out of the scene. On the plus side, that new SSDO method works using depth and position data doesn't it?
Yep, this seems to be the problem iv'e been coming up against. Seems the way I thought it was implemented isn't quite right. I initially thought I could compare the positions of two frames at each pixel, but as you say, doing this means the difference between frames would be greatest at the boundry of a moving object and wouldn't give a per object velocity.
What I actually need to do is get the velocity of each vertex when the objects are initially drawn. However I can't think of a feasible way to do this without some major editing of vertex shaders and the like. So an accumulation buffer motion blur will have to do. Position information will still be available for other post process usage though :downs:.
August 18th, 2009, 06:24 PM
Donut
Re: OpenSauce Post Processing
Quote:
Originally Posted by FireScythe
Plus as a bonus I might be able to seperate the hud so that post processes don't affect it.
i have open sauce d3d9.dlls for limited's 3rd person/fov app and your post processing app. some weapon's zoom turns the whole screen black. is that your app or limited's app?
also i dont know if anyone posted this or anything but the whole screen dims when you open the chat box. separating hud elements would be great
August 18th, 2009, 06:39 PM
FireScythe
Re: OpenSauce Post Processing
I would say its the 3rd person extension doing that as it has code that changes its behaviour when zoomed.
August 19th, 2009, 01:31 AM
W1zard
Re: OpenSauce Post Processing
Quote:
Originally Posted by FireScythe
Indeed, Depth of Field should be possible, but also with the screen space position data (second pic) I 'might' be able to do per pixel motion blur. Plus as a bonus I might be able to seperate the hud so that post processes don't affect it.
Big cooky if you can actually get the HUD unaffected =O
Keep it up, you're legend for making an old engine like this look great :neckbeard:
August 19th, 2009, 05:05 AM
Advancebo
Re: OpenSauce Post Processing
Quote:
Originally Posted by W1zard
Big cooky if you can actually get the HUD unaffected =O
Keep it up, you're legend for making an old engine like this look great :neckbeard:
Wtf is a cooky.
August 19th, 2009, 04:52 PM
boogerlad
Re: OpenSauce Post Processing
cookie.
August 28th, 2009, 05:38 AM
Cortexian
Re: OpenSauce Post Processing
I think you'd have to make a "mask" around the HUD, since this is basically just an effect layer. And since different people have different resolutions you'd needs a mask for A LOT of different resolutions.
I'm not even sure if you could define a mask type exclusion via a d3d9.dll, but I have no idea so.
August 28th, 2009, 07:28 AM
FireScythe
Re: OpenSauce Post Processing
Well, as Halo renders the scene first and then the UI/HUD it should be possible to slot the post processes in between so Halo does the UI/HUD after the post processes are done. I've managed to test this using a hacky way of figuring out when its started drawing the HUD, and then rendering the post processes, but it's messy and screws other things up. Shows it can be done though.
August 28th, 2009, 06:39 PM
FireScythe
Re: OpenSauce Post Processing
Success! No more messed up menus, hud or chat text :).
August 28th, 2009, 07:31 PM
Siliconmaster
Re: OpenSauce Post Processing
Sweet! Looks really nice. :D
September 9th, 2009, 10:38 AM
W1zard
Re: OpenSauce Post Processing
any new RC anywhere soon? been like 2 months and i'm dieing to use the fixed hud version =3
September 9th, 2009, 11:39 AM
FireScythe
Re: OpenSauce Post Processing
Not for a while, theres still a fair amount of work to be done on it, and I don't want to be putting out a version everytime something new is done, so there isn't a bunch of different versions floating around.
September 9th, 2009, 02:28 PM
supersniper
Re: OpenSauce Post Processing
I haz every version uh-oh they're floating around ;)
hey take your time mate.
September 13th, 2009, 09:22 PM
Warsaw
Re: OpenSauce Post Processing
Any chance we can have an option to toggle whether or not the effects apply on the HUD? I like the glow effect I get on the lines, since it makes it look more like a real HUD would.