PDA

View Full Version : How to use a post process



eh_gm
11-18-2009, 11:26 AM
what is Post Process Editor FOR???:confused:
I can easily build a post process in this editor,But how can I assign it to a Post Process volume?

I read these threads:
http://udn.epicgames.com/Three/PostProcessMaterials.html
http://udn.epicgames.com/Three/PostProcessEditorUserGuide.html

But I don't see any usefull information about using post processes.

How can I assign a new post process to the entire level? (there is not any option in the "Word Properties" dialogue)

eh_gm
11-18-2009, 01:10 PM
Is n't anyone to help?

Effregy
11-18-2009, 11:56 PM
I have no freakin clue how to do that,
but
how they usually assign things to other things, is using kismet
(Start event)
Level start
out box
arrow into in box of
(action) post process thingy
then
via the target square
(on post process thingy)
to the (variable) object (click item in editor, then right click in kismet to assign a target to it-a light a cam-a static mesh w/e)

hope this helps

eh_gm
11-19-2009, 06:14 AM
Thanks Effregy, But as I know there is not any access to the postprocesses in the kismet.
But this is possible in two ways:

1- scripting

2- Editing UTEngine.ini and adressing this to the desired postprocess

I did it and I can explain it, if anyone ask.

ffejnosliw
11-19-2009, 10:58 AM
The only real ways to assign a new post process chain to be used are through the UTEngine.ini file as the DefaultPostProcess or through script.

killfassil
11-30-2009, 06:34 PM
And that's a real pain somewhere. My major concern was to be able to use a post process material. I guess there's still no way to do that simply.
I was able to find a hack, used by epic sometime. You can use a sphere with reversed normals (so the normals face the center of the sphere), and set its "depth priority group" to "foreground" (StaticMeshActor.Rendering.DepthPriorityGroup). Then you apply whatever transluscent material you want on it.

One cool thing is that you can use a mask on the sphere to create nice effects such as rayleigh scattering. One bad thing is that it's not really performance friendly.

If someone can find a better way to use post process material, that would be such a relief.

Brexer
11-30-2009, 07:49 PM
How is changing 1 line in UTEngine.ini (or DefaultEngine.ini) a real pain ?

Changing
DefaultPostProcessName=FX_HitEffects.UTPostProcess
to
DefaultPostProcessName=YourPackage.PostProcessName

I have never used that stuff before, and even i found it quite easily :p

You do not assign PostProcessMaterial to PostProcessVolume box last i checked, i may have misunderstood your post though and what your trying to do :P

JeremyStieglitz
11-30-2009, 09:13 PM
If you want to toggle a postprocess effect on or off dynamically within a volume, here's a custom Kismet action I wrote to let you do so (note that it requires you to give your PostProcessEffect a unique 'name' to look up, which you can do in the Effect's values in the PostProcessChain editor):


class DunDef_SeqAct_TogglePostProcessEffect extends SequenceAction;
var(PostProcessing) name PostProcessEffectName;

event Activated()
{
local PostProcessEffect effect;
local SeqVar_Object linkedInstigators;

local Pawn theInstigator;
local PlayerController theInstigatorController;
local LocalPlayer theLocalPlayer;

foreach LinkedVariables(class'SeqVar_Object',linkedInstiga tors,"Instigator")
{
theInstigator = Pawn(linkedInstigators.GetObjectValue());

if(theInstigator == none)
continue;

theInstigatorController = PlayerController(theInstigator.Controller);

if(theInstigatorController == none)
continue;

theLocalPlayer = LocalPlayer(theInstigatorController.Player);

if(theLocalPlayer == none)
continue;

effect = theLocalPlayer.PlayerPostProcess.FindPostProcessEf fect(PostProcessEffectName);
if(effect != none)
{
if(InputLinks[0].bHasImpulse)
effect.bShowInGame = true;
else if(InputLinks[1].bHasImpulse)
effect.bShowInGame = false;
else
effect.bShowInGame = !effect.bShowInGame;
}
}
}

DefaultProperties
{
ObjName="Toggle Postprocess Effect"
ObjCategory="Toggle"

InputLinks(0)=(LinkDesc="Turn On")
InputLinks(1)=(LinkDesc="Turn Off")
InputLinks(2)=(LinkDesc="Toggle")

VariableLinks.Empty
VariableLinks(0)=(ExpectedType=class'SeqVar_Object ',LinkDesc="Instigator",MinVars=1)
}

If I could figure out how to attach images (not possible without external host?), I'd show you how to set it up in Kismet.

Suffice it to say, create a Trigger Volume and set a Kismet Touched Event on it. Link that event's Touched-output with the Toggle PP Action's "Turn On" input, and the Untouched-output with Toggle PP Action's "Turn Off" input. Be sure to set Touched event's MaxTriggerCount and RetriggerDelay to 0 as well, so that it can refire as necessary.

Alas this just turns the PP effect on an off, which can look jarring if you want a nice interpolation while it appears/disappears. For that, you'd need to implement a Latent Action to lerp (in its Update function) some opacity/intensity Material parameter in the effect up & down. But yeah it's all do-able ;)

(indeed PostProcessVolume itself can't actually toggle chain effects which is unfortunate, hence the need for a custom action like this... or one could extend PostProcessVolume to handle it, though you'd need to intercept the collision event within your Pawn since we can't alter the native functionality of the volume itself.)

Cheers,
Jer

Stitchd
02-04-2010, 04:20 PM
Volumes create from the builder brush.
Add volume (picture of a cube on the far left toolbar) > Post process volume
Select volume (move the builder brush out of the way) hit f4 and bring up the properties -- its all there

westclif
04-03-2010, 03:46 AM
mhm but how could you turn it on / off without kismet

i added a little function in the touch/untouch event of my volume and it works but only inside the editor and not in my game O.o...

So if i start PIE and jump into the volume the postprocessing effet shows up in the editor but not in the game and the same then i leave the volume

thats my code:



var PostProcessEffect Effect;
var() name Effectname;
var() PostProcessChain Chain;

simulated event Touch( Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal )
{
Effect = Chain.FindPostProcessEffect(Effectname);
Effect.bShowInGame = true;
`log(Effectname @ Effect @ Effect.bShowInGame);
}



simulated event untouch(Actor Other)
{
Effect = Chain.FindPostProcessEffect(Effectname);
Effect.bShowInGame = false;
`log(Effectname @ Effect @ Effect.bShowInGame);
}

glra2222
01-15-2011, 12:08 AM
hey I tried both of your codes but my postprocesseffect doesn't activate when go into the volume.

Piranhi
02-17-2011, 06:39 AM
If you want to toggle a postprocess effect on or off dynamically within a volume, here's a custom Kismet action I wrote to let you do so (note that it requires you to give your PostProcessEffect a unique 'name' to look up, which you can do in the Effect's values in the PostProcessChain editor):


class DunDef_SeqAct_TogglePostProcessEffect extends SequenceAction;
var(PostProcessing) name PostProcessEffectName;

event Activated()
{
local PostProcessEffect effect;
local SeqVar_Object linkedInstigators;

local Pawn theInstigator;
local PlayerController theInstigatorController;
local LocalPlayer theLocalPlayer;

foreach LinkedVariables(class'SeqVar_Object',linkedInstiga tors,"Instigator")
{
theInstigator = Pawn(linkedInstigators.GetObjectValue());

if(theInstigator == none)
continue;

theInstigatorController = PlayerController(theInstigator.Controller);

if(theInstigatorController == none)
continue;

theLocalPlayer = LocalPlayer(theInstigatorController.Player);

if(theLocalPlayer == none)
continue;

effect = theLocalPlayer.PlayerPostProcess.FindPostProcessEf fect(PostProcessEffectName);
if(effect != none)
{
if(InputLinks[0].bHasImpulse)
effect.bShowInGame = true;
else if(InputLinks[1].bHasImpulse)
effect.bShowInGame = false;
else
effect.bShowInGame = !effect.bShowInGame;
}
}
}

DefaultProperties
{
ObjName="Toggle Postprocess Effect"
ObjCategory="Toggle"

InputLinks(0)=(LinkDesc="Turn On")
InputLinks(1)=(LinkDesc="Turn Off")
InputLinks(2)=(LinkDesc="Toggle")

VariableLinks.Empty
VariableLinks(0)=(ExpectedType=class'SeqVar_Object ',LinkDesc="Instigator",MinVars=1)
}

If I could figure out how to attach images (not possible without external host?), I'd show you how to set it up in Kismet.

Suffice it to say, create a Trigger Volume and set a Kismet Touched Event on it. Link that event's Touched-output with the Toggle PP Action's "Turn On" input, and the Untouched-output with Toggle PP Action's "Turn Off" input. Be sure to set Touched event's MaxTriggerCount and RetriggerDelay to 0 as well, so that it can refire as necessary.

Alas this just turns the PP effect on an off, which can look jarring if you want a nice interpolation while it appears/disappears. For that, you'd need to implement a Latent Action to lerp (in its Update function) some opacity/intensity Material parameter in the effect up & down. But yeah it's all do-able ;)

(indeed PostProcessVolume itself can't actually toggle chain effects which is unfortunate, hence the need for a custom action like this... or one could extend PostProcessVolume to handle it, though you'd need to intercept the collision event within your Pawn since we can't alter the native functionality of the volume itself.)

Cheers,
Jer

This works perfectly for us, much appreciated :)

richmar1
03-25-2011, 08:26 PM
hey guys i was wondering if someone could explain to me how to exclude static meshes from being affected by world post processes.much thanks in advanced

sylvain
08-05-2011, 04:13 AM
hi.
I used this piece of code to attach a post process chain to a volume, (it works), but the problem is I can't use the classic post process option and especially I can't use the Montion blur (particularly option duration).

Could someone help me?

generalDamnit
05-10-2012, 01:53 PM
Not to revive this from the dead but I'd rather do this than start a new thread that's asking pretty much the same thing. Per Jeremy's custom kismat block, where do you assign the "unique name?" I gave my post-processing chain a name under Post-process editor>>Post Process Effect>>Effect Name. I then tried linking your kismat node using the same unique name under Post Processing Effect Name. Nothing happens. I've tried putting in the direct path to the postprocess effect (similar to how you assign materials to meshes) and still nothing. I'm starting to think that something has changed in one of the newer builds of UDK that is keeping your node from working.

Any insight would be great.