Jmeplanet

Why not millions? He said it’s generated using fractals which means you can keep zooming in for ever…You just adjust the level of detail on your fractal as you “zoom in” on an area.

I bet he mean using noise functions. If you will have millions quads, you will need supercomputer and it's very unwise to have all of them in one scene. Again, is is why LoD is used. Zooming forever doesn't mean that you will have all previously generated quads visible - you just split the quad as you get closer (or to be correctly you just replace 1 quad with 4 smaller). This is called Chunked LoD. ROAM is a bit different, as well as GeoMipMap.
http://www.youtube.com/watch?v=R3JfV_iYCUM

Yesssss.



Stuff for the space games! Will make Androlo and Sploreg creations less unbearable to us than can’t use them… slightly :D.

This project definitely looks very cool and combined with the atmospheric shader, it would look just the part.



Keep up the good work. I wish you every success.



Just a small tip: If your intention is for others to use your code, make sure your code is well documented with Javadoc (constructors / methods / class variables). I am fairly convinced that Javadoc is one of the most effective tools in the java environment for facilitating the implementation of pre-written code.

@alfinete said:
Just a small tip: If your intention is for others to use your code, make sure your code is well documented with Javadoc (constructors / methods / class variables). I am fairly convinced that Javadoc is one of the most effective tools in the java environment for facilitating the implementation of pre-written code.


I agree with that. 0 documented method. O_o Nifty is more documented. That says it all.

I have been wanting to make procedural planets for some time now (a couple of years?), so to help out, I thought I’d post the info I’ve collected over that time in the form of images and saved internet pages. Some of this stuff is no longer online. So here are the links to what I have collected.



Cube2Sphere Images and Web Pages



Britonia game dev archives



I hope these few bits and pieces are useful.

1 Like
@KayTrance said:
I bet he mean using noise functions. If you will have millions quads, you will need supercomputer and it's very unwise to have all of them in one scene.


The noise routine I'm using is fractal in nature. Meaning as you zoom in each new quad is a higher detailed version of the previous. It's based on noise++ for those curious.

I'm generating the height values realtime for each new quad as you zoom down. There is no pregenerated heightmap so the level of detail is only limited by the precision of floats and the max split depth.

You can play with the minDepth and maxDepth in the Planet.java to get more or less complex planets.
2 Likes
@aaronperkins said:
The noise routine I'm using is fractal in nature. Meaning as you zoom in each new quad is a higher detailed version of the previous. It's based on noise++ for those curious.

I'm generating the height values realtime for each new quad as you zoom down. There is no pregenerated heightmap so the level of detail is only limited by the precision of floats and the max split depth.

You can play with the minDepth and maxDepth in the Planet.java to get more or less complex planets.


Glad to hear it, as that's exactly how I hoped it worked...since it would let you map the surface to however many quads you need :)

Some noteworthy pages:

http://hub.jmonkeyengine.org/groups/terramonkey/forum/topic/spherical-planetary-terrains/

http://www.bottlenose.demon.co.uk/share/fracplanet/

1 Like

This + Forester + Atmospheric shader = Amazing!

Very nice video, shows the LOD very effectively but no popping visible to the eye…

I loved the video. You’ve done a really great job with that.



I have one question though: …



Can the size (and/or number) of the LOD triangles can be manually set? Your triangulation looked to be quite fine in the video. Of course, a finer triangulation is better for visual effect, but if someone wanted just a more general effect with higher FPS, fewer triangles at each LOD level would be kinda important.

@alfinete said:
I loved the video. You've done a really great job with that.

I have one question though: ...

Can the size (and/or number) of the LOD triangles can be manually set? Your triangulation looked to be quite fine in the video. Of course, a finer triangulation is better for visual effect, but if someone wanted just a more general effect with higher FPS, fewer triangles at each LOD level would be kinda important.

Yes just increase or decrease the quads variable in the Planet.java. It controls the number of triangles per patch. Every 1 quad equals 2 triangles per patch. Use the minDepth and maxDepth to control the number of patches.
1 Like

Awesome stuff! Keep it up, and will someone make a cool space sim now? :slight_smile:

I’ve added lighting to the shaders. As it’s based on Common/MatDefs/Light/Lighting.j3md it might be a bit heavyweight for your purposes (it’s still stripped down a bit), but it’s fairly easy to remove out what you don’t need.



http://www.mindemia.com/temp/lighting.zip (it contains only modified files)



One directional light:



http://i.imgur.com/0g3lB.jpg

3 Likes

Very nice. Now it just needs a cloud/atmosphere layer :slight_smile:

I’m gonna be the killjoy here, but I almost don’t like this planet.



Texturing is fine, but the heightmap deformation is way overboard, that is, unless that planet is really the size of an asteroid or slightly bigger. No planet has terrain that high compared to its radius.



Olympus Mons on Mars, which is the highest known mountain on the solar system, barely makes a dent on the planet’s curvature and it’s 3 times the size of the Everest. If a 22 km (14 mi.) high mountain can’t achieve this effect, I can’t imagine how this planet’s terrain representation could do this. Besides, the height the planet shown above represents would put huge chunks of it so high it’d be covered in snow. Not green…



I’m commenting on this here because I’ve got the impression that this “planet maker’s” job is to represent something as close as possible to the real thing, not some comical/toon version of it.



But, in the end, that’s just my opinion.

@rickard



Sweet! I’ll be sure to add that in. Thanks!



@madjack



The system allows you set a heighScale and a baseRadius of the planet. The heightScale is how tall surface features can be. The baseRadius is well… the radius. The demo has the heightScale set to 250 and the radius set to 6500… This is obvious a very large ratio. Feel free to increase the radius and or lower the heightScale. I’ve had the radius all the way out to 65,000 which gives it a lot more planet feel. There are some glitches I need to work out at larger scales though. Namely the textures begin to distort and there is artifacting from the skirting system I use for seam correction. Might be better to lower the heightScale to 25 instead.

3 Likes

@aaronperkins



In that case it’s much better, but the scales represent what? What does 6500 of radius means in km or miles? I imagine it’s in game units? And, if so, what’s the conversion of 1 unit in terms of length?



Ex: If I use one of the planets in my game, they all have a true radius in km, how would that translate using your planet maker?

1 Like

It’s all relative. Basically the scale is whatever you want. To the player your game is going to feel bigger or smaller depending on how fast they can move and view frustum on the camera. It’s up to you to find the right combination that feels right and work within the limitations of float precision.





BTW, I updated the code to include rickard’s lighting material. Thanks!

2 Likes
@erlend_sh said:
http://www.bottlenose.demon.co.uk/share/fracplanet/

Just in case, i'd like to point out that it's GPLed, which could ruin everything. Just looking at the code could be bad. (sorry, can't help my self)
1 Like