SOAR Implementation demo (landscape rendering)

Hi,

This is an implementation of the SOAR algorithm (paper can be found at http://www-static.cc.gatech.edu/~lindstro/papers/visualization2001a/ )

The terrain is a terragen file of dimension 512x512.
View frustum culling is implemented.
No geomorphing yet so expect pops :slight_smile:

Movement :

arrow keys
page up / pagedown to move viewpoint up or down
mousewheel to tilt viewpoint.

I want to share the source code if people are interested, but I still have to clean up the code :wink:

Soar Java Webstart

Any feedback is appreciated.

Koen

The Screenshots like good, but I cannot run it - why does it require Java 6 ?

It doesn’t require 1.6 , I forgot to change the jnlp file, should be ok now.

it looks great!
I’m trying my hands on terrain rendering as well, so I’m very interested in what you’re doing. I think you can eliminate the “popping” if you pre-render the light, and use it as a lightmap texture on your terrain.

I have two requests: could you push the far plane of the frustrum WAAY back, just for kicks?
Could you please do some sort of FPS count? I’m interested in performance!

PS: maar 't ziet er wel al beestig uit ! ;D

SOAR is not really the most GPU-friendly way of rendering your terrain.

Check out chunked-LOD (not cLOD).

From a technical point of view: nice job.

Riven,
can you give me a brief explanation, or point me to one, of the difference between chunked LOD and clod ?

to bahuman : The soar algorithm is a continuous lod , this means the algorithm starts with 2 top level triangles, and starts refining (dividing) those 2 top triangles. The algorithm generates a triangle strip.

For example in a 512x512 mesh there are 18 levels of details.

I didn’t look into chunked lods that much but there are less levels of detail I think in a chunked lod and you do not stop at one individual triangle but for example the lowest level of detail could be a patch of 6by6 vertices.

Allee, next problem to solve is texturing , I think that is going to be an fps dropper. However I found a SOAR implementation with procedural textures that looks promising : http://web.interware.hu/bandi/ranger.html

Webstart failed :frowning:

J2SE 5.0.7

[quote]java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: no jogl in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:78)
at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:101)
at com.sun.opengl.impl.NativeLibLoader.access$100(NativeLibLoader.java:47)
at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:109)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:107)
at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.(WindowsGLDrawableFactory.java:59)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:106)
at javax.media.opengl.GLCanvas.(GLCanvas.java:113)
at javax.media.opengl.GLCanvas.(GLCanvas.java:82)
at javax.media.opengl.GLCanvas.(GLCanvas.java:75)
at dae.readers.max.gui.JWorldViewer.(Unknown Source)
at dae.objects.landscape.LandscapeTest.(Unknown Source)
at dae.objects.landscape.LandscapeTest.main(Unknown Source)
… 11 more
[/quote]

Do you have any jogl jars in the jre/lib/ext directory of the current jre ? That might be the cause of the problem.

It looks like it could be a cool demo, however:

the camera is not very usefull, there is no indication of perf., something like num. tris / fps info would be nice, also a wireframe mode would be much more interesting.

Very nice, Ive always been fond of terrain stuff. Would be nicer if there was a wireframe view…

However, the performance is, putting it gently, a tad crap. :slight_smile:

DP

Added :

  • Wireframe mode (press w)
  • VBO support

full screen on my pc i’m getting a minimum of 60 fps
on my laptop I get 30fps-60fps

What configuration do you have darkprophet ?

I’m still working on your other suggestions g666.

Koen

Works well now (with Java 5)! however I cannot use PAGE_UP and PAGE_DOWN, but this is because of my macbook pro. Those keys are not present on the keyboard, only simulated by APPLE + UP / DOWN und Java probably doesn’t recognize this. :frowning:

Regarding the requested suggestions: Tiled texture mapping would be a first feature, wouldn’t it? :slight_smile:

Im on an AMD Athlon64 X2 4200+ and an nvidia 7900GT. getting a maximum FPS of 85 (refresh rate is 60, so its not vsync).

Maybe you could expand the far plane a little? Its a tad too small at the moment. Nice implementation tho :slight_smile:

DP

I implemented some extra features for the demo :

+mouse look (drag mouse)

  • e/d to go to higher / lower viewpoint
  • fps
  • number of triangles
  • one dimensional texture

Also some tweaks that I hope will result in a better fps.

Start it here

Koen

Looks great! :o
On my portable Pentium IV, 2.8Ghz with Intel onboard GPU, I had a constant 50 FPS.

Yea, that was the reason. Don’t know how the jogl lib made the way into it.

Nice terrain, only the camera mouse motion is to fast.

Update :

+skydome added
+walking (running on terrain)
+swapinterval is zero now, to measure raw performance. (only found out about that command recently ::slight_smile: )

-Had an issue with cg shaders, so those will be for the next update.
-The application is mostly fillrate bound now, I’ll try to implement front to back rendering too.

Controls are still the same, link is the same too :

Soar Webstart click here

Koen

Very fast ! 200-350 FPS on my Pentium IV 2.4 Ghz , jdk 1.6 . Good job !

New version of the demo :

+Added reflection (no water ripples yet unfortunately)
+Added some scenery (trees & huts)

Still working on a good way to add shaders to the program.

The link is still the same : Landscape demo

Koen