post process drunk effect

hello community
anyone know / have idea how to make a drunk effect? really want to learn that.
thanks in advance.

I’d try:

  1. make a normal map of some blurry cloud textures, or just try using random normal maps from engine\content\ with Mip Bias to blur. Like this texture:

  2. Make a new material and set the mode to PostProcess material. Then you sample the SceneTexture and use the normal map to add some distortion by multiplying the XY channels by a small parameter and adding to the ScreenPosition UVs before hooking to the Scene Texture. By combining a few of these and tweaking the scale of the distortion textures you could make something matching the drunken effect from the original Deus Ex pretty easily.

  3. Could also try tinting the scene color by multiplying by a value but that could be going too far.

thanks a lot for the help!!
what I currently have after following the steps Screenshot (726).jpg
but how can I add a double vision effect when drunk?
here is the material, i’m not sure if i’m following correctly XD f5c9a9fd535df0b54828403b03238760514d5786.png
thanks again for the help!
and sorry, i’m just starting to learn post processing xD

You have the right idea. First you may want to increase the scale of the texture by using ScreenPosition * Scalar parameter as the texture UVs so you can tweak the offset.

Second, looks like you used a heightmap instead of a normal map. that can work but it won’t have the same effect as using a normal map since the offsets will all be in the same direction. You can download a free photoshop filter to convert heightmaps to normal maps called the nvidia photoshop filters. Try blurring the texture a bit first.

To give a double effect, you would blend two different SceneTexture samples together, each having a different kind of distortion. You could use the same distortion texture for each but offset the time a bit so the panners don’t match up. You also may want to use a panner to make the noise textures move too. The blending could be done with the Linear Interpolate node with 0.5 in the alpha.

thanks again!
it’s almost the same as the effect I want to create, but one last question please
how can i make the double vision effect move from one side to another? because it’s currently on one side only
thank you!

Ihua, could you show us the result of the second node network through a screenshot or even better, a video link? I like your idea of drunk-o-vision.

here’s the result, don’t have any recording software sorry xD
Screenshot (731).png

currently it’s on static, don’t know how to make it swing from side to side

If you want the effect itself to ‘wander’ you could add another portion that just offsets the whole thing by a sine wave.

Do sine of time and multiply by float2(1,0) to and then multiply by a scalar parameter and call it “large bob strength”. Then add that to the UVs of the scene texture. You can offset the phase for the two versions of the offset by adding some value to time before doing sine, or by using a different period on the sine nodes.

notice that doing large overall offsets can show the effects of clamping to the scene texture but the aritfacts will be worse in the editor than in game.

if i’m following correctly, the result of the steps you mentioned above will make the camera swing right?

i’m trying to achieve the effect of something like this at 1:00
the effect of double vision swinging from side to side.
sorry for not making myself clear xD
and thanks again for the help!

oh, it seems somehow we did it. XD
here’s the result : Dropbox - Error
thanks a lot again sir Ryan Brucks!

Thanks a lot!, was able to make what I have in mind,
but one last question sir!, why does the double vision project diagonally? how can I make it project on side?
here’s the link: Dropbox - Error

Hey, did you multiply the offset amount by float2(1,0) before adding to the UVs? if you add it as a scalar it will be diagonal, because that is like doing float2(1,1). or you can multiply it by any V2 to control the direction.

omg, i’m so stupid, forgot about that
thank you so much!! working fine now!

oh cool, thanks a lot for the help! learned a lot!

RE: hello community
anyone know / have idea how to make a drunk effect? really want to learn that.
thanks in advance.

Drink 2 bottles of wine, play game. Done.

Hi Ryan,

currently trying to implement a double vision effect but can’t get anywhere with it. i’m really new to post processes so would appreciate as much detail as possible

could you explain how the panners work and how to offset them properly, please.

thanks in advance

Hi Ryan,

I’m really new to post processing and am struggling to make the double vision effect. Here’s what i have so far but dont really understand how to use the panners or offset them.

thanks in advance.

hey, I was wondering if it would be possible to get this effect without using mobile HDR. Im develloping for oculus quest, and In order for the mobile multi view to work, I have to disable mobile HDR. I still want a drunk effect in my game. Any Ideas on how to do this? Thanks a lot!

… won’t you just throw up in VR? Any depth of field effect is going to run havoc on people’s brains…

Either way, since this is a postprocess I don’t really see how you could without HDR enabled.

The alternative is going to have to be coloring every object on the scene a different color, maybe blurring their albedo but blur is expensive so use mips instead.

To do that, Every material needs to have the base color offset by a material function, for simplicity, in which the color is desaturated and multiplied by a material parameter collection so you can make changes globally.

You could also play with the position nodes to create distortions that sort of seem like the post process. I think that’s going to be way too expensive in terms of overall cost, but you should bench mark it and test on 1000 or so instanced meshes with the same material to see how it handles…

oh, you could also run/multiply a normal texture across the items to distort them less then the pixel depth and at a lower cost…
its not impossible, just very time consuming and not the same as the post process…