# Emissive lighting with a hidden/invisible object

**URL:** <https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [April 5, 2023, 4:21pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873 "2023-04-05T16:21:46Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quips](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quips](https://forums.unrealengine.com/u/Quips)\
**Post date:** [April 5, 2023, 4:21pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/1 "2023-04-05T16:21:46Z")

</div>

Hi,

I saw a cool trick on the state of Unreal Engine presentation. The developers of Hexworks using it on their game Lords of the Fallen. This seems very usefull and tried the Lumen\_CARD\_Replace custom node but didnt seem to work for me in 5.1. Not sure what im doing wrong. Need help to get this working. Thanks.

 ![Stateofunreal.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/2/5524d3c3a46f9a67f3e98c3a75bf578032e5b4a2.jpeg)  
 ![Lumen1.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/3/c/f3cf0f3183384a5cf8beb1109a671e69c9a069ae.jpeg)  
 ![Lumen2.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/2/d/e2df41e13117c15fb506c55468872c3c71c073dc.jpeg)

---

<div class="post-metadata">

**Author:** ![BananableOffense](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BananableOffense](https://forums.unrealengine.com/u/BananableOffense)\
**Post date:** [April 5, 2023, 4:33pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/2 "2023-04-05T16:33:21Z")

</div>

The code in your custom node has the inputs named “InputA” and “InputB” but your node is set up with the names “Lumen” and “Default”. You either need to change the names in the code to match the node, or vice versa.  
The input “Lumen” and “Default” means nothing to the code as it currently is written.

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [April 5, 2023, 5:00pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/3 "2023-04-05T17:00:46Z")

</div>

Worth mentioning this approach basically doesn’t work unless you disable screen traces.

---

<div class="post-metadata">

**Author:** ![BananableOffense](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BananableOffense](https://forums.unrealengine.com/u/BananableOffense)\
**Post date:** [April 5, 2023, 5:15pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/4 "2023-04-05T17:15:00Z")

</div>

Disabling emissive doesn’t really work unless you also disable traces like you suggest. But I think enabling emissive on an otherwise invisible object should be just fine, since there would be nothing on screen to trace anyway.

---

<div class="post-metadata">

**Author:** ![Quips](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quips](https://forums.unrealengine.com/u/Quips)\
**Post date:** [April 5, 2023, 5:43pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/5 "2023-04-05T17:43:36Z")

</div>

Thanks, I will try it at once I get the chance !

---

<div class="post-metadata">

**Author:** ![Quips](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quips](https://forums.unrealengine.com/u/Quips)\
**Post date:** [April 5, 2023, 5:44pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/6 "2023-04-05T17:44:09Z")

</div>

Thanks for the tip.

---

<div class="post-metadata">

**Author:** ![Quips](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quips](https://forums.unrealengine.com/u/Quips)\
**Post date:** [April 5, 2023, 8:57pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/7 "2023-04-05T20:57:32Z")

</div>

I dont want to disable emissive, just have an invisible emissive sphere that can be used to light certain areas. Will my approach work ?

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [April 5, 2023, 8:58pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/8 "2023-04-05T20:58:51Z")

</div>

It works… if you disable screen traces.

If you just fix your custom node and give it a try you’ll understand quickly why this is.

---

<div class="post-metadata">

**Author:** ![Quips](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quips](https://forums.unrealengine.com/u/Quips)\
**Post date:** [April 5, 2023, 9:05pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/9 "2023-04-05T21:05:58Z")

</div>

Ok, thanks! On holiday, but excited to try it out when I get back.

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [April 5, 2023, 9:11pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/10 "2023-04-05T21:11:19Z")

</div>

Another problem with this approach is that the mesh will still be visible in reflections, since Lumen reflections just return whatever it finds in the Lumen scene.

---

<div class="post-metadata">

**Author:** ![Quips](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Quips](https://forums.unrealengine.com/u/Quips)\
**Post date:** [April 5, 2023, 9:35pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/11 "2023-04-05T21:35:00Z")

</div>

Hehe, ok. When they explained this in the state of unreal where my reference is from it seemed like such an elegant solution…maybe not.

---

<div class="post-metadata">

**Author:** ![BananableOffense](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BananableOffense](https://forums.unrealengine.com/u/BananableOffense)\
**Post date:** [April 6, 2023, 1:23am UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/12 "2023-04-06T01:23:59Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/e/c/dec77aeae337f4ef66033318edc7557b24690815.jpeg)

I found screen tracing to cause inconsistencies when using a small light source, but it didn’t seem to cause any noticeable issues with a larger light sources like the one shown above (~1 meter diameter I think) with screen tracing on and still looking great. Disabling screen tracing did make the smaller light source more consistent. Much to my surprise, this setup did not cause the light source to be visible in reflections.

(here it is with the opacity set to 1 for reference)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/3/9/f3987443bf5194741afce9d8fb074f7378396b81.jpeg)  
Half meter sphere with screen tracing on (foreground is missing light):  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/f/fbf4eb9b3802245834f78ba461105fb58f371fd8.jpeg)  
And with screen tracing off (foreground properly lit):  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/6/0/8607534ac53900c352155a14b53863d6926c7c53.jpeg)

However, it only really provided satisfactory results with hardware raytracing enabled, in my opinion. Software RT looked really bad and inconsistent. Also be sure to enable “emissive light source” on the mesh otherwise Lumen will quickly cull it.

Huh, on further testing, I don’t seem to need the lumen card replace custom node at all. Even when the object is totally masked it still seems to add the emission. I also noticed I got better results when the material is set to two-sided, especially when screen tracing was on - even when the back-faces of the material weren’t emissive. Not really sure why.

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [April 6, 2023, 2:48am UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/13 "2023-04-06T02:48:04Z")

</div>

> [@BananableOffense](#):
>
> Much to my surprise, this setup did not cause the light source to be visible in reflections.

~~That’s interesting, are you sure reflection screen traces weren’t just masking it?~~

~~Screen traces can be disabled separately for Reflections and ScreenProbeGather.~~

Seems this happens when you use hardware raytracing with hit lighting for reflections. Very interesting.

I always had problems with self-shadowing with screen traces enabled regardless of the size of the emissive source. 1 meter sphere was used here for testing. Maybe it’s just less noticeable in exterior lighting conditions.

---

<div class="post-metadata">

**Author:** ![BananableOffense](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BananableOffense](https://forums.unrealengine.com/u/BananableOffense)\
**Post date:** [April 6, 2023, 5:06am UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/14 "2023-04-06T05:06:11Z")

</div>

> [@Arkiras](#):
>
> Seems this happens when you use hardware raytracing with hit lighting for reflections. Very interesting.

Seems you’re right. Software RT can show the sphere in the reflections but hardware RT does not.

> [@Arkiras](#):
>
> I always had problems with self-shadowing with screen traces enabled regardless of the size of the emissive source. 1 meter sphere was used here for testing. Maybe it’s just less noticeable in exterior lighting conditions.

You inspired me to finally dig into this. I noticed the shadows align to a grid which made me realize it must have to do with Lumens voxel size.

Specifically, it looks like its a factor of the distance between the surface and the Lumen Radiance Cache grid resolution. Increasing the resolution will allow the surface to get closer before you have a miss, and also visibly decreases the size of the grid tile. Below you can see 32, 48 (default size) and 64 sized grids. (larger resolution = finer grid)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/b/9/5b95757fc97b99d93c8a79655a37dffc73d18a78.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/1/171d2b13c2dff80b1241fdd466d23fb082829f2b.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/4/cd47ca64ad7cca46d27acf6a04868aecbb53d6b3.jpeg)  
Probably should’ve put something in there for scale other than the axis handles, but you can hopefully see that unsurprisingly the 64 grid shadow is proportionately smaller than the 32 grid. At 128 I couldn’t get a gap to show on my half meter sphere if I wanted to due to the voxel being smaller than the sphere. I think this is why large emitters don’t have as much of a problem either - they may not be able to get close enough to the surface.  
This was achieved with:

> r.Lumen.ScreenProbeGather.RadianceCache.GridResolution

In my simple test scene it actually didn’t seem to effect performance at all. Give it a shot - might be worth cranking up in certain interior spaces especially.

It seems it actually even brings Software RT emissive into the realm of usability, if you can get past the emitter being visible in the reflection.

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [April 20, 2023, 2:16pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/15 "2023-04-20T14:16:25Z")

</div>

@BenVlodgi posted this in another thread and thought it would be relevant here:

> [@Emissive material only visible to Lumen (invisible in game)](https://forums.unrealengine.com/t/emissive-material-only-visible-to-lumen-invisible-in-game/620888/2):
>
> 5.1 Added AffectIndirectLightingWhileHidden. [Release Notes](https://docs.unrealengine.com/5.1/en-US/unreal-engine-5.1-release-notes/). Added an AffectIndirectLightingWhileHidden property to the Primitive Component, which allows hidden primitives to be injected into Global Illumination (GI) and Reflections. This is useful as an extra art direction tool to create cheap invisible area lights through GI.

Didn’t notice this in the release notes. It still seems to require disabling screen traces to get decent results, but at least you don’t have to set up a material switch for the Lumen scene which makes it easier to work with since you can actually see what you’re doing.

---

<div class="post-metadata">

**Author:** ![BananableOffense](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BananableOffense](https://forums.unrealengine.com/u/BananableOffense)\
**Post date:** [April 20, 2023, 2:28pm UTC](https://forums.unrealengine.com/t/emissive-lighting-with-a-hidden-invisible-object/852873/16 "2023-04-20T14:28:45Z")

</div>

Saw that the other day too, meant to test it out and post it here but was working on other stuff. Guess you saved me the trouble. Shame it doesn’t solve the screen tracing limitations though.
