PostFX preset script
by Duion · in Torque 3D Beginner · 03/10/2013 (4:22 pm) · 8 replies
I organized my levels in subfolders and manualy changed the paths of the files, worked all fine execpt for the postfx presets, now they do not load and I could not find the location where to say what the folder of the postfx preset files is, so does anyone know where to change that?
It seems he looks for them by default in the "/levels" root folder, I want him to look for them in the same folder.
It seems he looks for them by default in the "/levels" root folder, I want him to look for them in the same folder.
About the author
http://www.duion.com - Human Paradigm Specialist
#2
03/10/2013 (7:05 pm)
To what file do you add this or do you have to create a new script?
#3
03/11/2013 (12:38 pm)
Me personally I place it at the end of spawn player handling.
#4
Maybe I should give an example of what I mean.
I move level_A a from levels/level_A.mis to levels/stage1/level_A.mis and all other files like forest, terrain, decals and the postfxprest, all get loaded properly from the new folder, except the postfxpreset.
So there somwhere has to be a line that says: look for postfxpreset in "/levels/mapname.postfxpreset.cs", this would have to be changed to "./mapname.postfxpreset.cs".
Because I need an individual postfxpreset for each level.
levels/stage1/level_A needs levels/stage1/level_A.postfxpreset.cs
and maybe levels/stage5/level_B needs to load levels/stage5/level_B.postfxpreset.cs
so a relative path on that also would solve that I think.
03/11/2013 (8:07 pm)
Sorry I am very new to this, so far I cannot understand at all what you mean, please name the files, this way I can understand.Maybe I should give an example of what I mean.
I move level_A a from levels/level_A.mis to levels/stage1/level_A.mis and all other files like forest, terrain, decals and the postfxprest, all get loaded properly from the new folder, except the postfxpreset.
So there somwhere has to be a line that says: look for postfxpreset in "/levels/mapname.postfxpreset.cs", this would have to be changed to "./mapname.postfxpreset.cs".
Because I need an individual postfxpreset for each level.
levels/stage1/level_A needs levels/stage1/level_A.postfxpreset.cs
and maybe levels/stage5/level_B needs to load levels/stage5/level_B.postfxpreset.cs
so a relative path on that also would solve that I think.
#5
03/11/2013 (8:30 pm)
You could try that. Currently I have my own version of spawnPlayer so my structure is different from the original code base. but if you can find this function or where ever it is called you can all a function call to a custom function that will take in the mape name as a parameter and load the desired post fx. function ENABLE_FX(%mapName){
LightRayPostFX.enable();
HDRPostFX.enable();
//Load a preset post effect to be used
PostFXManager::loadPresetHandler("levels/maps/"@%mapName@"/MASTER.postfxpreset.cs");
}
#6
When I place levels/stage1/level_A.mis.decals, the decals get loadad, when I place it in levels/level_a_mis.decals and the rest stays in levels/stage1/ decals not get loaded for that level.
I believe it is supposed to be like that by default, but someone missed to program this with the postfxpreset, because with that, it is just the other way around.
03/11/2013 (8:54 pm)
Maybe you think to complicated, I believe this is just a bug, because with other kind of files paths are relative.When I place levels/stage1/level_A.mis.decals, the decals get loadad, when I place it in levels/level_a_mis.decals and the rest stays in levels/stage1/ decals not get loaded for that level.
I believe it is supposed to be like that by default, but someone missed to program this with the postfxpreset, because with that, it is just the other way around.
#7
in your "XXX.postfxpreset.cs" then make sure it points to right file.
03/11/2013 (10:38 pm)
if u have "$PostFXManager::Settings::ColorCorrectionRamp" field in your "XXX.postfxpreset.cs" then make sure it points to right file.
#8
03/12/2013 (7:01 am)
Thats correct by default, it's under /core, so this should not be wrong.
Torque Owner Kevin Mitchell
12 CatBlack Studios
function ENABLE_FX(){ LightRayPostFX.enable(); HDRPostFX.enable(); //Load a preset post effect to be used PostFXManager::loadPresetHandler("levels/maps/MAP_NAME/MASTER.postfxpreset.cs"); }You can do this with some modifications.