Bonzai Engine Forum

Bonzai Engine & Tools => Bonzai Engine => Topic started by: Jan_K. on October 22, 2013, 01:01:38 PM

Title: create Lights
Post by: Jan_K. on October 22, 2013, 01:01:38 PM
Hey there ! I got a Problem with creating Lights in my scene. I want to create several different lights but it seems that only the first one the is set with the .setLights()-Method actually is set. My Code for light setting is this:


Is looks like this:

https://www.dropbox.com/s/xmpfl61iowmvts8/Lichtbeispiel.jpg

Only the green light (light1) seems to be created but why? And why are only some parts of the scene affected by the green light and others not?

Thanks!
Title: Re: create Lights
Post by: jerome_j on October 22, 2013, 02:47:19 PM
By default the ShaderGeneratorConfig has only 1 light enabled by default, default values are:
Use LightingAlgo.PerPixel/PerVertex to enable other lights.

Lights are only applied on models with normals (see ModelReaderSettings.lighting (http://bonzaiengine.com/javadoc/com/bonzaiengine/model/reader/ModelReaderSettings.html#lighting)) and dynamic lighting enabled in the materials (http://bonzaiengine.com/javadoc/com/bonzaiengine/material/MaterialStandard.html#setReceiveLight(boolean)).