Download

Spiral Blur Scene Texture Whiteout

So I was wanting to test out the Spiral Blur Scene Texture node with post processing, but this does not seem to work as described; instead, it produces a massive whiteout effect.

bMFthk8.png
I added an actor that is excluded from the PP pass just to illustrate the point.

https://wiki.unrealengine.com/How_To_Use_The_Spiral_Blur_Material_Node

Following that doesn’t seem to yield any working results at all and apparently I’m not the only one who has had this issue.

https://answers.unrealengine.com/questions/471711/spiral-blur-in-post-process-not-working-in-412.html

Has anyone found a way to get this to work in 4.12 and up?

4.16 Still same problem. Looking for solution. Really need the stuff. Please help!

Ok, let me just try to explain how my case manifests and how i managed to “solve the issue”.

First, the whiteout issues was not present all the time and in all levels i had. It was also present as a material for the mes and as a post process material .For example in the example map i was never able to reproduce it. It seemed to be dependent on camera position and direction, but with no logic connecting it to something like small bounds or something like that. I observed that if you put several objects in screen space with the same shader the whiteout happens instantly on all three in certain angles. So, that led me to start digging a bit through the custom node that creates the blur. So, me being an artist it took me some time to understand what the code is doing and i found one very strange thing that caught my eye. In the custom expression node after all the variable statements and some fiddly code stuff i don’t understand there starts an If statement that basically does the blur effect and it goes like this :

int i=0;
if (DistanceSteps<1)
{
return DecodeSceneColorForMaterialNode(NewUV);
}
else
{
//CurDistance += 0.5*StepSize;
while ( i < (int) DistanceSteps)
{

//CurDistance+=StepSize;… etc.

ok, so the first part tells me that if my distance step setting in my material are less than one the shader will return some function “DecodeSceneColorForMaterialNode(NewUV)” , to test this i put my step size to 0.7 or some value lest than one to see if this function returns me just the scene color with no blur as it is suppose to do, and of course it does but the witheout stuff was still present i the image which led me to believe that there was something wrong with this function. To bypass this i substituted this function with a vector 3 input i made and called it “SceneColor” , next i plugged in a scene color with a mask (r,g,b) in the node and looked at the result, and it worked! Yay!!! ook so i started moving forward and just for the sake of testing i pumped the distance steps to 16 to what will happen, The code says that it should behave exactly like before since that part of the code was not altered, but to my surprise and to the surprise of my lead programmer that helped a bit with the code the whiteout was not present anymore. Puzzled by this we sad, ok lets put the code back as it was and see what will happen. So we did and the wihteout wasn’t there anymore … oO… what ? how is that possible?.. so now even more puzzled than before i start doing supid crazy stuff … so i took out the scene color and replaced it with a vector 3 … now the whiteout returned… whaaat? how is that possible if the input i created on the custom node is not being used anywhere, how can that alter the result…wtf? We havent been able to understand why does it work only if the scene color is hooked even if it is not used but never the less it works for now. I would like for someone that understands this to explain what happened so i don’t run into the same problems again…

for you guys that have these issues here is the code from the node just in case i forgot i altered something and an image of the material expression setu…

float3 CurColor;
float2 BaseUV = MaterialFloat2(ScreenAlignedPosition(Parameters.ScreenPosition).xy);
float2 NewUV = BaseUV;
float StepSize = Distance / (int) DistanceSteps;
float CurDistance=0;
float2 CurOffset;
float TwoPi = 6.283185;
float Substep;
float2 ScenePixels=View.BufferSizeAndInvSize.xyBaseUV;
ScenePixels+=View.TemporalAAParams.r;
float2 RandomSamp = ((uint)(ScenePixels.x) + 2 * (uint)(ScenePixels.y)) % 5;
RandomSamp+=Texture2DSample(Tex,TexSampler,ScenePixels);
RandomSamp/=5;
RandomSamp-=0.5;
TempAARotation
=RandomSamp;
TempAADistance*=StepSize*RandomSamp;

int i=0;
if (DistanceSteps<1)
{
return DecodeSceneColorForMaterialNode(NewUV);
}
else
{
//CurDistance += 0.5*StepSize;
while ( i < (int) DistanceSteps)
{

//CurDistance+=StepSize;
for (int j = 0; j < (int) RadialSteps; j++)
{
CurOffset.x = cos(TwoPi*((TempAARotation+Substep) / RadialSteps));
CurOffset.y = sin(TwoPi*((TempAARotation+Substep) / RadialSteps));
CurOffset =DistanceMask;
NewUV.x = BaseUV.x + (CurOffset.x * (CurDistance+(RandomSamp
TempAADistance)));
NewUV.y = BaseUV.y + (CurOffset.y * (CurDistance+(RandomSampTempAADistance)));
CurColor += DecodeSceneColorForMaterialNode(NewUV);
//CurDistance+=(StepSize+(TempAADistance))/RadialSteps;
Substep++;
}
CurDistance+=StepSize;
Substep+=RadialOffset;
i++;
}
CurColor = CurColor / ((int)DistanceSteps
(int)RadialSteps);
return CurColor;
} SpiralBlur fix.png