Skydome: texture gets stretched on top of dome

Hi Folks

i adapted the skydome to support night-skies, moving clouds and more.

There’s still a small problem though (see lowest picture). I think that’s because

the dome-geometry originates from one point. Is there another geometry I could

use, like a half octaeder or a half (european) football (just with more faces!)?

A cube (like the skybox) wouldn’t work (to few faces).

Any Ideas? As soon as everything works, I will contribut my skydome-class to jME (if you want to…)

Texture-Error on top of skydome:

AFAIK, Slyboxes are simply cubes with their normals pointing inwards. And the problem you mention comes from texture coordinates mapping, so in a sense, it can be corrected by changing the UV coordinates (tex coords) and not the shape necessarily.

You can always implement you own shape as long as the UV coords are correct.

[Edit] I forgot to say: Yeah!, it looks pretty good… I would love to use it. Does it have procedural clouds or animated textures or what?

That looks nice!  I'm especially interested in the moving clouds.

I did make a quick try at something similar, but then I was seeing a similar problem (except more defined), and could see many seams on my dome.  After that I decided I'd stick with a skybox with cleverly made graphics to hide the seams as much as possible, and provide an illusion of a sky.  I'm still curious as to what Guild Wars is using!

thanks for your replies so far and for the compliment.

If you are using a Dome as your geometry, then check setGeometryData(boolean) in the Dome class to see how they do the texture coordinates. Unfortunately, the UV coords computed here use the way the dome is generated (i.e. a rotating quarter-circle). That creates the discontinuity you saw at the very top (the axis of rotation).

You could fix this by remapping the UV coords to something more useful to you. Like a projection of the XZ plane to the dome. It would unfortunately stretch the texture near the horizon… so you can do some other stuff, but first let me know if this is in the right track.

You can also try using a spehere primative from a modeling program like milkshape, blender, or 3DS MAX.  They all support a spherical mapping type that avoids the distortion.  Then just import that model in with the texture applied as per the modeling app and you should be golden.

I had that idea too, but i came to the conclusion, that this is not an option for the architecture of my scene-Manager and game-engine.

I went for option 2 (see above) and the result is just … georgous! I'm going to optimize the code for speed this weekend and post some screenshot afterwards. (In fact, it looks even better than option 1 with a sphere as an object ith predefined uv-mapping)

this would solve the problem:

and yes, plz give us that skydome :smiley:

hehehe…nice football. unfortunately, i didn't find a "football"-primitive in jme :wink:

I'm going to post my Skydome in about a Week under "User Showcase" when it's optimized.