How can I go about modifying the DOF in Realtime? Basically I want to take the ShooterGame example a bit further, when the FOV of the Camera changes as you zoom in, I also want to change the DOF to focus on wherever crosshair is.
I know I can get the focus distance using a trace function, but where do we actually change these properties in realtime? Is it even possible? I know I saw it working in Gears of War 3 with the longshot, though I’m not sure if that was done with some trickery and a PostProcess Material.
#My Tutorial on Dynamic PP Updates
I have a tutorial here on updating post process volume during game time!
I show in the code how to make sure you are updating the global post process volume
it is per player because these changes dont replicate
Dynamic Post Process Updates
http://forums.epicgames.com/threads/972861-Tutorials-C-for-UE4-Code-Samples-gt-gt-New-Iterate-Over-All-Actors-In-World-Level?p=31665944&viewfull=1#post31665944
Rama
#Scene.h
See Scene.h for the big struct of post process settings
PS: here is the code, more explained above
void AYourController::AffectAllGPPV()
{
//list of all post process volumes in world
TAutoWeakObjectPtr PPLinkedList =
GetWorld()->LowestPriorityPostProcessVolume;
//skips if first entry is not valid / there are no ppvs
while(PPLinkedList)
{
//print current ppv name to console
ClientMessage(PPLinkedList->GetName());
//Global Post Process Volumes only:
//Display and change Bloom Intensity
if (PPLinkedList->bUnbound)
{
ClientMessage(FString::SanitizeFloat(
PPLinkedList->Settings.BloomIntensity));
PPLinkedList->Settings.BloomIntensity = 20;
}
//go to next ppv
PPLinkedList = PPLinkedList->NextHigherPriorityVolume;
}
}
How am I missing all these things you’ve done haha… Cheers Rama!