Problem with the SkyControl plugin

Hi guys!

A guy recommended SkyControl for me to simulate day/night cycle (I think it’s a little old, but it’s just perfect for what i need.). Today I found a tutorial to make it work on my game and configurating it. It uses Ambient and Directional Light to set the color(ambient) and direction(directional) of the light, which is great. But when i run the game, only the AmbientLight works. The DirectionalLight never shows up. I did some simple debug and i figured out that the light’s Y is ALWAYS negative. It changes with the sun position, but when it reaches zero, starts to increase negatively.

I tried to search on the creator’s website, but there is no documentation. Only a tutorial to download it and how to add it to your game. NO DOCUMENTATION!

So, I hope if somebody can help me! Thanks!

y should be negative when the sun is out since the sun points down.

Is your model using the lighting shader or unshaded? What is the model, where did it come from, etc…?

We basically don’t have enough information to help much.

Its logic that the light’s Y is negative in the night. But when the day rises, the light is still negative. :frowning: Looks like at night the light goes from right to left. In the day it goes from left to right negativly.

My terrain was maid using the SDK. So i assume the material definition is Terrain.j3md. Maybe it just works on Lighting.j3md.

Terrain can have other materials, look for something called TerrainLighting (I think) If you want lighting :slight_smile:

@Ev1lbl0w said: Its logic that the light's Y is negative in the night. But when the day rises, the light is still negative. :( Looks like at night the light goes from right to left. In the day it goes from left to right negativly.

My terrain was maid using the SDK. So i assume the material definition is Terrain.j3md. Maybe it just works on Lighting.j3md.

The light direction is the direction that the light points. So in the day, the light points DOWN, ie: y is negative. At night, the sun points up because it’s below the ground.

To rule out (or in) material issues, make a simple test scene with the sky control and a simple box with the lighting material. If it doesn’t work then you can test it with your own directional light and see if it’s different.

But remember, the light direction points the direction the light beams are traveling.

Thanks @pspeed! I’ll do a simple test scene and then I tell you the results.

Well, I managed to make the light work on my terrain! I missed a method. But thanks for your help!