# RT Unlit Transparency Color Detection in Game

**URL:** <https://forums.unrealengine.com/t/rt-unlit-transparency-color-detection-in-game/1796129>\
**Category:** Rendering\
**Tags:** unreal-engine, transparency, Rendering, question\
**Created:** [April 9, 2024, 8:57pm UTC](https://forums.unrealengine.com/t/rt-unlit-transparency-color-detection-in-game/1796129 "2024-04-09T20:57:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Filas12](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Filas12](https://forums.unrealengine.com/u/Filas12)\
**Post date:** [April 9, 2024, 8:57pm UTC](https://forums.unrealengine.com/t/rt-unlit-transparency-color-detection-in-game/1796129/1 "2024-04-09T20:57:11Z")

</div>

I have a peculiar question. For my game, I’d like to detect the color of overlapping transparent cubes. Ideally, I’d be able to extract the color of the sheets in the unlit scene shown here (G over R = Yellowish color). Bottom line, I need the lighting to be consistent across all cubes. The overlapped color changes when one is far more lit than the other, and this is the problem I want to avoid. However, I have no idea how to accomplish this. Please, do you have any ideas?

 ![Unlit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/7/1/371ae2e484a9e79a77b957d3152c65441d9cf405.jpeg)

 ![Lit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/c/3/dc3194cdb88a87b76e4a9f24d89dfffb5628c08b.png)

---

<div class="post-metadata">

**Author:** ![Filas12](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Filas12](https://forums.unrealengine.com/u/Filas12)\
**Post date:** [May 16, 2024, 8:57pm UTC](https://forums.unrealengine.com/t/rt-unlit-transparency-color-detection-in-game/1796129/2 "2024-05-16T20:57:21Z")

</div>

Small Update:

After learning a lot more about the program, I was able to figure 80% of this out.

First, set the transparent material to translucent with the shading model unlit. This will eliminate lighting from generating potentially unwanted colors.

 ![Screenshot 2024-05-16 134425](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/1/fd169a1de2dd5f49c873767ee85cd6be556e32d2.png)

Second, set up a SceneCapture2D Component where you want to view the colors. Set the Primitive Render Mode to “Use ShowOnlyList” and add the chosen objects (in my case the red and green cube) to the Show Only Actors. Go to the show flags and disable atmosphere and other unwanted details.

 ![Screenshot 2024-05-16 135150](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/9/089b915d1a695466765210669b7610c66279efe4.png)

Lastly, add a render target to the SceneCapture2D component and click inside. Set the Texture Group to 2D Pixels (unfiltered) to illuminate smoothing and averaging of colors. Now you have a texture with precisely four colors: black for a background

 ![Screenshot 2024-05-16 134329](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/3/da3a696566ecf619fa4fa6bca4c096820791fdd0.png)

Let me know if there’s something wrong with what I’ve outlined here. The last thing I need is a quick method to record colors displayed in the render target. If the SceneCapture2D and the objects are stable, you can calculate the pixel position and find the colors that way. If the objects are moving, is there a real-time method to save unique colors?
