[SOURCE AVAILABLE]yet another skydome

Soooo… here is a skydome I made in jme, wich is part of a bigger project:



It was initially built on neakor’s skydome: http://www.jmonkeyengine.com/jmeforum/index.php?topic=5733.0

And then merged with this great wiki work: http://www.jmonkeyengine.com/wiki/doku.php?id=skydome





Here is the source code:

http://rapidshare.com/files/109874556/jme_skydome.rar.html



Here are the screenies:


static images are nice, but where is the video ?  :slight_smile:

Indeed…some things just cannot be expressed in static images. :wink:

Thanks for the feedback! I guess you’re right… I finally managed to record a small video that shows the skydome dynamics. I hope you’ll like it. Here is the link:



http://www.youtube.com/watch?v=sEReoU7hs9I

Looks really nice :slight_smile: I have always wondered though, why a person walking and looking around, should see a lenseflare :slight_smile:

Mindgamer said:

Looks really nice :) I have always wondered though, why a person walking and looking around, should see a lenseflare :)


Heh.. but it's in the gaming tradition! Now, I'm working on a plot where the main character has a 35 mm camera instead of his head.  :D

great, after Superman, Batman and Ironman we get now a Cameraman ! :slight_smile:

What conputer config the video was running on?

it's a 60fps fixed framerate game on a intel centrino duo 1.83GHz (x2) / ati mobility radeon X1400 / 1GB RAM  laptop  :smiley:

Nice, I assume the clouds are static?

Because at the horizon they look a bit unrealistic, look at the 4th screenshot. I also tried modifying Skydome to have clouds, here's what I got: http://mfkarpg.110mb.com/wiki/?page=CloudGenerator. The clouds are squished at the horizon which is how it is supposed to be, not sure about how to do that in your case :confused:

nice to c someone is actually making improvements on my code. great work! :smiley:



i just started rewriting the original skydome i wrote a while ago and theres alot more features supported in this new version. i should be able to get it done by tomorrow and ill surely post it here.

how's it going? i've been playing around with the wiki one lately and it would be interesting to see your improved version

Momoko_Fan said:

Nice, I assume the clouds are static?
Because at the horizon they look a bit unrealistic, look at the 4th screenshot. I also tried modifying Skydome to have clouds, here's what I got: http://mfkarpg.110mb.com/wiki/?page=CloudGenerator. The clouds are squished at the horizon which is how it is supposed to be, not sure about how to do that in your case :/


O yeah. Static clouds and unrealistic horizon  :|... Actually a dynamic atmosphere is something I could still work on if only I could take some time..

EDIT: btw, really kewl clouds you got there!

As someone asked me, I released the source code of my skydome.

Follow this link



http://rapidshare.com/files/109874556/jme_skydome.rar.html



This code is not fully tested and only wants to be a sort of experiment. I think it's a bit built on my framework, and I don't know if it can be easily included within other source code, but I'd be glad to know that it turns out to be usefull for someone. :slight_smile:

Hi, i tried to use this Skydome with JME2 but i failed.

Problems are the following lines in CSkyDome:



private TriangleBatch batch;

dome.setCullMode(SceneElement.CULL_NEVER);

Texture map = TextureManager.loadTexture(moonTexFilename,
            Texture.MM_LINEAR_LINEAR, Texture.FM_LINEAR);

AlphaState moonAlpha = display.getRenderer().createAlphaState();
moonAlpha.setSrcFunction(AlphaState.SB_ONE_MINUS_SRC_ALPHA);
moonAlpha.setDstFunction(AlphaState.DB_ONE);

moonFlareNode.setLightCombineMode(LightState.OFF);

for (int i = 0; i < dome.getBatchCount(); i++) {
         batch = dome.getBatch(i);

         normalBuf = batch.getNormalBuffer();
         colorBuf = batch.getColorBuffer();

         for (int j = 0; j < batch.getVertexCount(); j++) {



Some lines appear multiple times (for example the AlphaState).

The AlphaState-thing I replaced by BlendState Statements and so there were no errors at last about the AlphaStates. But the other one i don't really know how to fix.

I hope someone can help me. I'm relatively new to JME and I'm trying different things now with JMonkey.

many of the static constants have been changed to enums in jme 2.

you can see some changes in this wiki page: http://www.jmonkeyengine.com/wiki/doku.php?id=jme_to_jme2_changes


well I read that an changed the code. Now it is much better. But the thing i can't fix is the one about the batches.


      for (int i = 0; i < dome.getBatchCount(); i++) {
         batch = dome.getBatch(i);

         normalBuf = batch.getNormalBuffer();
         colorBuf = batch.getColorBuffer();

         for (int j = 0; j < batch.getVertexCount(); j++) {


i found nothing about that.
Every other error i could fix now.

Batches are gone. Just look at what that code is trying to accomplish and rewrite that. Looks like it just wants to get the normal and color buffers and do something with it. Try dome.getGeometry().getNormalBuffer() and so forth. It may take some digging.

is there a test for jme1 available?

I think there's a JME1 version of this on the wiki.  Check code snippets.