SkyControl enters beta test

@madjack said: Have you tried using skyboxes instead of spheres for the day and night skies? Would that interfere with the cloud layer?

As it is, it’s not possible to use existing tools that make skies. I have a great app to make night skies but it generates 6 images. Thus, unusable. :cry:

Tell me more about your app. Why might you want to use it with (or instead of) SkyControl?

I’ve never seen stars in the day me neither. But it’s not like it were meant to be 100% scientific-grade accurate either. I mean, it really looks realistic/awesome to me as it sits right there @sgold. The only thing to me that would be nice to have is a better looking sun, for which maybe the volumetric filter could help, like you could replace the sun’s quad texture by a spotlight node along with the volumetric filter applied to it. It looks really nice and you can fade it and change colors as it sets or rises, plus when the camera looks at it, it has a small, subtle cone edge displacement. By the way, this is a cubemap sky like @madjack talked about earlier.

Sun, a spotlight with volumetric filter applied, here it’s red, when it’s noon it’s white/beige:

Sun after it has set, before moon rises:

Moon risen (this is just a quad texture similar to yours):

Why!? Because I want to use my custom night sky, not some textures with cookie cutter dots strewn around? Because I don’t want my sky to look like every other night sky? Because I want the functionality you’re offering, meaning clouds and a moon rotating in the sky without having to reinvent the wheel?

Also, I think you don’t understand what that app does. By providing some parameters it creates a night scene and from that It exports 6 textures that I can use to make a sky box.

Hopefully that answers your question.

This is an example of what @madjack is talking about and what I am currently using. It’s a big texture image that is logically separated in equal squares, like a sprite sheet if you will and there are applications like @madjack says that take a big image and/or a scene and export it in this cubemap sprite sheet if you will. Then by using this, if we wanted we could dynamically swap a skybox texture for another one at convenience and have different cloud formations or stars, or no stars, or whatever and we could just blend them together depending on “weather” or whatever, it just opens up the possibilities:

Here’s a custom skybox I just made. It shows a bit of a green nebula in low res (1024x1024).

@madjack said: Here's a custom skybox I just made. It shows a bit of a green nebula in low res (1024x1024).

spacescape by any chance?
http://alexcpeterson.com/spacescape

1 Like
@Empire Phoenix said: spacescape by any chance? http://alexcpeterson.com/spacescape

Shhhhhhhhh! Don’t give my secrets away like that! :stuck_out_tongue:

@.Ben. said: The only thing to me that would be nice to have is a better looking sun, for which maybe the volumetric filter could help, like you could replace the sun's quad texture by a spotlight node along with the volumetric filter applied to it. It looks really nice and you can fade it and change colors as it sets or rises, plus when the camera looks at it, it has a small, subtle cone edge displacement.

I agree that the sun is one of SkyControl’s weaknesses. In fact, its sun often strikes me as downright wimpy. I think my default settings make the blue and the clouds too bright, so that the sun suffers by comparison. I can change colorDay to ColorRGBA(0.2f, 0.3f, 0.5f, Constants.alphaMax), darken the cloudsColor 50% during the day with [java]if (sunUp) cloudsColor.multLocal(0.5f);[/java], and use an sun image without rays … but the hooks to do these things without modifying SkyControl itself will have to be post-beta.

As for volumetric filtering, I’m interested, but not clear what it would buy me. I already change the sun’s color at sunrise and sunset. And I’m not sure what you mean by a “cone edge displacement”. Please pardon my ignorance. If you could point me to a good article, or a with/without comparison, that might be helpful.

I think it will be hard to make a sun look right without bloom, probably. Without bloom you will never get to bleed around the edges of things like a real sun would. The rays won’t be very dynamic and it will always just look like a sprite hanging in the sky. Especially if you have fully baked “rays” as you do know. It just looks like a painted star or something since the rays never change with movement.

On the other hand, if you get bloom involved then you can craft something pretty well. Here is an example of Mythruna’s sun with and without bloom. I use a real “flare” sprite but it just looks boring without the bleed:

Given that, your current sun may already be good enough… just add bloom.

Note: in Mythruna I took great pains to tweak the bloom settings to time of day. If you don’t already provide recommended intensity, etc. then that may be something you can factor in. (shrug)

Edit: note, the little bubble in the lower pictures is the “crosshair” and not part of the sky.

1 Like

@pspeed explained a part of what I meant. @sgold if you look closely at the first screenshot I posted, you can see it’s not flat round like a sprite is AND it’s not baked, so we could use vertex displacement to make the edges of the sun move a little, like oscillate or something so that it’s really looking dynamic. It also has a static halo around the sun circle, on the screenshot you can see it’s red, this makes it look less flat to me. I think you could also achieve this with bloom, indeed.

@sgold, it’s not a tutorial or lecture, but it’s a very very nice volumetric lighting demo that @thetoucher made a couple months ago: http://hub.jmonkeyengine.org/forum/topic/volumetric-lighting-filter-wip/

For the displacement, it’s just an idea, I do not have a tutorial, it’s just something I was thinking about, you know when it’s hot you see like the air is fluctuating, I was thinking of displacing the sun a little to make it look like it’s hot you know? It’s just a completely random and probably useless thought :stuck_out_tongue:

@madjack said: Have you tried using skyboxes instead of spheres for the day and night skies? Would that interfere with the cloud layer?

I haven’t tried it, but I’m pretty sure I could make it work. Just have to make sure the cloud geometry fits completely inside the skybox. I’ll add this to my TODO list.

For the degree of customization you seem to want, I think you might be better off using SkyMaterial and DomeMesh directly instead of going through SkyControl.

I’ve been dabbing into that a bit. I’ll post anything I find of interest.

1 Like
@.Ben. said: This is an example of what @madjack is talking about and what I am currently using. It's a big texture image that is logically separated in equal squares, like a sprite sheet if you will and there are applications like @madjack says that take a big image and/or a scene and export it in this cubemap sprite sheet if you will. Then by using this, if we wanted we could dynamically swap a skybox texture for another one at convenience and have different cloud formations or stars, or no stars, or whatever and we could just blend them together depending on "weather" or whatever, it just opens up the possibilities:

I know about cube-mapped skies. At one point I was using one in my game.

Cubes are fine so long as you have the software to generate them and you don’t need them to change over time. It’s not easy to make sun, moon, and clouds move smoothly and without distortion across a cube. But sun and moon work fine as separate billboards, so it seems to me what you really need from SkyControl is its cloud dome.

You should have no great difficulty adding SkyControl’s cloud dome to your game. The dome is simply a scaled and offset DomeMesh geometry with SkyMaterial applied to it. Cloud motion is simulated in a straightforward manner using SkyMaterial.setCloudsOffset().

@pspeed said: I think it will be hard to make a sun look right without bloom, probably.

Thanks for the advice, Paul. I’ll try a bloom filter and see how much it helps.

@Empire Phoenix said: spacescape by any chance? http://alexcpeterson.com/spacescape

I took a quick look at Spacescape. Very cool!

@.Ben. said: For the displacement, it's just an idea, I do not have a tutorial, it's just something I was thinking about, you know when it's hot you see like the air is fluctuating, I was thinking of displacing the sun a little to make it look like it's hot you know? It's just a completely random and probably useless thought :P

The sun image in SkyControl is already being getting translated and scaled in texture space. It should be possible to apply a shimmer distortion there as well.

I suppose volumetric lighting comes into play if you want to show shafts of light breaking through the clouds, as often seen in “inspirational” photos. I haven’t tried this yet.

Yes for the shimmer. But for the “inspirational” sun rays through the clouds, I wonder if this JME3 plugin would do that, it’s called Light Scattering: http://hub.jmonkeyengine.org/forum/topic/light-scattering-effect-filter-for-jme3/

It’s included in the stable releases of JME3, you only need to do this:

[java]
FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
Vector3f lightPos = lightDir.multLocal(-3000);
LightScatteringFilter filter = new LightScatteringFilter(lightPos);
LightScatteringUI ui = new LightScatteringUI(inputManager, filter);
fpp.addFilter(filter);
viewPort.addProcessor(fpp);
[/java]

Full example code: http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/post/TestLightScattering.java

I’m not sure if this would suffice to reproduce the expected result or if the clouds dome would be too far away for this effect to work correctly. I think I will test that with your SkyControl tonight :smiley:

The LightScattering processor is really nice as long as you stay outside. You have to take special care to turn it off if you are inside or you go blind whenever you look in the direction of the sun (whole scene goes near black).

The other effects mentioned do not suffer from this. And really, bloom is just a big help of making bright things look bright.

@sgold said: I already change the sun's color at sunrise and sunset.

Oops! I thought SkyControl was changing the sun’s color, but apparently it’s not.

That’s a bug, and I intend to fix it.

I really like how this has turned out. Finally got a chance to try it and… WOW! You’ve done a great job.

1 Like