Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (481)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (548)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Planetary terrain rendering  (Read 5589 times)
0 Members and 1 Guest are viewing this topic.
Offline mirko27

Senior Newbie




Java games rock!


« Posted 2008-04-16 22:06:33 »

Hey.

I`m working on a procedural planets project. Implementation details are
resolved and most of them tested in C++.
But since I got interested in Java lateley, I want to complete my project
in J2SE. So my question to you is - which library to use?

I see that most obvious options would be:
Ogre4J - it`s being updated again and the logic in c++ should give some speed gain(less calls through JNI). But it should also lower flexibility.
JOGL - too low-level, since you need to write all culling / scene graph yourself
Java3D - don`t know much
jME - didn`t make a good impression, looked too specialized and in the other direction of my needs

Bests,
Mirko
Offline bienator

Senior Member




OutOfCoffeeException


« Reply #1 - Posted 2008-04-16 22:55:22 »

I think Java3d wouldn't be the best choice for terrain experiments (to high level) its more a general purpose scene graph and VERY java like.

It always depends what you like to accomplish. You said pure OpenGL is to low level, if you focus on procedural terrain, any of the options you mentioned would probably be good enough to render your generated mesh (in this case i would recommend jME or Xith - I never used orge maybe its good too). But if you focus on terrain rendering techniques (or both) you will need pretty low level coding.

I would even say 90% of the code you will write for terrain rendering will have something to do with specialized scene graphs/space subdevision (including culling and similar things), triangulation and questions like how to update the terrain fast enough when you move Wink

here is my (pretty old) procedural planetary terrain engine using JOGL for rendering.

Offline mirko27

Senior Newbie




Java games rock!


« Reply #2 - Posted 2008-04-17 07:37:54 »

I also would like an opinion on Ogre4J.
By the way, is your source code free?
It`s always interesting to look at different approaches.
I myself will go for quadtree continious LOD, where I
will make a cube of 6 2D planes and map it to a sphere.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cylab

JGO Ninja


Medals: 43



« Reply #3 - Posted 2008-04-17 10:12:34 »

You will probably be interested in this: http://www.vterrain.org/index.html Lot's of resources and papers there. Also there is a MIT licensed Chunked LOD Terrain available on sourceforge: http://sourceforge.net/projects/vlterrain/.

Last year I created a quadtree Terrain engine for Xith3D which is still in progress, but might be interesting to you (or you might want to contribute Wink) It can load and display L3DT terrains by the way (http://www.bundysoft.com/docs/doku.php?id=l3dt:about). This is what it looks like:



Mathias - I Know What [you] Did Last Summer!
Offline mirko27

Senior Newbie




Java games rock!


« Reply #4 - Posted 2008-04-17 11:38:19 »

As I said, I had a working prototype and implementation idea already set. Right now I`m looking ways to do it in Java.
Can anyone comment on Ogre4J?

 But vterrain.org is a very good resource. When I worked on the prototype then I got tons of useful information there.
Offline bienator

Senior Member




OutOfCoffeeException


« Reply #5 - Posted 2008-04-17 18:51:07 »

@mirko27
no, sorry my engine is not open source. I used the project mainly for experiments, it was never intended to be a open or commercial project and I simple have not the time to maintain an other open source project.

>I myself will go for quadtree continious LOD, where I
>will make a cube of 6 2D planes and map it to a sphere.
similar to my approach Wink my terrain engine is a mix between several techniques. I use quadtrees for space subdivision and ROAM for continuous triangulation. The default ROAM implementation does not scale very well (esp. if you are moving fast), thats the reason why i decided to use a more memory intensive structure to traverse the mesh what simplifies normal calculation as an nice side effect. (what you really want is to access all triangles around a vertex or iterate through all triangles in a quad, right? ;-) ).

The first version was a infinite (procedural) terrain, later I added a box2sphere mapping mode which uses 3d perlin noise for terrain and texture generation.

@cylab
respect! Now I have to improve my texture mapping :/

Offline DzzD
« Reply #6 - Posted 2008-04-17 20:32:46 »

maybe you will find interristing stuff in this simplified ROAM sample applet , source code are available
http://demo.dzzd.net/ROAMSample/

code snipet to  build the terrain in Animator class:

1  
2  
3  
4  
this.land=new Landscape3D();
this.land.init(hMap,w,h,14,4);
this.land.computeVariance();
this.land.tessellate(w/2,h/2);


rendering is done by public void render(Graphics g) in Landscape3D class


I have improved this version in 3DzzD (that is still planned to be opensourced... just need time Sad ) using different technic for variance computation that take care of terrain silouhette and use a faster tesselation system using more memory and two methods :  tesselate that build/precompute all possible triangle at a given quality and render that give the list of triangle for a given point of view with lowest impact on terrain silhouette. doing that should allow you infinite terrain rendering.

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 781
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #7 - Posted 2008-04-22 09:08:14 »

ROAM's and continious-lod's (constantly varying) datastructures are not optimal for modern GPUs.

Chunked LOD is one of the best algorithms, atm. Inside the 'chunk', you can use ROAM to get rid of most tris at initialization time.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline bienator

Senior Member




OutOfCoffeeException


« Reply #8 - Posted 2008-04-22 10:22:55 »

I agree with Riven, you won't be lucky if you use the full ROAM implementation since it was designed to run in "immediate mode". But ROAM is more or less the mother of most terrain rendering algorithms. The triangulation part with the binary triangle tree and the idea of the "variance" (triangle error) computation is found slightly different in may other algorithms.

Today you should always try to keep your geometry on the GPU and plan updates carefully.

Offline Conzar

Junior Member




There is nothing common about common sense


« Reply #9 - Posted 2008-05-01 20:06:40 »

Here is an example for Java3D

http://code.j3d.org/examples/terrain/index.html

Their code is open so you should be able to look through it to see what they did in Java3D.

Ubuntu
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

atombrot (26 views)
2014-08-19 09:29:53

Tekkerue (24 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (14 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (60 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (30 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!