So how do you handle character lighting / reflected light in BGE?

Is it simpler to keep the characters slightly self illuminated?! How do you fake light reflected from the floors and the walls? Using a regular lamp makes it obvious where the source is when the character walks into it.

Have Layer only spots or hemis from, below and all sides changing intensity in real time, according to light source proximity, surrounding and following the characters on same unique layer?

This is up to you or how you want the game to look. If you want your character to stand out or be slightly more visible, add some emission to the material by going to the materials tab in the properties panel and adjusting the “emit” slider. Or you could go with “shadeless”.
If you have a shader or python, you can control which objects the shader does or doesn’t affect by using obj.name.startswith(“blah”) at the end of the script

example:

		sce = self.scene
		for obj in sce.objects:
			if not obj.name.startswith("chara"):
				for mesh in obj.meshes:
					for material in mesh.materials:
						shader = material.getShader()

Which means, "this shader will be applied to the object if the object’s name (i.e. what you named it in the outliner) does not start with “chara”
(Also this is the first time I’m giving advice using a slice of python and I’m a beginner, and not quite qualified to give coding advice, so anyone feel free to chime in and clarify what I just said lol)
EDIT - actually, if you have some visuals or even just a draft, feel free to post some pictures! It would be easier to help give advice on lighting to see the characters in their environment.
If it’s dark, and 3rd person, you can parent a light source above their head to illuminate an area around them.

1 Like

@nataliezz your comment looks helpful :slight_smile:

Nitpick: Your code snippet iterate through all the objects in the scene for obj in sce.objects to find the main character. You could also make a script only triggered by the player, this way you don’t have to look for the player object, if the object is the one triggering the script. Just a different way of doing the same thing.

2 Likes