I’m having several issues with lamps, but as @lubos stated that this first version was going to be buggy I will wait for the next version before starting to think on issues. So for now, just discussing some thoughts.
I used blender a lot in the past for modeling, but I always exported the models to use them with other engines. So I’m quite new to rendering inside blender.
I was wondering why all the examples are using points lights. I see sun lamps as a more natural approach as the examples are using a sky texture as background. When I started to construct the scene, It was a surprise for me that there was not an automatic way of using the sun lamp direction vector as an input for the sky texture (this is only blender related). I also had problems finding a fast solution for this on the internet so I solved the problem using drivers and I think it’s interesting to share the method. I did all the calculations manually, so even if it seems to work… something could be wrong.
When creating the world nodes, create a driver in the vector parameter of the sky texture node. Use the rotation transform of the sun lamp as the targets. On the driver editor, add three variables for each component (x, y, z) of the shader node tree. Each of these vars will need to extract one of the rotation components (path data of them: x = rotation_euler, y = rotation_euler and z = rotation_euler). Finally use these variables in the following scripted expressions to set the values of the shader node tree vector components:
x = cos(z) * sin(y) * cos(x) + sin(z) * sin(x)
y = sin(z) * sin(y) * cos(x) - cos(z) * sin(x)
z = cos(y) * cos(x)
And… The sky texture should react to the sun lamp rotation!
As this explanation about configuring the driver seems cumbersome, please, find the .blend file here:
One consideration about using sun lamps for now:
- The position is important. Although this should not be the case, armory seems to use the position for something and this compromises the shadows. So “clip start”, “clip end” and “field of view” of the sun lamp seem to be applied from the sun lamp position.