Hi, The other day I asked it here : http://neatcorporation.com/forums/viewtopic.php?f=4&t=2039 no one seems to know the answer although it should be not that hard. I just need some clue. The question is how to achieve the mirage effect (the reflections) that is appeared on the road in the image below: It should be a shader…
Problem is you're not going to be able to capture anything other than what's in a cubemap and you've got to deal with all the problems associated with cubemaps. If you do it in screenspace it will work for dynamic objects which is really important if you're trying to render a road with cars.
@radiancef0rge Not exactly right. This only happens in certain conditions. Usually when there's a layer of very hot air rising from the street. You're not seeing the ground reflect, you're seeing the air reflect, if I'm not mistaken. BUT, fresnel is a good place to start, I'd imagine, since it does share some personality…
Take the for product of the blue channel of the camera vector and the vertex normals. This should give you a fresnel that only works vertically. From here, you want a road normalmap that has the waves. To make it happening only in the distance, you can use pixel depth. Then lerp between 0 and 1 metallic based on the mask…
I'm wondering if there isn't some automatic way of doing this. You can use the same "mirage streak" texture on the entire road, but make use of pre-authored mipmap levels that have a different transparency for each level. This way you associate transparency with distance from the camera: the texture will automatically…
Huge thanks @Obscura, I've learned a lot about some new nodes that I've never used before with the image you've made. So today our city (Babolsar) was strangely very snowy and they closed our school, so I didn't waste time and managed to make the mirage effect with good realtime reflections. The note is , @radiancef0rge…
This is fresnel. You should be able to see this in any modern engine using PBR. If you are not seeing this, your roughness is incorrect or your camera is not perpendicular enough the surface normal.
Okay so this is what I have now (shown below), thanks. I'll fine tune and may change the mirage normal map later. Also the image shows some reflection errors which also I'll work on it sometime.
Hey all, thanks for the replies I am reading them and some are actually really informative, but I should solve a misunderstanding here. Shader forge is a node-based shader editor tool just like the one that is used in Unreal or CryEngine, Or the one that is used in 3DS Max. So yeah, nothing automatic or magical happenes…