Glass transluency shadow vs Specularity

Hi everyone,

Sorry if the question has been answered already as I’ve been searching thoroughly through the hub and didn’t find an answer.

I am trying to make some realistic glass over a pot shaped mesh. The problem I face is that I have to trade reflections for shadowing.

Here are exemples.

Detail option “Cast Volumetric Translucent Shadow” OFF :

Nice reflections but, of course, no shadow on the ground surface.

Now, just ticking the " Cast Volumetric Shadow" ON :

Nice Shadow indeed… But the reflection (specularity) has disappeared in the process. The windows are not reflecting on the material anymore.

I have tried numerous tweaks, but nothing helped. TLM is on, Surface is set to Translucent, but nothing seems to resolve the issue.

Thanks by advance.

Hi Guicot,

There may be a solution for this in the future, but at the moment when you’re using TLM_Volumetric_Directional, as you noticed this will give you shadows but you’ll loose the reflective nature on the glass. It’s best to use TLM_Surface for glass, but you’ll loose the shadow information.

There are plans to improve this type of work with translucency as it’s one of the more noticeable areas the engine could be improved. 4.8 will include some improvements in this direction that will be a start to this process.

I do, however, have a workaround to help for the moment though.

Here are the results of my work around:

28274-translucent.png

I didn’t up the lightmap resolution for the floor podium so that can be improved.

For my setup, I have two meshes.

  • Get your shadow casting mesh exactly where you want it and make sure everything bakes the way you would like.
  • Then create a copy that you can place back in that exact spot.
  • On the original shadow casting mesh you’ll want to go into the details panel and uncheck the option “Render in Main Pass.”

Once you’ve done this and build lighting you’ll be able to have one mesh cast the volumetric translucent shadow and the other will be the visible mesh handling the reflections.

Give this a shot and let me know how it works out.

Thanks!

Tim

Hey Tim,

Thanks for the advice ! It worked as soon as I unticked “render in main pass” on the first copy but the reflections vanished with building the scene… I tried and tried and it did not stand the lighting build. I updated the reflection captures in the meantime with no success.

This gave me an idea though, I checked back the “render in main pass” box and unchecked “cast volumetric translucent shadow” instead on the first instance and it worked as intended. However, the two objects were adding opacity to each other so I had to tune down transluency and put some more white color on my glass material to obtain something believable.

To sum it up, I now have two sames meshes on the same spot, original one showing reflections (Volumetric Translucent shadow off) and the other acting as a shadow caster. Here is what I came up with :

As you can see, the result is close to yours, but some of the triangulated geometry is now visible on the far left of the pot. I know for a fact that glass is the nightmare of all 3D artists, but a few improvements in this area would be a major step in Archviz on Unreal Engine.

This problem is resolved for me, unless you may have some more tricks to share :wink:

Thanks again for your help.

Just a small update. I used the metallic channel and brought it to 1 to get better reflections. Added a normal map to simulate small imperfections. Pushed the color map to full white (to compensate the metallic nature of the material) and repostionned the reflection capture actor in the center of the pot. Here is the result :

I came with a more believable glass pot. Good news is, there is a lot to explore with current sytem to obtain clean results. Bad news : We still have to work with two instances and this is far from being a Physically based material.

However, I am quite pleased with the result. Still a long way to go, but I just can’t say how I am excited with this new engine.

For better explanation, here is a glimpse of my set up :

Is this method still working with the 4.10/4.11 version? I’m trying to do the same thing but with “Volumetric Translucent Shadows” on the 2nd mesh it doesn’t cast any shadow.

What can I do?

You will also have to set the light to have Cast Volumetric Translucent Shadows enabled as well, IIRC. It’s been a while since I last did a setup for this. Right at a year in fact.

I’m using the standard Light Source (stationary) and there is not such option.

Btw, is this the method I still need to use or we got some new features for the translucent shadows?

As the initiator of this conversation, I must say that I had to switch to traditional renderers for this project due to the complexity of this workaround. I would love to hear some news on that too as it prevented UE4 from being my weapon of choice. I still have to download the latest beta though…

Isn’t the simpliest option for now tick Cast Shadow as Masked ? still better than no shadows right ?

I still have to try this, I don’t remember this option to be available at the time. I’d love to see some feedback on this.


Dynamic lighting

  • On your Movable light source, enable Cast Volumetric Translucent Shadow
  • On your Translucent object, enable Volumetric Translucent Shadow

This will allow a dynamic translucent shadow to be cast from the light source, but this only works with movable lights.

  • Note that 4.10 had an issue where the translucent shadow was not visible unless the mesh was selected in the editor. This has been fixed in 4.11.

Static Lighting:

This will bake automatically without any issue, but static lighting doesn’t store specular highlights in the light bake.


Stationary Lighting

This can handle getting specular highlights, but there will not be a baked translucent shadow.


Some things you that can be done to improve lighting.

  • You can use the Surface Per-Pixel Lighting Mode in the material. Then use the the console command r.fowardlighting 1 to enable specular highlights on translucent materials. Note that this still does not store specular highlights in the lightmap with static lighting. Use this with stationary and movable lighting.
  • For reflections you can now enable Screen Space Reflections (SSR) in the material as well.
  • Use Specular value in the material. You can use a scalar value and an instance to see the difference in a scene.

The original notes above should still work regardless of the newer changes that have come in since for the forward lighting and ssr with transluceny.

Thx Tim. With Render in Main pass disabled and dummy objects, and if the shadows have a softbox feel to them then one can indeed simulate shadows from translucent materials with the technique described by Tim and acceptable results. Is there anything new with the newer versions like 4.14 regarding this subject?

The following screenshot is from 4.14 and Forward shading translucent materials.