Download

Setting lighting channels through Blueprint instance editable variables

I’ve got a simple Blueprint driven light rig that I’m using to easily track objects while providing a quick way to orbit the lights around them for rim lighting and other purposes. I’ve promoted most of the useful settings to Instanced editable variables that let me quickly adjust them from the top while keeping the actual light inside the rig at a standard, initial setting.

The one thing I can’t figure out (if it’s even possible) is toggling the lighting channel settings to help me isolate lighting contributions when needed. I can DISPLAY the internal settings (which is helpful to some degree) but they appear to be read only at least through the options I’ve found so far.

Nothing I’ve experimented with actually seems to be able to control channels, and I’m fairly out of my league when it comes to the possibility of routing around restricted elements like that. Does this sound feasible, or should I just resign myself to what I have? Attached is about where I’ve had to leave my construction script for the time being.

There is a “Set Lighting Channels” node for PrimitiveComponents but it doesn’t seem to have any effect once the game starts.

I try to change an object from channel 0 to channel 2. I’ve got a bunch of point light components shining in channel 2. They don’t affect the scene, but when I switch an object from channel 0 to channel 2 in a blueprint, I don’t see the lights’ effects. I’ve probably got something else configured wrong.

There’s also a “Set Lighting Channels” node for LightComponents.

After rendering the first frame, need to call UActorComponent::MarkRenderStateDirty after “Set Lighting Channels.” Toggling “Only Owner Can See” in blueprints triggers MarkRenderStateDirty.

Seems “Set Lighting Channels” is new to 4.25.