Game Development Community

dev|Pro Game Development Curriculum

PostFX Options GUI (0.2)

by FuzzYspo0N · 10/12/2009 (1:04 pm) · 28 comments

img39.imageshack.us/img39/8553/previewlargev.jpg
I needed control over the postFX system, so i made a temporary GUI. Hope this helps until the engine gets its own shiny new controls :)

To install :

Copy the cs and the GUI file into the CORE folder of the game (/game/core/scripts/gui) (/game/core/art/gui) respectively.

First, load the GUI's in game/core/main.cs ( I load it right after the options GUI : about line 79 ).

exec("./scripts/gui/postProcessOptionsDlg.cs");   
   exec("./art/gui/postProcessOptionsDlg.gui");


Second, add the menu item in game/tools/worldEditor/scripts/menus.ed.cs (about line 139)

item[14] = "Post Process Options" TAB "" TAB "Canvas.pushDialog(postProcessOptionsDlg);";

Third, i added a "ctrl [" shortcut so i can load it in game, without loading the editor.
in game/scripts/client/default.bind.cs (Around line 468) :

function bringUpPostFXOptions(%val)
{
   if (%val)
      Canvas.pushDialog(postProcessOptionsDlg);
}

GlobalActionMap.bind(keyboard, "ctrl [", bringUpPostFXOptions);

0.2 Update

New section in the install above (convenience factor only). The ctrl [ shortcut is up to you, i used that because ctrl P was bound to doScreenshot? Either way ;)

Changelog ( 0.2 ) :

.: HDR Effects Blue shift Color picker implemented.
.: SSAO Ranges fixed / tweaked for the near and far tabs. Also clamped the values to non 0.
.: Renamed a few labels to make more sense
.: Added tooltips to all LABELS (hover for info), tooltips on the controls now show the current value.
.: Fixed the GUI loading on the last random tab (loads on the first one now)
.: Made sure all values updated while in game, so changes can be seen in realtime

TODO :

Finish the preset loading and saving.

Feedback, ideas, fixes - Yes please.

Downloads [6kb]

Mediafire

Direct Link

Discussion :

http://www.garagegames.com/community/forums/viewthread/103709

About the author

http://blog.owned.co.za

Recent Blogs

Page «Previous 1 2
#1
10/12/2009 (1:07 pm)
100% awesome!
#2
10/12/2009 (1:41 pm)
Now THAT'S what i'm taking about !!!!!!!! Thank you, thank you thank you !! That's going to save us so much time 8)
#3
10/12/2009 (1:45 pm)
Good stuff.
#4
10/12/2009 (1:49 pm)
Glad it will be helpful! I will continue to polish this over the next week or so , so expect some useful updates (one's like "Presets" that you can store and load, per scene / area / trigger controls!

Any more useful ideas?
#5
10/12/2009 (1:53 pm)
Nice Sven! ..I mirror'd it here: torque.abigholeintheweb.com/public_system/useruploads/PostFX_Gui_0.1.zip

You can upload straight to that site if you like(currently it is paid for until 10/2010). Upload button at the top
#6
10/12/2009 (1:55 pm)
Thanks eb! Ill add that link to the main post for now.
#7
10/12/2009 (1:59 pm)
cool...
#8
10/12/2009 (5:37 pm)
Thanks!!!
#9
10/12/2009 (5:58 pm)
This is awesome. It should go into 1.1. Thank you!
#11
10/12/2009 (6:23 pm)
This is brilliant, thanks a lot :)
#12
10/12/2009 (7:12 pm)
SWEET!

Now if i could just get my internet back at home i wouldent have to download it at the library...
#13
10/12/2009 (7:40 pm)
Thanks for the comments guys, I have made a bit more progress on the implementation of the presets, I should hopefully release a neater version of this soon.
#14
10/12/2009 (11:44 pm)
Thank you very much :D Great work !
#15
10/13/2009 (8:55 am)
This is the most useful resource for T3D so far IMHO
#16
10/13/2009 (12:24 pm)
I'm trying to get this to work and when I click on Edit>Post Process Options nothing happens. The console says pushDialog(): Invalid Control: postProcessOptionsDlg
Did I do something wrong?
#17
10/13/2009 (1:54 pm)
Hey Scot, was that with the newer 0.2 right? i triple tested this again, and its all working fine.

Some things to watch out for : This is per project. So if you are adding it to the demos/physx folder, your MyProjects/myGame folder WONT see the controls. Make sure that its in the right game, and make sure that the exec's from step 1 are in the right place.

The console should be more than helpful if something went wrong (like saying the .gui file cannot be found).
#18
10/13/2009 (3:11 pm)
yes, I dl'ed 0.2 as soon as I saw it.
I put postProcessOptionsDlg.cs in the Torque 3D 2009 SDK 1.0/My Projects/My Game/Game/scripts/gui directory.
I put postProcessOptionsDlg.gui in the Torque 3D 2009 SDK 1.0/My Projects/My Game/Game/art/gui directory.

I edited main.cs as follows:

// Level Chooser GUI
exec("./art/gui/chooseLevelDlg.gui");
exec("./scripts/gui/chooseLevelDlg.cs");

exec("./scripts/gui/optionsDlg.cs");
exec("./art/gui/optionsDlg.gui");
exec("./scripts/gui/postProcessOptionsDlg.cs");
exec("./art/gui/postProcessOptionsDlg.gui");
exec("./scripts/gui/loadingGui.cs");
exec("./art/gui/loadingGui.gui");

echo(" % - Initialized Core");
}


Then edited menus.ed.cs as follows:

//item[9] = "Mission Area Editor" TAB "" TAB "Canvas.pushDialog(MissionAreaEditorContainer);";
item[12] = "-";
item[13] = "Game Options" TAB "" TAB "Canvas.pushDialog(optionsDlg);";
item[14] = "Post Process Options" TAB "" TAB "Canvas.pushDialog(postProcessOptionsDlg);";
};

I also added in the shortcut to default.bind.cs

I see nothing in the console that seems related other than the
pushDialog(): Invalid Control: postProcessOptionsDlg

See anything that jumps out at you?
#19
10/13/2009 (4:21 pm)
Ah yes i see the problem now! Its meant to go into the CORE folder, not the game folder :) This was my bad on the first post, to reflect the mistake.


For example : PhysX/game/core/scripts/gui and PhysX/game/core/art/gui.

The core/main.cs is using relative paths ./ which, it doesnt find the files it seems.


Edit : if you wanted to make it in the game folder simply move the exec code into the game/main.cs somewhere logical. i just kept mine in core as its more relating to the system, and will not be deployed with my game.
#20
10/15/2009 (12:49 pm)
Very nice, thanks for the resource!
Page «Previous 1 2