I am trying to achieve the look of old, uneven glass - where everything we see through it is subjected to a slight wobbly distortion (static one, no animation). It should feel kind of like a funhouse mirror - only with refraction instead of reflection.
No matter how I try approach the thing, I always end up with very pixelated, blocky refractions - and can’t seem to be able to bring them to a nice polish.
I have tried using a translucent material with a smooth noise normal map. Result: Blocky.
I have tried the above material with built-in meshes and imported meshes of various polycount. Result: Blocky.
I have tried a simple translucent material with just an IOR, applied to a distorted mesh. Guess what: Blocky.
Kind of out of ideas here. Is it even possible to do?
It´s easy to do with raytraced or pathtraced glass (using UE 4.27). Since you want a distorted refraction, the best way is to use a noise texture as refraction input, that is just range mapped to a fitting IOR value, something like this (since my noise texture was pretty light colored, i increased the IOR target range to 1.3 - 1.7, to make the distortion more visible):
Thank you @Suthriel - I’m gonna give it a shot tomorrow!
I wonder if it will work. I recall my object completely disappearing when I brought the opacity value to 0, forcing me to keep it at very-low-but-present value (I think I settled on 0.01).
Depending on my success I will either have a standing ovation for you, or a follow-up question
That is normal and WILL and SHOULD happen in every program, IF you have a perfectly clear material, that also happens to have an IOR of 1 Because that are the material properties of air, which fills in the rest of the scene ^.^ Thats why your range should never start at 1, otherwise it becomes air.
Your perfectly clear Glass needs to have an IOR above 1 (well, or below, but usually all normal glasses are above 1, around 1.5), to become visible through its different refraction, because otherwise it is indistinguishable from air, and the raytracer/pathtracer will treat it as such, making it basically invisible.
But that is great for creating seamlingless heat haze or f.e. black holes, that blend perfectly into the scene without any visible border. Like this ^.^
Argh, youtube is making it way more noisy than it is -.-´
Something I did not mention sooner is: the project is designed for VR. While it is targeted at Desktop environment with Max Settings, I wonder if there aren’t some limits imposed by VR that would make this happen.
What I notice happening is: As I open the project it typically looks OK-ish. Not as smooth and crisp as it would in non-real-time rendering, but maybe a bit aliased, yet acceptable.
As soon as I preview it in VR, the low quality kicks in and stays even in the viewport, after exiting VR. Makes me think it’s not so much about the shader as it is about engine/project settings.
Viewport right after launching the project. Did not touch anything:
I have no clue about VR, so i can just guess, that it may be swichting to a different lower quality level to keep the framerates high.
And yeah, that noise comes from the pathtracer, that i had running, since you didn´t mention anything about VR, and i knew, that it worked with this method, and pathtracer usually have the best way handling translucent materials (if it can get enough samples, which it did not in the preview ^.^ )