Don't know how to change from stage light to camera light through Python api

Hello, I met a problem that I need to use a camera on jetbot to extract feature points from images. This step works well in Warehouse map because this map has sufficient light. But things get worse when I do this in Office map, this map is so dark that my camera cannot get enough feature points. Jut like the picture below.


Then I found the tab on the top right corner is “stage light”, which is the same when I start Isaac Sim through Python scripts. Then I click this tab and change it to “camera light”, everything seems fine because the environment is not dark anymore.

So I have a question, how to do this step(change from “stage light” to “camera light”) with python api. Because I wanna run my code in headless mode which means impossible to change the light tab manually.
Also I hope for other advices that can make the Office map brighter! Thanks!!!

@255isWhite i am just another OV user, but you could look into using kit action to achieve the switching. below is the snippet for both camera and stage lighting:

import omni.kit.actions.core

action_registry = omni.kit.actions.core.get_action_registry()

# switches to camera lighting
action = action_registry.get_action("omni.kit.viewport.menubar.lighting", "set_lighting_mode_camera")

# switches to stage lighting
action = action_registry.get_action("omni.kit.viewport.menubar.lighting", "set_lighting_mode_stage")

action.execute()
3 Likes

regarding the lighting situation, do you have any lights in your scene? if not, you could try adding a few Disc or Rect lights to your scene (on the ceiling pointing down) which should help with the overall lighting.

another option, perhaps, is to toggle on the Post Processing in the Render Settings tab and play around with a few of the settings to bump the overall scene exposure if you choose not to include additional lighting:

image

Thanks!!
Definetely this is the solution I want!
About your second advice, which is also beneficial for users desire a brighter scene, but I want to use the Isaac Sim official map without customized change. Thanks anyway!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.