View Full Version : Sharpen Post Processing?
Sean VanGorder
11-06-2010, 11:30 AM
Is it possible to have a post process effect that sharpens up everything a bit, similar to what you can do with Xoliul's post process shaders for Max?
haiddasalami
11-06-2010, 01:24 PM
Ill try and take a stab at it. Need to head out for a bit and atleast it'll get me off my ass to do some shader/post processing work :P
yes refer to this thread for all post process
http://forums.epicgames.com/showthread.php?t=743037
he has done:
Post Processes:
Screen Space Anti Aliasing (2008)
Batman Arkaham Asylum´s Advanced 3D Stereo Trioviz´s (2010)
Bleach bypass (2010)
Edge detection (2010)
Auto Focus Gausian Depth of Field (2010)
Auto Focus Bokeh Depth of Field (2010)
Screen Space Tangent Normals (2010)
Screen Space Color Bleeding (2010)
Cheap SSAO (2009)
LensFlare (2010)
HQ Spherical Chromatic Aberation w/ Hue (2010)
HQ Cubique Chromatic Aberation w/Hue (2010)
Film Grain (2009 before udk release)
Vignetting (2009 before udk release)
Hue Saturation (2009)
Screen Space Fog based on Depth (2010)
Poison Disc Sampling (2010)
Posion Disc Blur (2010)
Custom Shape Bokeh-Blur (2010)
Anamorphic Lens Flare (2010)
RGB/Image Noise (2010)
Dynamic Tonemaping with Reinhards Tonemap operator (2010)
Shaders:
Paralax Occlusion Mapping with offset limiting (2010)
Paralax Mapping (2010)
Steep Paralax Mapping (2010)
Cubique Texture coordinates (2010)
Cheap Sub Surface Scattering (2010)
warped Diffuse Shading (2010)
Fur Shading (2010)
Procedural Sky Shading with renormalization (2010)
Rim lighting (2009)
angle based Reflection (2010)
Phong and Blinn-Phong(2010)
Cook-Torrance(2010)
Strauss(2010)
Ward Aniso and Isotropic (2010)
Ashikhmin-Shirley (2010)
Oren-Nayar (2010)
]
Sean VanGorder
11-06-2010, 01:50 PM
That's some awesome work, but I don't really see anything that shows how he did it.
yea he doesnt release how to stuff of his work. Just calculations in his formula/equation
karera
11-08-2010, 04:56 AM
Love that effect.
fearian
11-08-2010, 06:02 AM
the Depth of Field stuff he does is fantastic, especially for blurring the edge of meshes in the foreground with the blur behind them. Its exactly what Adam was looking for when he was doing his Evil Genius Base environment.
e: guy needs to make a tut. :P
it's a rather easy effect. what you basicly do is blur the image, subtract the blurred from the original to get the difference and then add it to the original again.
http://dl.dropbox.com/u/777995/UnsharpMask.gif
http://dl.dropbox.com/u/777995/unsharpMask.jpg
marked in red is the "optional" mask part
not gonna go into the blurring algorithm since it's just the same scene texture offset once in all 4 directions by 1 pixel, added together and divided by the number of different versions ( don't forget the original :P).
you can go pretty fancy with the blur kernel if you feel like it, but I didn't.
haiddasalami
11-08-2010, 06:15 AM
the Depth of Field stuff he does is fantastic, especially for blurring the edge of meshes in the foreground with the blur behind them. Its exactly what Adam was looking for when he was doing his Evil Genius Base environment.
e: guy needs to make a tut. :P
I read through that thread. Makes me sad for not opening my shaders book more and doing more rendermonkey stuff :(
@Sean: I tried my hand and got some weird artifacts going on in mine. I used the sharpen filter matrix but failed :( Might take a look at what Xoliul has and just do that.
Edit: Divi got it. See where I went wrong. I was offsetting the texture but not adding it back with the original texture. Seems a lot like how edge dection works...
yeah, you could also use some advanced edge detection algorithms to get a nicer sharpen effect. sharpening is nothing more than increasing the contrast between adjacent pixels depending on how much contrast there is to begin with.
Sean VanGorder
11-08-2010, 07:13 AM
Oh wow, thanks a lot guys. This is exactly what I was looking for. It's nice and simple too. I was worried I would have to learn some HLSL in order to do this. Which isn't really a problem, but I wanted this effect for a school project.
Once again, Polycount unites to save my ass.
EDIT: divi - Just so I'm sure I'm not messing anything up, what is being input into the divide node there on the right?
haiddasalami
11-08-2010, 07:25 AM
Oh wow, thanks a lot guys. This is exactly what I was looking for. It's nice and simple too. I was worried I would have to learn some HLSL in order to do this. Which isn't really a problem, but I wanted this effect for a school project.
Once again, Polycount unites to save my ass.
EDIT: divi - Just so I'm sure I'm not messing anything up, what is being input into the divide node there on the right?
the input is a blurred scene texture sample 4 ways 1 pixel offset. Also he's dividing by the number of samples he did to blur the image. Need to write this paper fast haha so if Divi doesnt respond Ill post a network up.
haiddasalami
11-09-2010, 06:38 AM
Sorry stuff came up but if you didnt manage to get it here ya go. Just a simple box blur filter.:
http://dl.dropbox.com/u/391285/BlurOffset.png
you need to divide it by 5 :P
another thing that might be good to do but not actually necessary with a blur that small is to use the actual size of a pixel to offset or you get a squashed blur and "halo"ing effects. just divide 1 by the horizontal and vertical screen resolution and multiply the result by however many pixels you want it to be offset.
haiddasalami
11-09-2010, 08:50 AM
Whoops. Gonna try that divide trick divi. Would it just be ([1/1920]/1080)*# of pixels? Wonder if UDK has something like viewport_inv_width.
well, you have to use the horizontal size for the X and the vertical size for the Y eg. 1/1920 and 1/1080. it can become slightly confusing, especially when doing larger blurs for a bokeh but especially with those it gets realy obvious if you don't do it properly.
pixeldamage
03-26-2011, 12:01 PM
Hmm i've tried using the setups listed below and i've gotten the blur to kinda work but the sharpen effect gives a weird effect and i'm not sure where i'm going wrong. I've posted the shader setup, perhaps someone who knows more about it can help, please?
http://dl.dropbox.com/u/3647139/shader.png
Froyok
03-26-2011, 01:37 PM
Check "screen align" in every "Scene Texture Sample" node I guess. ;)
Work fine for me, thank you guys :) :
http://uppix.net/5/8/d/bd45ada406fae2c78feb8833c37e1.gif
haiddasalami
03-26-2011, 03:25 PM
Check "screen align" in every "Scene Texture Sample" node I guess. ;)
Wouldnt believe how many times I have forgot to turn that on :P
pixeldamage
04-23-2011, 03:26 PM
haha thanks that fixed it! :)
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.