i’m working on a game with this post processing effect that calculates the edge of an object or image, i decided to get one from the stylizedrendering example from the engine, but i couldn’t manage to get it work, then i found one from another guy, and it has an error, well basically, is too old and many things have change from the past 2 years, so i finally managed to come back and decided to work around with the one from unreal engine, but apparently not working, cause i get this weird papercraft effect
the palid brown color is the thing i want to fix, but the thing is, the last part of the blueprint is a postprocesstexture input0 and wants me to blend the material with a color, and the result is that one you see here, sadly i couldn’t manage to get rid of that, i’m not exactly a blueprint expert
bump, really nobody knows how to fix this? i also found the toolman’s highlight material tutorial, but isn’t exactly the method to make this sort of borderlands outline effect, by the way, this is the pic of the blueprint where i need help
this is the part where it blends the palid brown color, i change it to white now, and this is where blends the line color and all the sobel edge calculation is behind this
That first PostProcessBlendWeight is kinda odd, not sure why do you need that. All that will result is a white pixel when you set it to 1.0. No reason for that.
The second image have no context. The A input should be the SceneTexture:PP0 input from the first image, the B is the color you want to apply at the white edges, then theres the alpha channel which is the sobel edge output and you should clamp it between 0. and 1. to make sure no value larger than 1.f will be coming into the Lerp’s alpha. Then it should work, unless the sobel extracting is also messed up in which case you’re better off creating a very simple 3x3 kernel on your own, then apply the two sobel edges (summary of right and bottom sobel), that should work.
Here, the custom node is a little HLSL code i wrote that will sample 8 pixels from the neighbours and summarize the sobel (also applying a min[1.f,x]) the way i just described. The floor node will make a very narrow high pass filter (only allow values of 1.), but you can use a pow() node as well that will give broader spectrum for more edges.
The edge effect works just great on the high contrast areas, but the low contrast might not produce edges for you. Check the threshold in your equation and give a larger spectrum, that could work. Or, maybe it’s the sobel you are currently using produces a value range between -1 and 1, that you should get the abs() of it, so it will outline the lower part of the image as well.
i found the delta that was calculating the edge of the entire mesh, i messed it up a little bit to see how it works, and it seems that if i decrease the minus number that divides the current edge calculate before, i get this horrid shadow in the distance, but at least i found it
That most likely is the kernel you are messing with, and the values should already be tuned pretty well to calculate the sobel differences. If you change these values then the original content will slowly slide into the edge channel, and you don’t want to do that. This actually is the reason the black content start to appear.
This should help to start and understand the concept behind the Custom Node. I also found the forums have numerous posts that will teach you ways how to access the scene texture from hlsl code, it is quite easy and leveraged to a single function call (SceneTextureLookup) which is cool.