blenderproc.python.lighting.SuncgLighting module

This module provides functions to add light to the SUNCG scenes.

class blenderproc.python.lighting.SuncgLighting._SuncgLighting[source]

Bases: object

Adds light properties to the SUNCG scenes.

static make_ceiling_emissive(obj, collection_of_mats, ceiling_emission_strength=1.5)[source]

Makes the given ceiling object emissive, s.t. there is always a little bit ambient light.

Parameters:
  • obj (MeshObject) – The ceiling object.

  • collection_of_mats (Dict[str, Dict[str, Material]]) – A dictionary that contains materials for lamps, windows and ceilings.

  • ceiling_emission_strength (float) – The emission strength that should be used for the ceiling. Default: 1.5

static make_lamp_emissive(obj, light, collection_of_mats, lightbulb_emission_strength=15, lampshade_emission_strength=7)[source]

Adds an emission shader to the object materials which are specified in the light dictionary

Parameters:
  • obj (MeshObject) – The blender object.

  • light (Tuple[List[str], List[str]]) – A tuple of two lists. The first list specifies all materials which should act as a lightbulb, the second one lists all materials corresponding to lampshades.

  • collection_of_mats (Dict[str, Dict[str, Material]]) – A dictionary that contains materials for lamps, windows and ceilings.

  • lightbulb_emission_strength (float) – The emission strength that should be used for light bulbs. Default: 15

  • lampshade_emission_strength (float) – The emission strength that should be used for lamp shades. Default: 7

static make_window_emissive(obj, collection_of_mats)[source]

Makes the given window object emissive.

For each material with alpha < 1. Uses a light path node to make it emit light, but at the same time look like a principle material. Otherwise windows would be completely white.

Parameters:
  • obj (MeshObject) – A window object.

  • collection_of_mats (Dict[str, Dict[str, Material]]) – A dictionary that contains materials for lamps, windows and ceilings.

blenderproc.python.lighting.SuncgLighting.light_suncg_scene(lightbulb_emission_strength=15, lampshade_emission_strength=7, ceiling_emission_strength=1.5)[source]

Makes the lamps, windows and ceilings object emit light.

Parameters:
  • lightbulb_emission_strength (float) – The emission strength that should be used for light bulbs. Default: 15

  • lampshade_emission_strength (float) – The emission strength that should be used for lamp shades. Default: 7

  • ceiling_emission_strength (float) – The emission strength that should be used for the ceiling. Default: 1.5