Skydome lighting

I've added a skydome recently, and I noticed whenever it turns to night, it doesn't actually disable lighting. How do I fix this?

18 views no replies? come on. 

SkyDome doesn't really support night skies, you might want to use something else there…

Can't I just turn of or give a dark color to the light? And what would you suggest anyways instead of skydome?

The SkyDome is not visible at nighttime, so that might not look good in your game.

You can adjust the night light, replace this block in SkyDome.render:

if (isNight) {
            dome.setSolidColor(ColorRGBA.black);
            return;
        }

with this


if (isNight) {
            dome.setSolidColor(ColorRGBA.black);
            dr.setDiffuse(ColorRGBA.black);
            dr.setAmbient(ColorRGBA.black);
            return;
        }else{
            dr.setDiffuse(ColorRGBA.white);
            dr.setAmbient(ColorRGBA.gray);
        }


and change the lightcolors to what you want.

I don't find documentation abou the SkyDome class. I am interested in a dome emitting light.

Where are these classes and docs?

Doesn't seem to work.

Is this the one you're using, SeySayux?  http://www.jmonkeyengine.com/wiki/doku.php?id=skydome&s=sky

Yes, indeed.

i think u need to replace the sky textures and thats what really matters. unless u want the user to c nothing at all~

Actually, the black skydome is good atm, but my terrain looks at day exactly the same as at night. I can already predict how much people will laugh with this.

SeySayux said:

Actually, the black skydome is good atm, but my terrain looks at day exactly the same as at night. I can already predict how much people will laugh with this.


im building a new skydome started yesterday. it allows ur to apply textures and make the lighting affect ur scene objects as well. in ur case it would be the terrain.

once im done testing. ill share it with u guys

Thank you very much! But maybe one idea: What about a skysphere instead of a skydome?

SeySayux said:

Thank you very much! But maybe one idea: What about a skysphere instead of a skydome?


thats actually what im doing~

but not exactly a sphere, its a dome + plane. coz thats what u normally c right  :D u dont c the ground or anything below u even if u r in the air as a sphere, but a flat plane.

anyways, this is what ive got so far.

dome, plane with adjustable texture.
adjustable sun system including rotating sun, lensflare.
adjustable sunlight color at dawn and dusk.
auto intensity changing lens flare.
adjustable length of a cycle(day+night).
enable/disable light effect on ur scene objects.

currently working on moon system....

have you been able to make the flares more transparent and smaller? setIntensity seems to be an internal (and ignored) method which should be private as stated in another forum-thread.



i you have been able to do so, i'd be very interested to know how.

florian.privat said:

have you been able to make the flares more transparent and smaller? setIntensity seems to be an internal (and ignored) method which should be private as stated in another forum-thread.

i you have been able to do so, i'd be very interested to know how.


yes my sky dome does updates the intensity of lens flare every frame based on the calculated earth time.

cool. so what code did u have to change? 

florian.privat said:

cool. so what code did u have to change?

Could you make your skydome multithreading / StandardGame compatible? (See my topic on the lens flares). Also, the previous skydome did not lower with the player (and created a new Vector every frame  ). I'm going to make dungeons & caves in my game, so, it has to lower with the player. Also, for that matter, a setInvisible() method would be cool…

that's funny. setting intensity has no effect on my pc, even with the latest csv-update.

for the invisitbility-post: couldn't you just detach the dome-node when in a dungeon and reattach it when coming out?