Howdy! I need to have a skeletal mesh (or even better, a single Material) be only lit by certain light. I have read up on this issue and found that its difficult to turn off all lighting on a mesh due to deferred lighting - that is, my level has static and stationary lights that illuminate my skeletal mesh even when its on a different channel. Unless I’m missing something, placing the skeletal mesh on a different channel didn’t work, and changing all of the lights in the level to be moveable is not ideal.
So to understand, you set the channel of this skeletal mesh to, let’s say Channel 1. Did you set the lights which are to only affect it to the same Channel?
That’s the thing, I take the skeletal mesh and set it to channel 1 or 2 to with the expectation that when I rebuilt the lighting non of the lights will affect the mesh as its on a different channel, and it will become dark or black- yet they’re still lit as if nothing has happened. This is likely to do with the majority of the lights being static/stationary.
Well you are right to use moveable lights (stationary works too) as static lights get baked and don’t get counted at all, especially for skeletal.
What is the skeletal mesh, is it a default engine asset like the Mannequin?
You shouldn’t need to rebuild lighting channels to see this working.
I just tried this myself and it works fine in an empty scene: both skeletal mesh and lights were set to the same channel. Maybe there is an alternate light source keeping it lit, such as a skylight or post process cubemap.
Unfortunately I tried deleting skylights/all volumes in the scene and set all lights to be stationary and still received a similar result - And of course the biggest issue is I want all of these in the scene and to just not affect this particular actor, even a particular material. I tried also using other objects to cast shadows on it/block the mesh from the lights to no avail. I will look into the settings, a potential solution is to use a post process material. See the objective is to make a small space appear dark until I flash a light into it
That’s a headscratcher. By setting the skeletal mesh to a different light channel, it should go black. Certain lights ignore channels, but if you deleted all lights, it’s odd that it persists and still seems like something is there to light it.
If the effects is as simple as it lighting up when a flashlight hits it, you can swap materials on the skeletal mesh based on a sphere trace from the flashlight.
For now my solution was to simply lerp between a 0 to 1 strength for the base/specular color within the material - it starts at 0 and when the flashlight is turned on it goes to 1. It works at a basic level.
Yes I couldn’t identify what was still lighting the scene after I removed all of the lights I can keep looking at that (it may have been the sphere reflection for example). If I find anything new I’ll post it here.