View Full Version : Waving water post process volume material
02-20-2012, 01:39 PM
I've searched high and low for days for this answer, and I think I've come close a number of times, but I can't seem to find the solution.
I'm creating a 2.5 sidescroller, and trying to implement a post processing volume so that when the character is within water it appears as though there is moving water between the camera and the pawn. I threw in the material I wanted on a static mesh, and used it as a what I best describe as a "screen" between the pawn and the camera, and for the most part it works out well, except that the transition is anything but subtle, and you see exactly where it ends.
I can obviously add materials to the world post process, but am unsure of how to do within a volume. In my search I've seen that quite a few people have this same question, but often it goes unresolved. Even after reading the post process tech guide (http://udn.epicgames.com/Three/PostProcessTechnicalGuide.html) I'm still a bit confused.
I'd like to keep the world post processing material active, while only activating my water material when the character goes beneath the water. How can I approach this?
02-23-2012, 07:15 AM
a quick way to do this would be to create a lerp node with scene texture going into A and Your water material going into B. The Alpha would be a constant. You can use a set scalar param in kismet to switch the constant from 0 (off state) to 1 (on state). you can do this with the help of a trigger.. its probably not the best way to do it, but it works
02-23-2012, 10:08 AM
If you would add a mask to your plane then you can add smooth transisions.
and use pixeldepth to create underwater fog.
02-24-2012, 11:34 AM
Thank you very much for the assistance guys.
This should resolve both of my issues. I don't know why I didn't even considering trying to use a mask either. I'll try today and let you know how it goes.
02-25-2012, 09:54 AM
After spending a day on it, I'm still a bit confused. I found this post (http://forums.epicgames.com/threads/708500-How-to-use-a-post-process/page2) which has helped me out a bit. I've inserted the following code, but still have not gotten it to work properly:
class DunDef_SeqAct_TogglePostProcessEffect extends SequenceAction;
var(PostProcessing) name PostProcessEffectName;
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)
theInstigatorController = PlayerController(theInstigator.Controller);
if(theInstigatorController == none)
theLocalPlayer = LocalPlayer(theInstigatorController.Player);
if(theLocalPlayer == none)
effect = theLocalPlayer.PlayerPostProcess.FindPostProcessEf fect(PostProcessEffectName);
if(effect != none)
effect.bShowInGame = true;
effect.bShowInGame = false;
effect.bShowInGame = !effect.bShowInGame;
ObjName="Toggle Postprocess Effect"
I've set it so that each time I enter the volume I have the text "entered volume" appear on screen," so I know that the volume and trigger are active, but I cannot apply my material. My material is a combination of the sobel edge detection which I am currently using on my world post processing, (so that it maintains that when I enter my volume), as well as the waving water effect, to give that sense of being beneath the water.
I'm confused where it says "PostProcessEffectName" in the code. Do I place the path of the PostProcessChain (MegaMan2.PostProcess.Mat_Sobel_Water_Blend_PostPr ocess) or simply just the name of the material? (Mat_Sobel_Water_Blend)
02-25-2012, 11:43 AM
I should clarify: I have two issues here.
1) I have sobel edge detection enabled in my post processing. I would like for this to be active on all of my levels. It is currently enabled under my world properties, and I'm using it straight from the UDK gems. (http://udn.epicgames.com/Three/DevelopmentKitGemsSobelEdgeDetection.html) It works fine.
However, if I add a post process volume anywhere in my level, I run into this issue:
A) Under the properties if I leave "override world post processing chain" unchecked, I cannot see it in my editor, nor in my game.
B) If I do enable it, I no longer have my sobel edge detection.
Question: How do I retain my edge detection while enabling the post processing volume?
2) As I've mentioned above, I'd like to have the distortion (or appearance) of being beneath the water by applying a material similar to Epic's "M_UN_Liquid_BSP_BlueWater02".
Question: How can I apply this material to my scene, while retaining the sobel edge detection?
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.