change emisive mesh light color over time without affecting video playing on screens with PP Volume

Hi

I have a scene where I am using emisive material assigned to a mesh and 3 screens playing video’s in the scene.

[ATTACH=JSON]{“data-align”:“center”,“data-size”:“full”,“data-tempid”:“temp_195725_1592741307601_262”,“title”:“screens.jpg”}[/ATTACH]

https://forums.unrealengine.com/core/image/gif;base64

I would like to have the light change color at specific times while the videos are playing. The only way I can think to do it is with a post process volume and a level sequence. I don’t want the videos playing on the screen to be affected by this post process change.

I have set up a post process material and set the mesh to “Render Custom Depth” and Custom depth stencil pass to enabled with Stencil in my projects settings, I have set up my post process material as below with results below that, when I apply a texture or video to this the texture looks like it is applied to the screen and is masked by the mesh shape.

[ATTACH=JSON]{“data-align”:“none”,“data-size”:“full”,“data-tempid”:“temp_195726_1592741683016_34”,“title”:“currentScriptAndResult.jpg”}[/ATTACH]
https://forums.unrealengine.com/core/image/gif;base64

Is this the correct approach and what do I need to change to make it work? or is there another way to approach the changing of the lighting in the scene at particular times?

Thanks.

I’m not sure how to help with that, but the picture didn’t post on my end (using Firefox).

Thanks for the heads up, working fine on Chrome, here is the images:

The logic looks incorrect. It’s currently saying that if the stencil is a value greater than OR less than 0, then render a red emissive color. And if the stencil value is equal to 0, then render the post process. I understand the objective you’re trying to achieve, and it would be better to do it a different way, I think, rather than with a stencil. The stencil is going to replace the entire texture and not only the mask unless it’s set up right.

Thanks for more information. Can you post the material’s basic settings too? Domain, Blend Mode, Shading Model, and the other properties in that panel?

Thanks for the response. I’m new to this side of rendering in UE, mainly used it for Arch Vis and narrative linear shorts so thanks a lot for the advice.

Other than the Material Domain changing to Post Process it is everything at default.

Coming from a post production background my logic was to effectively generate an alpha for the screens to cut that out of the post process volume color correction, obviously that’s not the way it works in UE.

So, I’m new at Unreal Engine too, in particular the post process materials. But I looked up the doc page, and there’s a section that may apply to the scenario.

A blueprint for it could be created that changes the texture / emissive color every so often (time based on tick, or another way). Is it one emissive color that’s being used, or a number of colors being switched from one to another? In addition, under “Blendable Location” in the material’s settings, it might be easier to get it working with “Replacing the Tonemapper” or “Before Translucency”. I’m thinking that because “After Tonemapper” is for LDR coloring, and is after color grading, which you said you were trying to get an alpha mask to cut out of the color correction. But I’m digressing by confusing color grading with color correction, most likely.

Switching between material instances sounds easier than a stencil and scenetexture node. However, I think I’m missing the point of the emissive color / texture transitions.

Thanks Presto, I presumed that the emissive color used on a mesh was baked into the textures when you do a light build and could not be changed over time, which is why I thought the only way it could work was to use the Post Process Volume and change it’s attributes with a level sequence. I will take a look at this now.

Again, thanks for your help. :slight_smile:

Think I’ve got it. Solution was to get the stencil mask and take it away from the screen output, duplicate that and drop in a “one minus” node to invert the selection and add those outputs in the same Post Process Material:

What did the 1-minus node do, visually speaking? Great that it was solved by the new setup.

The A input part of the add node selects the meshes that are stenciled and effectively does nothing to that selection, that’s what the constant 1 does

the B input part of the add node selects the inverse of that, the 1-Minus node inverts the stencil selection of the mask, the green color is then multiplied over that selection to change the hue of the scene.

Adding both of these together gives the result where the stenciled meshes are ignored. The B input part of the network doesn’t work on its own as it outputs as a black mask over the stenciled meshes.

Did the Blendable Location need to be changed to something other than “After Tone-mapping”?

Blendable Location was set to after tonemapping, everything else was default,