PDA

View Full Version : [APP] OpenSauce Post Processing



FireScythe
June 30th, 2009, 06:20 PM
OS1 Post Processing
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
http://i362.photobucket.com/albums/oo66/TheFieryScythe/BLOOM.jpg
PP_Sketchy
http://i362.photobucket.com/albums/oo66/TheFieryScythe/Sketchy.jpg
PP_Sepia
http://i362.photobucket.com/albums/oo66/TheFieryScythe/Sepia.jpg


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.

>>Download Here<< (http://cid-d439194bef5aa58e.skydrive.live.com/self.aspx/Public/OS%20Post%20Processing%20Alpha%2008-11-09.zip)

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.


http://i362.photobucket.com/albums/oo66/TheFieryScythe/WarthogSmall.jpg


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.
http://i362.photobucket.com/albums/oo66/TheFieryScythe/rasterizer_rt_display0.jpg
1 - Shows you what is in the position output texture.
http://i362.photobucket.com/albums/oo66/TheFieryScythe/rasterizer_rt_display1.jpg
2 - Shows you what is in the velocity output texture. You'll need to have something moving to see something, Warthog tires will glow!
http://i362.photobucket.com/albums/oo66/TheFieryScythe/rasterizer_rt_display2.jpg
3 - Shows you what is in the normals output texture (between -1 and +1, so blackness will occur).
http://i362.photobucket.com/albums/oo66/TheFieryScythe/rasterizer_rt_display3.jpg
4 - Shows you what is in the normals output texture (between 0 and +1, so blackness won't occur).
http://i362.photobucket.com/albums/oo66/TheFieryScythe/rasterizer_rt_display4.jpg
-1 - All of the above, except 0.
http://i362.photobucket.com/albums/oo66/TheFieryScythe/rasterizer_rt_display-1.jpg


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.

shader_post_process
http://i362.photobucket.com/albums/oo66/TheFieryScythe/shader_post_process.jpg
shader_post_process_collection
http://i362.photobucket.com/albums/oo66/TheFieryScythe/shader_post_process_collection.jpg

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 (http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&displaylang=en) 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.

Roostervier
June 30th, 2009, 06:22 PM
Looks great, downloading. : D

Disaster
June 30th, 2009, 06:31 PM
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?

Roostervier
June 30th, 2009, 06:36 PM
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.

FireScythe
June 30th, 2009, 06:38 PM
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).

Oh, and the missing DLL is because you need the latest DirectX release (http://www.microsoft.com/downloads/details.aspx?FamilyId=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en).

StankBacon
June 30th, 2009, 06:54 PM
not working here, halo window opens and does nothing... no loading at all.

FireScythe
June 30th, 2009, 07:06 PM
Is there any sound? And what do you actually see, the halo startup screen?

Masterz1337
June 30th, 2009, 07:18 PM
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.

DEElekgolo
June 30th, 2009, 07:20 PM
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.

Masterz1337
June 30th, 2009, 07:38 PM
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.

jcap
June 30th, 2009, 07:43 PM
For everyone using this, because it uses the original release of OS, you MUST follow the troubleshooting tips in THIS THREAD (http://www.modacity.net/forums/showthread.php?t=16052).

StankBacon
June 30th, 2009, 07:46 PM
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.

DEElekgolo
June 30th, 2009, 07:49 PM
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.

FireScythe
June 30th, 2009, 07:58 PM
@ 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.

Heathen
June 30th, 2009, 08:07 PM
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.

StankBacon
June 30th, 2009, 08:31 PM
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.

FireScythe
June 30th, 2009, 08:45 PM
Hmm, try just without the motion blur. If it doesn't work then, it must be doing something your card isn't compatible with.

StankBacon
June 30th, 2009, 09:01 PM
works with motion blur disabled.

Saggy
June 30th, 2009, 09:09 PM
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?

FireScythe
June 30th, 2009, 09:10 PM
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.

Malloy
June 30th, 2009, 09:14 PM
Sorry where do I extract the two folders in the .zip to?

FireScythe
June 30th, 2009, 09:18 PM
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.

Malloy
June 30th, 2009, 09:47 PM
Oh thanks alot

ok after running i get the Missing DirectX file prompt. and after following


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).

Oh, and the missing DLL is because you need the latest DirectX release (http://www.microsoft.com/downloads/details.aspx?FamilyId=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en).

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.

DEElekgolo
June 30th, 2009, 10:35 PM
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?

Kornman00
July 1st, 2009, 05:13 AM
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.

FireScythe
July 1st, 2009, 09:40 AM
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.

Kornman00
July 1st, 2009, 10:36 AM
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.

FireScythe
July 1st, 2009, 01:36 PM
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

Syuusuke
July 1st, 2009, 07:24 PM
What the hell is an .iwd file?

StankBacon
July 1st, 2009, 07:26 PM
yah i think he uploaded the wrong thing or something :|

Syuusuke
July 1st, 2009, 07:32 PM
Yea he definitely did, it's a file for CoD...(you can open it as a zip)

FireScythe
July 1st, 2009, 07:58 PM
Ugh, filefronts done this before, upload something then the link goes somewhere completely different :S.
Download

t3h m00kz
July 1st, 2009, 08:31 PM
lol, I set the motion blur to 0.05.

TRIPPYYYYY

Heathen
July 1st, 2009, 09:00 PM
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.

FireScythe
July 3rd, 2009, 10:29 AM
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
(http://www.filedropper.com/opensaucepostprocessing_1)

Con
July 11th, 2009, 09:35 PM
I dont get this site; do I need an account? It just takes me to their homepage.

supersniper
July 12th, 2009, 12:42 AM
yeah...
someone mirror it please?

Roostervier
July 12th, 2009, 12:44 AM
I think they already deleted the content, because it used to work for me. I'll see if I can mirror the content.

e: http://wol.modacity.net/OpenSaucePostProcessing.7z

supersniper
July 12th, 2009, 01:49 AM
thanks.

FireScythe
July 12th, 2009, 10:51 AM
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.

FireScythe
July 13th, 2009, 01:03 PM
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.

OS Post Processing 13-17-2009 (http://cid-d439194bef5aa58e.skydrive.live.com/self.aspx/Public/OS%20Post%20Processing%2013-07-09.zip)

Higuy
July 13th, 2009, 02:43 PM
Is it possible to run another d3d9.dll and this one..?
Since I use Yelo, too.

supersniper
July 13th, 2009, 05:31 PM
Like Korn said you would have to compile them together.
or you could inject and just set yourself up for errors.

Masterz1337
July 13th, 2009, 05:35 PM
any pics of the fake HDR? Can't wait to try this out.

klange
July 13th, 2009, 05:38 PM
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.

supersniper
July 13th, 2009, 07:17 PM
If someone gave me a tut on how to do it. I'll gladly do it everytime.
I just need to be shown once and it's a go.

FireScythe
July 13th, 2009, 07:21 PM
any pics of the fake HDR? Can't wait to try this out.
Heres a gif of what it does, but this is very exaggerated so its easier to see.

http://i362.photobucket.com/albums/oo66/TheFieryScythe/Sequence03.gif

Futzy
July 13th, 2009, 07:31 PM
hmm

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
I was really hoping to try this out.

Sel
July 13th, 2009, 08:41 PM
Heres a gif of what it does, but this is very exaggerated so its easier to see.

http://i362.photobucket.com/albums/oo66/TheFieryScythe/Sequence03.gif

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?)

supersniper
July 13th, 2009, 09:15 PM
hmm

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: d3479214be82c50bf61f47f0ab02b54dI was really hoping to try this out.http://www.modacity.net/forums/showthread.php?t=16052

FireScythe
July 13th, 2009, 09:37 PM
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.

Limited
July 16th, 2009, 07:00 AM
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.

jcap
July 16th, 2009, 11:36 AM
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.

Syuusuke
July 16th, 2009, 11:41 AM
The strings.dll would have to be modified wouldn't it?

Kornman00
July 16th, 2009, 11:45 AM
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

Siliconmaster
July 16th, 2009, 11:51 AM
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.

FireScythe
July 16th, 2009, 11:58 AM
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.

Roostervier
July 16th, 2009, 11:59 AM
Nice job, it looks awesome : D

Limited
July 16th, 2009, 12:33 PM
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.

Siliconmaster
July 16th, 2009, 12:35 PM
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?

FireScythe
July 16th, 2009, 01:55 PM
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:

bool PostProcessingGlobal = true;
void Initialize()
{
Yelo::Scripting::global_definition* temp = GET_YELO_GLOBAL(post_processing);
temp->value = &PostProcessingGlobal;
}So would this no longer cause a conflict with anything else?


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:

PP_Bloom = 0
PP_ColorUpFilter4 = 1
PP_ColorBrightPass = 2
PP_ColorDownFilter4 = 3
PP_ColorCombine4 = 4
PP_ColorBloomV = 5
PP_ColorBloomH = 6

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.

DEElekgolo
July 16th, 2009, 01:59 PM
Would something like dof and screen fringe (http://en.wikipedia.org/wiki/Chromatic_aberration) be possible? Or possibly vignetting?

FireScythe
July 16th, 2009, 02:10 PM
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.

Siliconmaster
July 16th, 2009, 02:15 PM
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.

Pyong Kawaguchi
July 16th, 2009, 06:29 PM
Damn, I wish this was mixed with the 3p/fov app :S

FireScythe
July 18th, 2009, 11:43 AM
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.

Limited
July 18th, 2009, 12:30 PM
Oh that text block thing is sick :D Nice work.

DEElekgolo
July 18th, 2009, 12:40 PM
Also added a Vignette shader and my attempt at a simple Chromatic Aberration shader.
:downs:

kenney001
July 28th, 2009, 04:06 PM
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?

klange
July 28th, 2009, 04:31 PM
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.

FireScythe
July 28th, 2009, 05:13 PM
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.

kenney001
July 29th, 2009, 12:54 AM
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 (http://www.modacity.net/forums/showthread.php?t=16052) 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...

FireScythe
July 29th, 2009, 10:08 AM
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
http://i362.photobucket.com/albums/oo66/TheFieryScythe/pencilsketchportent.jpg
Refraction
http://i362.photobucket.com/albums/oo66/TheFieryScythe/refractionsnowtorn.jpg

Dwood
July 30th, 2009, 10:18 AM
doood. This is so epic. I can't believe itsssss

FireScythe
August 13th, 2009, 08:22 PM
If you understand the uses for this, you can have a cookie :neckbeard:.

http://i362.photobucket.com/albums/oo66/TheFieryScythe/Depth.jpg
http://i362.photobucket.com/albums/oo66/TheFieryScythe/Position.jpg

klange
August 13th, 2009, 08:28 PM
Ooh, depth mapping!

DEElekgolo
August 13th, 2009, 08:44 PM
:o!
DOF now!

Siliconmaster
August 13th, 2009, 08:56 PM
How would you use that data though to make DOF? :/

DEElekgolo
August 13th, 2009, 09:05 PM
The depth information can be used to control the intensity of blurring. Faking DOF.

FireScythe
August 13th, 2009, 09:45 PM
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.

Siliconmaster
August 13th, 2009, 11:01 PM
Well shit. That would be insane.

Roostervier
August 13th, 2009, 11:09 PM
wow, great work FireScythe

Con
August 14th, 2009, 09:00 PM
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?

FireScythe
August 15th, 2009, 06:00 AM
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.

Con
August 15th, 2009, 12:01 PM
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?

Masterz1337
August 15th, 2009, 12:26 PM
Amazing as always, can't wait to use this on OS2

FireScythe
August 18th, 2009, 04:37 PM
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:.

Donut
August 18th, 2009, 07:24 PM
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

FireScythe
August 18th, 2009, 07:39 PM
I would say its the 3rd person extension doing that as it has code that changes its behaviour when zoomed.

W1zard
August 19th, 2009, 02:31 AM
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:

Advancebo
August 19th, 2009, 06:05 AM
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.

boogerlad
August 19th, 2009, 05:52 PM
cookie.

Cortexian
August 28th, 2009, 06:38 AM
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.

FireScythe
August 28th, 2009, 08:28 AM
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.

FireScythe
August 28th, 2009, 07:39 PM
Success! No more messed up menus, hud or chat text :).
http://i362.photobucket.com/albums/oo66/TheFieryScythe/lookmanofuglyhud.jpg

Siliconmaster
August 28th, 2009, 08:31 PM
Sweet! Looks really nice. :D

W1zard
September 9th, 2009, 11:38 AM
any new RC anywhere soon? been like 2 months and i'm dieing to use the fixed hud version =3

FireScythe
September 9th, 2009, 12:39 PM
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.

supersniper
September 9th, 2009, 03:28 PM
I haz every version uh-oh they're floating around ;)
hey take your time mate.

Warsaw
September 13th, 2009, 10:22 PM
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.

FireScythe
September 14th, 2009, 04:00 AM
Don't see why not, the plan is to let effects take place either after the scene is rendered, after the hud is rendered or after the ui is rendered. Which should be changable in the shader itself.

Also, just a small update on the new tags, I can now read shaders from map caches' and apply them :). Still got to get extra bitmaps working though. Some shaders will still be external so that they can be tested and applied globally.

I've currently got two tags for post processing, shader_post_process and shader_post_process_collection. The first is where the shader code is and where your variables are defined, with the second referencing the first and having the effect definitions.

W1zard
September 14th, 2009, 04:25 PM
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.
If you like the glow effect for just certain parts of the hud:

http://t0.gstatic.com/images?q=tbn:oC68lGej4ZWbjM:http://elastique.com.au/web-design-blog/wp-content/uploads/2008/05/curve-glow-finalised.gif PHOTOSHOP, you can just edit it in, easier than editing the engine for a glow :-3

FireScythe
September 14th, 2009, 05:09 PM
Well, not really, considering you'd have to decompile all your maps and recompile them with the new bitmaps, which would be a silly thing to do :P.

FireScythe
December 8th, 2009, 07:41 AM
Alpha build in first post.

I need feedback on stability, performance, etc. as well as any visual oddities that haven't already been found. General opinions are good too :P.

I didn't put everything I could have in the first post so if you need to know anything feel free to ask.

Enjoy :downs:.

Jelly
December 8th, 2009, 02:08 PM
Is the FPS supposed to be locked at 25 or does it eat performance that much?

Dwood
December 8th, 2009, 02:21 PM
Oh btw why not just detect the settings of the globals. That way the person can just define the values in cheApe and change them dynamically.

FireScythe
December 8th, 2009, 02:36 PM
Is the FPS supposed to be locked at 25 or does it eat performance that much?
Just checked this out, open up shaders\PP_MotionBlur.fx and find 'int blurSamples = 48;' then change 48 to 16. Should boost your FPS somewhat (You'll still have a drop from your normal FPS though as it is an expensive effect).


Oh btw why not just detect the settings of the globals. That way the person can just define the values in cheApe and change them dynamically.
...what? I don't get what your refering to.

Dwood
December 8th, 2009, 03:14 PM
...what? I don't get what your refering to.

nvm

boogerlad
December 9th, 2009, 08:20 PM
since OS goes through some engine limitations, can we get some aa action?

Dwood
December 10th, 2009, 02:35 PM
since OS goes through some engine limitations, can we get some aa action?

Please, do explain. e: nvm he meant anti-aliasing

FireScythe
December 10th, 2009, 02:59 PM
since OS goes through some engine limitations, can we get some aa action?
Nope, i've tried in the past but Halo just doesn't like it. Plus, this isn't really breaking any limitations in the engine, it just adds to what is already there.

FireScythe
January 27th, 2010, 10:15 AM
Update 27\01\10
So, after the MASSIVE response from the last release i've changed\added\removed a bunch of code for another release :D.
>>Download<< (http://cid-d439194bef5aa58e.skydrive.live.com/self.aspx/Public/OS%20PostProcessing%2027-01-10.zip)

Included in this release:
The OS d3d9 DLL
Updated shaders
An example tagset of putting post processes into a map (damnation_pp)
An already compiled damnation_pp
Latest build of usertool
New tag definitions and tag_groups.map
Source

http://i362.photobucket.com/albums/oo66/TheFieryScythe/example.jpg

Changed:


All custom DxWrapper code has been moved to its own GBuffer component, which just smartens things up and makes more sense.
In the hopes of better performance the (now) GBuffer only outputs depth into a 32bit single channel floating point texture, with velocity and normals going into two, two channel 16bit floating point textures. The normals z value is no longer stored as it can be calculated on the fly.
There are no longer any changes made to halo's vertex shaders as the GBuffer now only uses two of its own vertex shaders. Also steps have been taken to reduce unneeded rendering whch should boost performance.
Motion blur now works best if its amount is left as 1.0
ZEnable, ZWriteEnable and StencilEnable no longer need to be set to false in the shader

Added:


All post process shaders now use a tesselated quad when rendered. External shaders use a 5x5 quad while internal shaders can have their quad defined in the shader_post_process_collection tag. This could theoretically increase performance, however it does mean that....
Shaders now require a vertex shader to function.
An addition which could be used for any OS endevour, not just post processing, is the os_bitmap tag. As reverse engineering Halo's bitmap loading system is beyond me i've take the route of creating my own simple bitmap tag which can store any texture type in most of the directX formats. The usertool build included provides the way of compiling your own os_bitmaps.
I've also added another tag to the set which is the shader_post_process_instance tag, which allows you to override values set in a shader_post_process tag without having multiple copies of your shader in the map cache.
Also added is a Post Processing menu option to the OS menu which allows you to toggle internal effects, external effects and motion blur.
The current HUD scale is now accessible at shader level so shaders that rely on the HUD can now scale appropriately.
The GBuffer normals now include BSP normal maps.

Removed:


The dodgy object velocity in the previous build has been removed until such a time that I know how to implement it properly.
All fake HDR code has been disabled as it sucks ass. Might be put back in if I can think of a better way of doing things.

Fixed:


The HUD can now be disabled with no ill effects.
Alpha tested models (trees/bushes/etc) now render to the GBuffer correctly.
For render points 0-2, the black flash when picking up active camouflage is gone.

TODO:


In the shader_post_process_collection tag, effects now have "not active when zoomed" and "not active when in a vehicle" flags but these have not been implemented yet.
Find a pointer to the current far clip distance and expose the value to shaders.

As a side effect of using my own vertex shaders for the GBuffer rather than adding code to Halo's shaders, i've decided to expand the shader replacement code so that you can edit the shaders externally. I've decompiled and saved all of Halo's vertex and pixel shaders, which you can edit and recompile with usertool. This will create two files, "vs_replacements.vsr and "ps_replacements.psr" which will be read by this build of OS and replace Halo's shaders with your edited ones. It's a bit experimental but it should work fine. Halo's pixel and vertex shaders are >>here<< (http://cid-d439194bef5aa58e.skydrive.live.com/self.aspx/Public/Halo%20Shaders.zip). Just extract the folders into the shaders folder if you want to edit them.

Pyong Kawaguchi
January 27th, 2010, 11:21 AM
Cool.
now just add the FOV hack and I'll download this :P

Siliconmaster
January 27th, 2010, 11:24 AM
Nice work. I only understand about half of your post, but I can imagine the amount of work that you put into this project. :)

Kornman00
January 27th, 2010, 12:00 PM
Find a pointer to the current far clip distance and expose the value to shaders.
I actually have the render frustum near and far documented already, I just didn't include it in the public code (due to something it was being used for). I might be able to work something out for you though

I'll take a look at this stuff here in a little while :)

Dwood
January 27th, 2010, 01:44 PM
With your bitmap thing... Let's make a custom widget tag so we can have custom-resolution widgets... and make a better ui.map file. (have an include folder for bitmaps of each map so we can see pictures of them mb mb?) Writing up ideas and how that would work for that now.

Also, I think, in order to simplify things we should consider combining our two Open Sauces so people can use both yours and my Open Sauce at the same time. (Could produce some seriously neat things with that :D)

Downloading to take a look at it now.

Jelly
January 28th, 2010, 02:40 PM
it seems that when I run Halo with the usertool executable in my root folder, Halo will throw an exception error. When I rename the usertool to a non-executable file then Halo will start fine but all the textures except flags and some wall markings are completely black. When I then try to run pp_load it gives me an exception error.

This does not occur when open sauce is disabled.

EDIT: Seems it was caused by motion blur. Setting motion_blur_enabled 0 fixed it, but I obviously don't have any motion blur.

Dwood
January 28th, 2010, 08:22 PM
I had the same problem as Jelly.

I'm trying to change the pp effects referenced in the shaders reference file but when I load/unload it's only loading bloom

FireScythe
January 28th, 2010, 09:20 PM
I'll have a look into the motion blur problem. Out of interest what graphics card do you have?

Also, you can turn things on and off in the yelo menu (F7). You don't have to use the console unless your changing your effects file while in game :downs:.


I'm trying to change the pp effects referenced in the shaders reference file but when I load/unload it's only loading bloom
Make sure you are changing the Count value, and putting the correct index in the brackets when adding/removing effects.


[Effects]
Count: 3 <<< ding ding!
[0]
Name: DOF
Indicies: 2
Render Point: 2
[1]
Name: VISR
Indicies: 1
Render Point: 2
[2] <<< ding ding!
Name: Bloom
Indicies: 0
Render Point: 2

Dwood
January 29th, 2010, 06:47 AM
Lol yeah. :P you need a better way of declaring the active post-process effects so people can manipulate them more actively... like being able to disable an individual effect or something like that.

E: I'm running an ATi 4850

FireScythe
January 29th, 2010, 06:59 AM
The ingame switcheroo isn't meant for constant toggling of effects, it's there to 1) provide global effects that are set once and used all the time, and 2) provide a testbed so that developers can rapidly test their shaders without having to recompile their maps and restart Halo for every tweak.

Jelly
January 29th, 2010, 08:26 AM
ATI 4850 here as well.

Dwood
January 29th, 2010, 01:31 PM
The ingame switcheroo isn't meant for constant toggling of effects, it's there to 1) provide global effects that are set once and used all the time, and 2) provide a testbed so that developers can rapidly test their shaders without having to recompile their maps and restart Halo for every tweak.

Considering we do have to turn off halo (pp_unload and then changing the settings file's effects, then typing pp_load doesn't work) it's still a lot of work just to add a simple change in the effects that a person wants to have displayed... I also see a possible implementation of my numpad thing with PostProcessing so we can possibly disable and enable individual effects. In fact, I think I'm going to add my numpad to PP so I can use both.

I can already think of some sick sp levels that combining my little thing with Post-Processing would work amazingly with.

Also, my problem with motion blur isn't related to Usertool at all. Just the effect itself.

e: Oh and there's some other stuff I didn't mention.

FireScythe
January 29th, 2010, 03:05 PM
What happens when you pp_load? If your previous effects return then there's something wrong in your settings file, in which case post it up and lemme see.

Dwood
January 29th, 2010, 05:34 PM
Nvm, it works just fine. I think that it's just one shader takes precedence over another some times.

Pyong Kawaguchi
January 29th, 2010, 06:45 PM
Is there any chance of an FOV hack being enabled as well with this?

FireScythe
January 29th, 2010, 08:49 PM
Do you mean changing your FOV? Because thats a default part of OS2, accessible by pressing F7 ingame.

Dwood
January 29th, 2010, 11:01 PM
Do you mean changing your FOV? Because thats a default part of OS2, accessible by pressing F7 ingame.

Perhaps he wants a 3p view in OS.

jcap
February 1st, 2010, 12:21 AM
First thing that would need to be fixed is the third person targeting...

FireScythe
February 4th, 2010, 07:42 AM
I'm considering adding 4 more blocks to the shader_post_process and instance tagsso that float2/3/4 values can be changed in the tag rather than in the code, but this would break any current shader_post_process tags that are around. So, if anybody has any desperate need to save their shader (if say, you've compiled your shader and no longer have the source) then let me know, and I can whip up a quick conversion program.

Kornman00
February 4th, 2010, 10:18 AM
Something you could easily do is just export the tags, add blank tag block fields (eg, their name plus zero count) for those 4 new tag blocks, then reimport. vola

FireScythe
February 4th, 2010, 12:22 PM
That works ok for all the basic tag fields but it doesn't export the text/binary data. Shouldn't be a problem tbh, as long as the shader hlsl code is backed up somewhere.

FireScythe
February 6th, 2010, 12:48 PM
Update 06\02\10
New build with stuff in it :neckbeard:.
>>Download<< (http://cid-d439194bef5aa58e.skydrive.live.com/self.aspx/Public/OS%20Post%20Processing%2006-02-10.zip)

http://i362.photobucket.com/albums/oo66/TheFieryScythe/redpain.jpg

Changed:


Error messages when loading shaders will now only show in devmode.
The base post process code is now a bit more generic, with the motion blur and internal/external shader systems acting more like add ons.

Added:


New fields have been added to the shader_post_process and instance tag to allow setting of float2/3/4's in the tag.
Now that custom functions are working i've added 5 new ones. Although sapien crashes when compiling scripts while custom functions are present, so no real use yet.
The shader version of every shader is now checked, so that if an effect uses a shader version beyond what the graphics card supports it won't be used.
Internal effects can now be faded in and out with the new functions mentioned previously.
Dynamic floats can now be a random value.

Fixed:


Zoom and vehicle restrictions for internal shaders are now implimented.
Black screening now only occurs for shaders using render point 4 (post menu). Might end up just removing this render point.

I've messed around with the motion blur, in the hope that it will now work for those who had problems previously so i'd like to know if that problem still occurs.

The new functions that have been added are as follows:


pp_set_effect_active - Turns an effect on or off.
pp_set_effect_fade - Sets an effects fade amount. Can be set to fade over time.
pp_get_effect_index_by_name - Get the index of an effect by searching for its name. Case sensitive.
pp_get_effect_current_fade - Gets the current fade amount of an effect.
pp_get_effect_is_valid - returns true if an effect is ok to use, otherwise false.

The included damnation_pp now has an effect called "Red Pain" which is disabled by default, and will be disabled when zoomed or in a vehicle. Other effects will be disabled when in a vehicle. Just there to play around with the new functions and restrictions.

Dwood
February 6th, 2010, 01:02 PM
Someone should just make an external hs compiler that checks for syntax or has an external definitions file.

Jelly
February 6th, 2010, 05:18 PM
You seem to have linked to the usertool zip file FireScythe.

FireScythe
February 6th, 2010, 06:25 PM
Whoops, so I did. Fixed.

Jelly
February 7th, 2010, 07:47 AM
Motion blur still gives me a black screen, and I had to remove my old yelo settings files after installing the new version because Halo kept exceptioning on startup.

Con
February 7th, 2010, 09:53 PM
I also get the black screen, but I found out I can just press F7 then bring up the FOV changer and it goes back to normal.

Kornman00
February 8th, 2010, 12:54 AM
I also get the black screen, but I found out I can just press F7 then bring up the FOV changer and it goes back to normal.
Uhhhh, Fire, did you include the fov/settings fix in this? The one where it fixed the bug where it would initially set the FOV to some lolvalue basically making it as if the player was zoomed in 100000000x?

Siliconmaster
February 8th, 2010, 12:55 AM
Uhhhh, Fire, did you include the fov/settings fix in this? The one where it fixed the bug where it would initially set the FOV to some lolvalue basically making it as if the player was zoomed in 100000000x?

Oh, so that's what that was. Heh. I'd forgotten about that bug.

FireScythe
February 8th, 2010, 07:57 AM
Uhhhh, Fire, did you include the fov/settings fix in this? The one where it fixed the bug where it would initially set the FOV to some lolvalue basically making it as if the player was zoomed in 100000000x?
I was sure I had :ugh:, and i can't repro that bug here. It was just removing a redefinition of an int32 and removing the default setting intialisation from Initialize() wasn't it?
E: In CameraFov.inl that is.

Pyong Kawaguchi
February 12th, 2010, 03:26 PM
Still gives the black screen as well.

Choking Victim
February 12th, 2010, 03:30 PM
Nvm, Firescythe knew the error I stated.

Pyong Kawaguchi
February 12th, 2010, 03:35 PM
I don't really know how to compile dll's, would you mind uploading any changed files?
Also, how exactly do you load the effects?
I tried pp_set_effect_active pp_visr and it did nothing.

FireScythe
February 13th, 2010, 09:01 AM
Still gives the black screen as well
It's been established that this is an old FOV bug, where you go ingame and change your FOV to fix it.

I don't really know how to compile dll's, would you mind uploading any changed files?
Also, how exactly do you load the effects?
I tried pp_set_effect_active pp_visr and it did nothing.
The most recent DLL is included in the last build. To set up external effects you edit the PostProcessingSetting.txt to add an effect that uses the PP_Visr shader. Like so:


[Shaders]
Count: 13
[0]
Name: PP_Bloom
[1]
Name: PP_VISR
[2]
Name: PP_DOF
...Other shaders...

[Effects]
Count: 3
[0]
Name: DOF
Indicies: 2
Render Point: 2
[1]
Name: VISR
Indicies: 1
Render Point: 2
[2]
Name: Bloom
Indicies: 0
Render Point: 3
After saving the settings file you can either restart Halo or open the console and use "pp_unload" then "pp_load" to reload all external post processes using your edited settings file.

The halo script/console commands for changing effects can only be used with maps that have tag based effects compiled into them, such as the damnation_pp map included in the most recent build.

I should point out that apart from the bloom shader (which you would typically want to be always on), the other shaders included are only really meant to show what kind of things can be done using the post processing extension so that map makers can see what they can do with their maps. Although, in the case of the VISR effect, that would be better suited as a coded subsystem to allow more control than Halo script would allow.

Pyong Kawaguchi
February 13th, 2010, 09:32 AM
Will there be a way to load specific Pp shaders without them being in the map itself in the future, via console.

e: I'm using the latest build and changing the FoV did nothing to get rid of the black screen.

FireScythe
February 13th, 2010, 10:36 AM
I have no plans to put console commands in to manipulate external effects myself, since I only intended for them to be used as always on effects and as a quick tesbed for developing internal map effects. Though saying that, if someone else was to add such commands to turn external effects on and off in future I have no problem with that.

If anybody's interested, shaders aren't applied directly to the scene, they are applied through an effect object that can have a chain of upto 32 shaders to create more complex results, which means that a command to toggle en external effect would still require the effect to be defined before hand in the settings file. Applying individual shaders such as PP_VISR.fx on the fly would be ill advised.

As far as the black screens concerned......:gonk:.

Pyong Kawaguchi
February 13th, 2010, 11:01 AM
Im using the HD5850 as my gpu, I wonder if they process motion blur differently?

Dwood
February 14th, 2010, 09:03 PM
ATi 4850. Perhaps you're using something in the motion blur that is Nvidia specific? idk what though.

FireScythe
February 20th, 2010, 10:40 AM
I need to determine whether it's specifically the motion blur thats the problem, or if its the render point that is the problem. So if someone with the problem could do the following that would be helpful :).

1. Download >>this<< (http://cid-d439194bef5aa58e.skydrive.live.com/self.aspx/Public/blur%5E_test.zip) and extract the two files into your shaders directory (its a settings file and a red tint shader). Backup your settings file if needs be.
2. Start up halo and turn off motion blur using "pp_motion_blur_enabled 0" in the console.

If the screen is tinted red then it's a motion blur specific problem, if it stays black then its a render point problem.

jcap
February 20th, 2010, 10:59 AM
Any way to create a 3D effect with your knowledge? I know the official stereoscopic way is to render a left and right eye image into one frame, which I'm not sure if OS would be capable of. However, I wonder if you might be able to use your depth perception techniques to create a "ghost" of all objects on the screen, which would then be colored red or blue for the left or right eye. The "ghosts" would have their offsets from the original objects determined by the distance from the player. And hey, no specialized hardware required!

This is probably a longshot because I don't even know if ghosting every piece of geometry at different sizes and offsets would work, but I thought I'd throw this idea out there. There is a graphics driver available for 3d that you need to buy to use, and I'm not even sure just how stable it is compared to real official drivers.

3D driver: http://www.iz3d.com/compatible

http://www.youtube.com/watch?v=frL7rKyNQIg&hd=1

http://www.youtube.com/watch?v=RYtb38mXk_A&hd=1

Con
February 20th, 2010, 11:20 AM
I think you'd have to render the scene twice from two viewpoints then merge them together into the 3d effect.

FireScythe
February 20th, 2010, 12:03 PM
Actually, I don't think it would be that difficult. Rendering the scene twice is easy, just catch each draw call, draw the geometry for the left eye, set the render target to a different one and draw the geometry for the right eye. Once rendering is done, use a post process to take the two images and create the 3D image. The only difficult bit would be changing the world view projection used to render the geometry to create the two different eye positions (which is put into vertex shader float4 constants c0 to c3).

CrAsHOvErRide
February 20th, 2010, 12:18 PM
You mean calculate the new projection point or set it? Because calculating is easy.

FireScythe
February 20th, 2010, 12:23 PM
I mean the calculations (i'm not particularly good with math). Getting and setting the WVP is simple.

CrAsHOvErRide
February 20th, 2010, 01:15 PM
Well calculating should be easy (if an angle is given). Vector..Skalar Product to project a second vector via an angle, done.

Dwood
February 20th, 2010, 01:24 PM
Have you attempted to enable bump maps on things other than the bsp at all? oh and ill test your debug thing tomorrow.

FireScythe
February 20th, 2010, 03:34 PM
I have and as far as I can tell, even though a non BSP model can use shader_environment shaders the game does not put the normal map from the shader into any texture sampler, unlike for BSP's where sampler 0 has the normal map in it. Therefore i'm guessing it would require alot of work to first get the textures needed available to the shaders, and then a rewrite of ~115 pixel shaders to correctly use it, without breaking each shaders intended functionality (colour masking, self illumination, etc.). This is purely speculation though.

FireScythe
February 23rd, 2010, 01:09 PM
I need to determine whether it's specifically the motion blur thats the problem, or if its the render point that is the problem. So if someone with the problem could do the following that would be helpful :).

1. Download >>this<< (http://cid-d439194bef5aa58e.skydrive.live.com/self.aspx/Public/blur%5E_test.zip) and extract the two files into your shaders directory (its a settings file and a red tint shader). Backup your settings file if needs be.
2. Start up halo and turn off motion blur using "pp_motion_blur_enabled 0" in the console.

If the screen is tinted red then it's a motion blur specific problem, if it stays black then its a render point problem.

Would someone mind doing this please? It would help narrow down the problem.

Pyong Kawaguchi
February 23rd, 2010, 01:38 PM
I'll do it now.
e: screen was completely red for both times, but when I alt tabbed and alt tabbed in, it became an overlay, rather than just red.

FireScythe
February 23rd, 2010, 02:39 PM
And so the plot thickens...thanks for the help, from the sounds of it there's something wrong with the texture input to the shaders, since the red shader has nothing to do with the motion blur area. You say that alt tabbing out then in caused the scene to reappear tinted? So in theory if you turn on motion blur at that point it *should* work (if you try this and its hard to tell, put the motion blur amount to something crazy "pp_motion_blur_amount").

Pyong Kawaguchi
February 23rd, 2010, 03:22 PM
I alt tabbed back into the game with motion blur enabled and it didn't change anything.

FireScythe
February 25th, 2010, 11:08 AM
Update 25\02\10
Another day...another build.
>>Download<< (http://cid-d439194bef5aa58e.skydrive.live.com/self.aspx/Public/OS2%20PostProcessing%2025-02-10.zip)



Changed:


GBuffer shaders are now compiled into a single, uneditable file.
Post process fading shader is now compiled into an uneditable file.
Replacement shader files now have the .shd extension.
The above mentioned files all have the same reusable file format.

Added:


Created a generic file format that is used for GBuffer shaders/replacement shaders/etc. and can be used for any data storage purpose. Usertool creates files with this format.
Depth texture is now put into texture sampler 7 so that edited pixel shaders can use it.

Fixed:


Render point 4 no longer has black screening when picking up active camo.
Normal maps are now correctly used in the GBuffer normals (was previously just adding them, rather than multiplying by a Tangent:Binormal:Normal matrix).

Todo:


Add far clip distance to shaders.
Fix motion blur black screening (if still present).
Fix black screen flash when turning on the flashlight at full power in single player :S.
Fix massive velocities when camera view changes.
Fix inverted normals on backfaces (tree leaves).
Fix dodgy normals and alpha testing on old hardware.
*Optional* Figure out how to write shader compile errors to the console.

I've included edited effect vertex shaders that pass their screen depth to the pixel shader, so that soft particles can be made possible. I've also included some rewritten pixel shaders to create soft particles, however they are not perfect and they will effect all particles that use them, so some particles that are meant to be solid will also be made soft . They have not been compiled though, so whether you use them or not is up to you :downs: (i'm also not going any further with this so don't go expecting improvements).

Pyong Kawaguchi
February 25th, 2010, 07:01 PM
Motion blur still gives a black screen.

Dwood
February 27th, 2010, 07:26 PM
Finally get to test and its red for me too.

For those trying to use OS_Postprocessing in their OS project, you're going to want to add to MacrosCpp.hpp at the end of it:



#ifdef SAFE_RELEASE
#define SAFE_RELEASE(p) {if(p) { (p)->Release(); (p) = NULL; }}
#endif


I'd let//make scythe post it but he''s not available right now for me to spam on aim.


This needs a double post. apparently its turning all textures black as when i charge a weapon i see the light and the fp outline. lights and anything thats not scenery basically give this effect. i also see the outline of the bsp etc that way. hth.

Edit: It also seems that damnation_pp's sketchy effect no longer works with your newer builds of OS_PP?

Ex2: Nvm. I had the wrong version.

Also, I have an idea for a super bloom- Is it possible to, say, have a massive bloom when a person walks out from a dark area (that has only minimal bloom because of how dark it is), and then it fade into a normal bloom? If that's possible, then could we add another layer on top of it where close up is super-bright and then that bloom lowers in intensity based on the physical distance of the player from sources of light? Ex3- its cussing at me everytime i use pp_load

ex3

Now that i have my own build ill look for a way to isolate the blur error. Ideas are appreciated. And look for some shader tutorials as well.

FireScythe
February 28th, 2010, 11:41 AM
This needs a double post. apparently its turning all textures black as when i charge a weapon i see the light and the fp outline. lights and anything thats not scenery basically give this effect. i also see the outline of the bsp etc that way. hth.

Thats because render point 0 and 1 (where motion blur and the red test shader were set to render at) is before the alpha blended meshes are rendered, so lens flares, explosions, glass etc is rendered on top of the black screen.


Also, I have an idea for a super bloom- Is it possible to, say, have a massive bloom when a person walks out from a dark area (that has only minimal bloom because of how dark it is), and then it fade into a normal bloom? If that's possible, then could we add another layer on top of it where close up is super-bright and then that bloom lowers in intensity based on the physical distance of the player from sources of light? Ex3- its cussing at me everytime i use pp_load

Thats essentially what the old fake hdr (now removed) subsystem did. Scaling down the scene to 1x1 to get the average luminosity then increasing or decreasing the brightness over time to the prefered level. The brightness is picked up by the bloom shader and bloom is applied accordingly. Depth is available to shaders so i don't see why you couldn't have more bloom on a close up, but you'll have to try it for yourself, thats why its open source :eng101:. If you get error messages when you pp_load theres a broken shader.

TROOPER
March 1st, 2010, 01:51 PM
Makes halo run slower than usual but works :P

CrAsHOvErRide
March 9th, 2010, 01:50 PM
Maybe we can work on this together if you want to make Halo display anaglyphically (3D effekt). Making 2 renders of one scene and overlaying them in Red and Cyan. Would that be possible?

Dwood
March 9th, 2010, 02:01 PM
If possible, stay away from the color change method, it gives me a headache. :downs:

CrAsHOvErRide
March 9th, 2010, 02:21 PM
...it's necessary for the 3D effect

FireScythe
March 9th, 2010, 03:44 PM
Personally, I don't see the appeal of 3D with coloured glasses (It's never looked right to me) so it's not something i'd take on as a project, plus I don't think it would be compatible with my post processing extension since everything (rendering to the gbuffer, applying post processes) would have to be done twice and it's already creating quite a framerate drop as it is :(. I do think its possible however.

Kalub
March 13th, 2010, 03:01 AM
I honestly wouldn't bother with the colored 3D.

FireScythe
April 20th, 2010, 05:52 PM
Bit of a slap and dash test update here. I've tried to figure out the motion blur black screen shit so here's a test build for those who have the problem. If it still occurs (I wouldn't be suprised :gonk:) then i'm just going to have to disable it on ATI cards, not something I want to do obviously, but i'm out of ideas as to the cause.

If you try this build you may notice a new menu system hidden away in the F7 key, it's something I've been cooking for a little while, but it's largely untested. There's seperate menus for the main menu, in-game and pause menu, nothing fantastically interesting on them and nothing is certain to stay, but there's a version changer in the main menu if you want to peruse 1.00 - 1.09 servers. Also, it replaces the original OS ingame menu, so you'll lose it's functionality for the time being.

Another new thing is another (yes now 4, imma go drain your performance some more) gbuffer texture available to shaders that provides information on what type of object a mesh is (scenery, device machine, etc) and what team it is on, which allows things like this to be done (which isn't included btw):
http://i362.photobucket.com/albums/oo66/TheFieryScythe/Visr_Sweetness.jpg

So here's your >>Download<< (http://cid-d439194bef5aa58e.skydrive.live.com/self.aspx/Public/OS%20Post%20Processing%20V2%20Test.zip). If you have problems let me know as soon as possible please :allears:.

Disaster
April 20th, 2010, 05:54 PM
Thats awesome.

Roostervier
April 20th, 2010, 06:01 PM
motion blur works for me, and i have an ati card. :X

don't disable it!

also, liking this so far, although i get terrible fps unless i run at 800x600 :\

Limited
April 20th, 2010, 06:36 PM
That is sick, great job.

Con
April 20th, 2010, 06:37 PM
I've also noticed a hit in performance, but it's acceptable and definitely worth it. I love you FS.

Dwood
April 20th, 2010, 09:27 PM
Yeah MotionBlur still doesnt work on my card. I'm going to invert the color and see if I can see if it's actually blurring.

Roostervier
April 20th, 2010, 09:35 PM
realised im using an 09 version that had motionblur, so i dont know if the 2010 version motionblur works or not. hope it does though, its a nice effect. i dont know if this has been explained or not, but could you explain how to add or take away certain post filters? if its been posted, could i have a link?

Kornman00
April 21st, 2010, 04:05 AM
Hehehehe, nice vision mode 8)

Damn I wish I had a computer which could run shit like this :(. Just a few more months

FireScythe
April 21st, 2010, 04:32 AM
Yeah, performance is my biggest issue with it to be honest. It's probably down to some lack of experience on my part :v:. At the moment, depending on how many render targets your card supports it will render up to 4(!) extra passes for each mesh excluding alpha blended meshes, which is quite a performance hit. If I could integrate the rendering better into the engine so that halos shaders do most of the work for me that would help, but doing that without breaking something else would be difficult :P.

Choking Victim
April 21st, 2010, 10:53 AM
Another new thing is another (yes now 4, imma go drain your performance some more) gbuffer texture available to shaders that provides information on what type of object a mesh is (scenery, device machine, etc) and what team it is on, which allows things like this to be done (which isn't included btw):
If you change an objects mesh type to bsp while it has an environment shader, does the game exception? If not, do normal maps work on the object?

Con
April 21st, 2010, 12:33 PM
Looks like you fixed how weapons were blurred if you walked against a wall? Neato.

Disaster
April 21st, 2010, 05:33 PM
If you change an objects mesh type to bsp while it has an environment shader, does the game exception? If not, do normal maps work on the object?

o_O

Choking Victim
April 21st, 2010, 05:43 PM
I'm hoping it's that simple. Would you mind telling me where that mesh type enum is located firescythe? I'd like to test out that theory.

DemonOne
April 21st, 2010, 06:01 PM
I have an ATI Radeon 4870, motion blur doesn't work for me (black screen)
Anyway, I fail to see any other effects.

Con
April 21st, 2010, 07:52 PM
Question: Why wasn't the updated VISR included? I'd really like to use it.

edit: also soft particles, how can I enable those?

FireScythe
April 22nd, 2010, 07:59 AM
If you change an objects mesh type to bsp while it has an environment shader, does the game exception? If not, do normal maps work on the object?

I'm hoping it's that simple. Would you mind telling me where that mesh type enum is located firescythe? I'd like to test out that theory.
BSP isn't rendered as an object so there is no enum option to set an object to to render it as BSP. Getting normal maps on objects is going to at least require editing of all the model pixel shaders and possibly all model vertex shaders, as well as making some way of getting a normal map into a texture register for the pixel shaders to access. Which theoretically wouldn't be too difficult but ideally it would use .bitmap tags, for which getting a directX texture from hasn't been found yet.

Question: Why wasn't the updated VISR included? I'd really like to use it.
edit: also soft particles, how can I enable those?
Didn't included it because I was rushing to get this test build out for the motion blur. I'll post it up when I get the chance :). For the soft particles you just have to compile the custom vertex and pixel shaders supplied with the previous build using usertool. They're just a demonstration though so they do have some problems.


I have an ATI Radeon 4870, motion blur doesn't work for me (black screen)
Anyway, I fail to see any other effects.
Looks like motion blur will be default disabled for ATI cards :(.
If you've only got the test build then there are no other effects to apply, since that is supposed to be dropped into a setup that already has everything from the previous build.

Kornman00
April 22nd, 2010, 10:11 AM
Which theoretically wouldn't be too difficult but ideally it would use .bitmap tags, for which getting a directX texture from hasn't been found yet.
The hardware format (which, in this case, would be a reference to a ID3DTexture or w/e the interface is called) data is stored in the bitmap_data_block itself. I'm not sure of the field offset off hand but the tag system treats it as padded fields (since it doesn't need to know about it as it's runtime related). Not too trivial to get, but you'd have to make sure it's loaded by the engine via a look up in the 'pc textures' data array. I don't think I included the address definitions for that (nor the 'pc sounds' data array for that matter)

Choking Victim
April 22nd, 2010, 10:33 AM
The "pc texture cache" pointer is at 0x6473A0, the "pc sound cache" pointer is at 0x647390, is there any hope of integrating these in the next release of OS? The hardware format data korn is talking about would be one of the last few padding values in the "bitmaps" block after the pixels offset field.

EDIT: The field offset you're looking for is 0x28 in the bitmaps block. I believe this is the address of the ID3DTextureinterface you're talking about korn.

FireScythe
April 22nd, 2010, 12:00 PM
Hmm, i'll take another look at that then, because if I can do away with the os_bitmap tag that would make things a bit more mapping friendly.

Con
April 22nd, 2010, 01:27 PM
For the soft particles you just have to compile the custom vertex and pixel shaders supplied with the previous build using usertool.
"loading shaders
no shaders to write"

:ugh:

FireScythe
April 22nd, 2010, 04:10 PM
EDIT: The field offset you're looking for is 0x28 in the bitmaps block. I believe this is the address of the ID3DTextureinterface you're talking about korn.
Indeed :D. from the end of pixels_offset there is:

uint32 for something
datum_index handle for the bitmap tag
datum_index for the texture cache data (im guessing)
IDirect3DBaseTexture9* directX texture
uint32 for something else

But the methods for getting the directx texture created and destroyed is still needed. I'm looking for it but its not my forte.

"loading shaders
no shaders to write"
You need to have the ps_replacements and vs_replacements folders from >>here<< (http://cid-d439194bef5aa58e.skydrive.live.com/self.aspx/Public/OS2%20PostProcessing%2025-02-10.zip?wa=wsignin1.0&sa=370326247) in your shaders folder (the same file structure in the archive).

Also, >>VISR<< (http://cid-d439194bef5aa58e.skydrive.live.com/self.aspx/Public/PP%5E_VISR.fx).

Pyong Kawaguchi
April 22nd, 2010, 04:38 PM
I really want motion blur :rage:

Choking Victim
April 22nd, 2010, 05:18 PM
But the methods for getting the directx texture created and destroyed is still needed. I'm looking for it but its not my forte.
Glad I could help. As for the functions that create/destroy the textures, perhaps korn can give you a hand with that one. I watched a few of the functions when i loaded/unloaded the map and had a few candidates, but I really know close to nothing about the rendering side of the engine, so it's hard for me to reverse engineer something like this.

Con
April 22nd, 2010, 05:32 PM
They're already there :\

http://img697.imageshack.us/img697/9453/idklolu.png

FireScythe
April 22nd, 2010, 05:53 PM
Out of date usertool. I think v1.01 used a different extension for the shaders, v1.03 uses .sasm and .hlsl.

Roostervier
April 22nd, 2010, 06:27 PM
no one really answered my question... how do you make certain shaders load by default? i've looked around and messed with the shader list but changing it never changed anything for me.

Con
April 22nd, 2010, 06:44 PM
Thanks, I was able to compile them and there's a ps_replacements.psr file in shaders now. However, I couldn't see any change ingame; you can see where the smoke particles intersect the ground.

edit: rooster,

[Shaders]
Count: 2
[0]
Name: PP_Bloom
[1]
Name: PP_VISR

[Effects]
Count: 2
[0]
Name: Bloom
Indicies: 0
Render Point: 3
[1]
Name: VISR
Indicies: 1 <------ the index of the wanted effect in [Shaders]
Render Point: 3

FireScythe
April 23rd, 2010, 04:00 AM
You need to compile the vertex shaders as well. The vertex shaders pass the vertex depth to the pixel shader to compare it against the depth of the rest of the scene from the gbuffer and fade the particle when it gets close to another surface.

Con
April 23rd, 2010, 12:28 PM
http://img291.imageshack.us/img291/7959/0screenshot00.jpg

FireScythe
April 23rd, 2010, 12:45 PM
How does the plasma grenade explosion look?

Con
April 23rd, 2010, 01:12 PM
It's the same. Same with tank, rockets, fuel rods.

FireScythe
April 23rd, 2010, 03:13 PM
Don't know then :confused2:. Can't spare the time to look into it right now, so i'd advise starting over, from downloading the zip again.

Cool news! Found the function that initializes .bitmaps in the cache and creates the Direct3D texture :). Resides at 0x445070 and requires 3 arguments (bitmap_data_block* in eax, bool AddToTextureCache and bool CreateD3DTexture pushed prior to calling). Got it set up in my post processing code and looks to be working fine so far.

Kornman00
April 24th, 2010, 09:30 AM
Added code to support requesting bitmaps and sounds (added tag definition structs for them too, since the functions take tag related data). Have nothing to use for testing it all though

FS: for user tool, I'm referencing the code in that 3-23 posting. If you want me to use a different set just email it to me

nvm, it's passworded lol

CodeBrain
May 2nd, 2010, 04:44 PM
After talking to FireSythe to which seemed like 30 minutes of trial and error, I could not get this thing to work at all.

Results were either a black screen with lights, black screen with only HUD showing, and a total black screen, meaning nothing appeared at all.

The main thing me and Fire were trying to do was make it so the VISR would work. Out of all the things we tryed a blue outline did not show on one of Bloodgulch's warthogs.

I mostly blame myself for the problem, since Fire made it himself and its working fine for him, guess I must of did something wrong that me and him cant possibly figure out.

FireScythe
May 2nd, 2010, 07:44 PM
Ok, so i've got something for the black screening ATI peeps. Open up the \shaders\PP_MotionBlur.fx file and go all the way to the bottom. Then change the "vs_1_1" to "vs_3_0" and save it. Then, make sure you are NOT using vidmode (since that can cause the FOV black screen bug) and open up Halo. Disable the internal and external post processing systems by setting pp_external_post_processes_enabled and pp_internal_post_processes_enabled to false and make sure motion blur is on by setting pp_motion_blur_enabled to true and setting pp_motion_blur_amount to 1.0. Then go run around a level.

The reason for this vs_1_1 change is that apparently you can't use vertex shader models below 3.0 with pixel shader model 3.0. The released motion blur uses vertex shader model 1.1 with pixel shader 3.0 and therefore shouldn't work, and nVidia cards don't seem to mind but newer ATI cards do. If when you turn on your external and/or internal shaders you screen goes black again, it may well be that the other shaders you are using (looking at YOU PP_VISR.fx :cop:) have the same issue and also need editing. Thats if this makes any difference of course :v:.

Warsaw
May 3rd, 2010, 01:43 AM
That's because Shader Model 1.1 was an nVidia specification, and shader model 1.4 was the ATi one. At the time they were created, nVidia's architecture and software couldn't handle the shader spec at the same level as ATi, so they split SM1.0 into SM1.1 (nV) and SM1.4 (ATi). I guess they removed support for the nVidia spec in the newer ATi cards because it was inferior for its time anyways, let alone today.

E: Were ATi cards ever capable of rendering SM1.1 anyways?

FireScythe
May 3rd, 2010, 06:25 AM
Well most of the post processing shaders use VS 1.1 and PS 2.0, and I think all of Halos vertex shaders are VS 1.1, so i'd imagine it's just using anything less than VS 3.0 with PS 3.0+ that they don't support. Which makes sense as an attempt to stop people from using the older shader models.

E: If people tried this fix can you let me know if it works or not? Thanks.

Dwood
May 3rd, 2010, 07:06 AM
I'll try it first thing when I get home.

Pyong Kawaguchi
May 3rd, 2010, 11:57 AM
I tried it, and I can't tell if motion blur does anything.

FireScythe
May 3rd, 2010, 12:13 PM
Set pp_motion_blur_amount to something silly, like 100.

Pyong Kawaguchi
May 3rd, 2010, 12:22 PM
alright.

It works, but looks weird, lol.

Roostervier
May 3rd, 2010, 11:31 PM
tried the fix and it worked. the new motionblur does look funny compared to the old, but now i can run at 1440x900 and get ~200 fps as opposed to ~27fps with the older version. i found that setting pp_motion_blur_amount to 5 looked best to me.

DemonOne
May 4th, 2010, 06:07 PM
Works on my 4870 as well.


Looking at that code made we want to mess around with it and see what I can do... or maybe it's just this test I need to study for...

Con
June 20th, 2010, 10:27 AM
bump
Would it be possible to get the old OS menus like FOV/HUD scaling back in the new version?

jcap
June 20th, 2010, 07:43 PM
Well, this is now fully integrated into OpenSauce, so I am going to assume that those options are back.

Syuusuke
June 20th, 2010, 07:44 PM
Oh god I remember this thing.

Gave me low FPS =(

Ifafudafi
June 20th, 2010, 10:50 PM
So I finally decided to give this thing a try and for the most part it's awesome but Elites (and only Elites) have the motion blur applied to them at all times, whether they're moving or not. Is that something on my end

Dwood
June 21st, 2010, 03:33 AM
So I finally decided to give this thing a try and for the most part it's awesome but Elites (and only Elites) have the motion blur applied to them at all times, whether they're moving or not. Is that something on my end

No it's on everyone's end. The Moblur is kind of picky on what units it uses it on etc.

FireScythe
June 21st, 2010, 04:25 AM
bump
Would it be possible to get the old OS menus like FOV/HUD scaling back in the new version?

I've got those options in my old code for this version. If i've got some time (which is scarce at the moment) i'll give it a look over to see if its stable and post it up.


So I finally decided to give this thing a try and for the most part it's awesome but Elites (and only Elites) have the motion blur applied to them at all times, whether they're moving or not. Is that something on my end

The velocity is only calculated for the BSP since getting the velocity of game objects is a bitc....significantly more difficult. However, the blur shader will blur over the edges of scenery so that they don't pop out as much when moving around. If your getting blur on elites then I could do with a screenshot to see if it is going wrong.

Ifafudafi
June 21st, 2010, 03:57 PM
http://img687.imageshack.us/img687/7644/blur2e.jpg

Dwood
June 21st, 2010, 04:18 PM
Set the moblur higher.

Ifafudafi
June 21st, 2010, 04:47 PM
I did, and that just aggravates the effect. I don't know anything about programming this stuff but it seems to me like the renderer is thinking that the Elites are moving, and it's applying the blur accordingly. I can set it to 1000, and while the elites will basically become transparent, the cyborgs next to them remain unblurred.

Dwood
June 21st, 2010, 05:14 PM
I did, and that just aggravates the effect. I don't know anything about programming this stuff but it seems to me like the renderer is thinking that the Elites are moving, and it's applying the blur accordingly. I can set it to 1000, and while the elites will basically become transparent, the cyborgs next to them remain unblurred.

I meant increase and then post a picture.

FireScythe
June 21st, 2010, 05:27 PM
Better still, put "rasterizer_rt_display -1" in the console and post a screenie of what is shown (a bit bigger than the last screenie would be handy, but optional). You should see the screen split into 4, with pretty colours :D.

Ifafudafi
June 21st, 2010, 05:31 PM
http://img706.imageshack.us/img706/8853/donges.jpg

Yeah, it definitely thinks the Elites are moving.

E: Here's a view of just the velocity output; you can see all the elites littered throughout the map:
http://img190.imageshack.us/img190/1250/ddduu.jpg

FireScythe
June 21st, 2010, 05:45 PM
I thought as much, your using the original release, which is severely outdated (my fault for not keeping the first post updated :O). Do in the following order:
1. Get the build in THIS POST
(http://www.modacity.net/forums/showthread.php?16647-OpenSauce-Post-Processing&p=519505&viewfull=1#post519505) 2. Get the update in THIS POST (http://www.modacity.net/forums/showthread.php?16647-OpenSauce-Post-Processing&p=531726&viewfull=1#post531726)
3. Get the updated VISR shader (if you want it) from THIS POST (http://www.modacity.net/forums/showthread.php?16647-OpenSauce-Post-Processing&p=532230&viewfull=1#post532230)
4. Apply the fix in THIS POST (http://www.modacity.net/forums/showthread.php?16647-OpenSauce-Post-Processing&p=534568&viewfull=1#post534568) if your using an ATI card.

Ifafudafi
June 21st, 2010, 06:10 PM
Now it's telling me I need DX9.0b. I went ahead and humored it and tried to install the package that came with HPC but it (aptly) won't install because I've already got the latest version.

E: Got it to work by not using that second update, but now it looks like you've gotten rid of the sexy object motion blur entirely. That's why I loved this so much :gonk:

FireScythe
June 22nd, 2010, 12:29 PM
Yeah, I got really close to getting it to work properly, but because I couldn't find one value I couldn't quite get it there so ended up cutting it since it looked bad. I may have another go at some point, but getting what I have now finished is the priority.

Siliconmaster
June 22nd, 2010, 04:54 PM
Yeah, the motion blur was all pretty, and the fake HDR and bloom were cool too. Basically the main reasons I liked this mod- I mean, all the features are awesome, but those were the ones that made me want to use it all the time.

Dwood
June 22nd, 2010, 05:30 PM
He removed Fake HDR because it was giving him HUGE performance hits.

Siliconmaster
June 22nd, 2010, 06:26 PM
Makes sense. But I am sad to see the motion blur go. And is the bloom still in? Or did that go too? Is there a list of current features somewhere?

Con
June 22nd, 2010, 09:31 PM
Bloom's still there. I still use the motion blur even if it only blurs the BSP now. It's still a huge improvement over the stock game.

FireScythe
June 23rd, 2010, 06:14 AM
In the next release the bloom will be a built in subsystem rather than an external shader. There will also be a post processing globals tag with an entry for changing the bloom values for your maps.

I actually removed the Fake HDR because I think it looked shit. Just made the colours look dull most of the time :(.

Kornman00
July 16th, 2010, 03:04 PM
jcap was helping me test the lastest build of the official OS yesterday. Turns out he had some old postprocessing stuff in his shaders folder. If anyone here has been using FS's WIP postprocessing jazz, you'll need to replace it all with what comes with the next release of OS or else your game won't start (due to different data structures I'm sure) or work with the next official build of OS. Believe me, you'll want your game to work with the next official build.

flyingmonkey3
August 3rd, 2010, 09:24 PM
It seems I've run into a bit of a problem. I followed the instructions from this post (http://www.modacity.net/forums/showthread.php?16647-OpenSauce-Post-Processing&p=544607&viewfull=1#post544607), and I have no problems loading up Halo. It looks like Post Processing is working since bloom and motion blur seem to be enabled by default, but I don't see any "OpenSauce" box that lets me load different shaders. Does anyone know what could be the problem? Or perhaps am I just ignorant as to how you would load different shaders and am doing it wrong?

E:
I'm using the 1.08 .exe, have moved init.txt to another location, and am not running xfire.

Con
August 3rd, 2010, 10:00 PM
The OpenSauce box comes up when you hit F7 ingame (doesn't work at menus IIRC). It doesn't let you mix and match the shaders though.

flyingmonkey3
August 3rd, 2010, 10:37 PM
The OpenSauce box comes up when you hit F7 ingame (doesn't work at menus IIRC). It doesn't let you mix and match the shaders though.

Hmm ok, but I still see no option for selecting different shaders.

Syuusuke
August 4th, 2010, 12:48 AM
You have to define those in the PostProcessingSettings.txt under the [Effects] section.

For every new effect you want to add, you have to increase the "Count" accordingly.

flyingmonkey3
August 4th, 2010, 02:29 AM
You have to define those in the PostProcessingSettings.txt under the [Effects] section.

For every new effect you want to add, you have to increase the "Count" accordingly.

Well I finally managed to get other shaders to load. I tried following this post (http://www.modacity.net/forums/showthread.php?16647-OpenSauce-Post-Processing&p=430260&viewfull=1#post430260), but what's stated there doesn't match what I'm seeing in my PostProcessingSettings.txt.

Here's what I see:

[Shaders]
Count: 1
[0]
Name: PP_Bloom

[Effects]
Count: 1
[0]
Name: Bloom
Indicies: 0
Render Point: 3

After a bit of trial and error I managed to get it to work. Let's say I wanted to load PP_Sepia.fx. This is what I tried:

[Shaders]
Count: 2
[0]
Name: PP_Bloom
[1]
Name: PP_Sepia

[Effects]
Count: 2
[0]
Name: Bloom
Indicies: 0
Render Point: 3
[1]
Name: Sepia
Indicies: 1
Render Point: 3

Thanks for all the help! =D

E:
Ugh, I could have avoided wasting my time doing trial and error if I had looked around more and read this post (http://www.modacity.net/forums/showthread.php?16647-OpenSauce-Post-Processing&p=532276&viewfull=1#post532276). Incidentally, PP_VISR gives me a black screen. Idk if this is important, but I have an ATI gfx card.

FireScythe
August 4th, 2010, 04:19 AM
I'll save you some more trial and error and point you to this post (http://www.modacity.net/forums/showthread.php?16647-OpenSauce-Post-Processing&p=534568&viewfull=1#post534568) :) .

flyingmonkey3
August 4th, 2010, 02:30 PM
I'll save you some more trial and error and point you to this post (http://www.modacity.net/forums/showthread.php?16647-OpenSauce-Post-Processing&p=534568&viewfull=1#post534568) :) .

Ah, I see. So that change also has to be done to PP_VISR. Thanks. =P

EagerYoungSpaceCadet
August 23rd, 2010, 02:24 PM
Only thing I don't like is that it drops my FPS from 75 to 10 on the title screen

SkyHookers
April 17th, 2011, 02:31 AM
How to enable this?

And im new here.

delta62onhalo
April 16th, 2012, 08:03 PM
How do you install this?

Cortexian
April 17th, 2012, 05:37 AM
Read the first post, including the spoilered bits.

EagerYoungSpaceCadet
April 17th, 2012, 06:41 AM
You don't install this. You install OpenSauce V3.

jcap
April 17th, 2012, 01:52 PM
See: http://www.modacity.net/forums/showthread.php?17758-OpenSauce-Halo-CE-SDK-Update-2-%28RC%29

JackRabbit72380
December 11th, 2013, 09:30 AM
I's it possible I could get the refraction shader? I want to use it to make halo4 type rampancy.it looks perfect over the hud jus the way it is all I need to do is switch out a bitmap.