Download

Glass material. Is it possible to get Transparency+Reflection?

Hi all!

I need to get a decent glass material to be used for ArchViz. After several failed tests, I have not been able to make a glass surface to reflect and to be partially transparent at the same time. Searching in the forums, I've found several threads related to the problem and it seems to be due to the fact that UE4 uses a Deferred Lighting shading algorithm and it makes impossible to conjugate both effects (translucency and reflection). 

Since glazing is so common in Architecture, and there is so many people using UE4 for ArchViz, I am sure that there should be some workarounds that can emulate the effect in UE4.

How do you, Architectural Visualizers, implement your glass materials?

Dark grey base color, 10 specularity, 0.1 metallic, 0 roughness and 0.35 opacity should give you translucent reflections as long as you set Translucency Lighting Mode to TLM_Surface.

Do you mean this?. It just gives a transparent material. Am I doing something wrong?

Dont rely on material editor’s preview for translucent materials. Put it in your level and you will see that it works.

No, It does not work. I put the capture of the editor window in my reply just for you to check the material itself. :frowning: Once in the scene, the surface looks just like a transparent dark surface. No reflections of sourrounding objects at all.

I also checked the general quality settings and Material Quality is set to high, just to be sure that it is not a fault of the system configuration.

Thank you anyway for the try.

Make sure you have a reflection capture sphere in the same area with a radius large enough to include your object otherwise you wont get proper reflections. :slight_smile:

Using a reflection capture sphere gives a sort of reflection effect in the glass, but once you beging moving, the paralax is absolutely wrong, making, for instance, an object that is very close to the glass being reflected in a distant different area of the glass. Obviously, one can position the capture volume in any position, giving different effects but it allways will yield wrong reflections as the player moves.

Probably, this approach could be enough for certain applications (i.e. games), but for a good architectural visualization, one needs precise reflections.

  Thank you anyway for the suggestion.

Reflection captures are definitely a shortcut that won’t give perfect reflections, but they do a pretty good job of faking it. Perfectly accurate mirrors aren’t currently doable in UE4, but you might look into Scene Captures, which are cameras that create a texture from what they see. They cost performance because they render everything in real time instead of taking a single sample, but there are some clever ways you can incorporate them into materials for specific objects. You have to use them sparingly, though. I would honestly suggest working with the normal reflection captures, because I’ve personally found that I’ve slowly learned the best techniques that give acceptable results. You can’t really expect perfect reflections from a real time engine.

The capture actor’s position isn’t arbitrary, and you can have several, with overlapping volumes, and they will blend with each-other, the main thought from the documentation is to have one large actor, for gross reflections, and have little ones for things like glass windows, and other objects that reflect light to a high degree.
Furthermore, the capture actor (silver ball) is the location the reflection is rendered, so you could have an actor that changes position, or one that’s more in line from where the reflection has to be perfect.

Hey there,

I just had the exact same problem and posted some questions about it on the answer hub. Hopefully we came to a nice (and temporary) solution for this with two instances of the same asset and some tweakings to the original glass material… Hope it helps, it did for me :

https://answers.unrealengine.com/questions/164985/glass-transluency-shadow-vs-specularity.html

I’m also trying out to get a good glass material and I find it crazy that the excellent screen-space reflections can’t be used with transparent materials. I understand I need to do a reflection capture but for the love of god use your screen-space reflections! It was the main reason we switched to UE4.

Also since we’re discussing glass, I’m trying to multiply only the refraction with a color (with a fresnel) while leaving the reflection as is.
The only way I managed to do that was to add a 2nd object behind (and not very close because of the z-buffer errors I get).

Examples:

In the first image you should see the first window without the green multiplication and the 2nd one (the one in the middle) that uses it.

Ideally we’d like to have a layered material with a reflection layer and a colored transparent layer (multiplication) each with a fresnel variation, but let’s just start with a nice reflection first.

This is coming soon! If you download the Master branch off of GitHub it has SSR for translucency. There is no info or documentation on it currently, and it is likely an early work in progress, but it is an upcoming feature. Which is awesome! :slight_smile:

Yeah, the way luis set his material up is just like how I set it up but even with a reflection sphere or box sphere, the reflections are way off. Scale and distance are not accurate. But it works if you need quick glass for proofing. I’ve updated with an advanced version that works well, but no shadows. I’m working on some witch craft to get that going and tighten the reflections.

I agree it would be awsome but I’m working on a modified fork of 4.7, it’s up to date with the latest commits (sync upsteam ~ once a day) and I don’t see any SSR in my transparent materials. Is there anything I need to choose, maybe a different type of material or something I’m missing?

It’s in the master branch which is 4.8 on GitHub and not the 4.7 branch. It’s still early on and is considered experimental. This branch is also not tested by QA in those builds and can have known issues.

I downloaded the Master branch a few days ago now and it has been added, as you can see in this very quickly thrown together test. It is simply a new checkbox option in the Translucency section of the material’s details panel.

awesome, but am i the only one who’s missing full control over the fallof/fresnel effect blending the reflections in? i would like to have the oportunity to create a chrome material using only ssr and no captures - please :slight_smile:

Fantastic! Will this work well with dynamic light?

That scene is actually 100% dynamic with force no pre-computed lighting turned on. It was only a quick test an I may go back to it again soon with a moving camera to test it out further. That shot was literally enable SSR on the material, throw some meshes in the way and hit record… :wink:

Hey you guys, you should watch this tutorial.