Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  
  My first terrain renderer  (Read 3191 times)
0 Members and 1 Guest are viewing this topic.
Offline bahuman

Junior Devvie

« Posted 2006-08-15 01:23:11 »

I've made a non-webstartable zip-file, including jogl and the windows dll's.

Any comments at all are more than welcome   Cool

- chunked LOD
- 1 chunk = 64x64
- 4x4 chunks
- simple LOD algorithm (based on 2D distance from centre-of-chunk to camera, height does not count)
- 1 single texture for every chunk (to downsize demo and because I don't have texture mgmt)
- normally, one texture per chunk (no multi-texturing) with red edges to find chunk edges
- direct-mode passing of all data (no display lists, no vbo)
- 1 dynamic light, just to enhance landscape features a bit

- arrows = navigate
- CTRL+arrows: yaw/pitch
- Q/W = change the height (I'm on AZERTY, so you may need to press A/Z)
- A/Z = change FOV (same remark)
- D = print debug, including FPS
- T = toggle wireframe

Known issues:
- fps is calculated based on currentTimeMillis(), and is only updated every second (to compensate for lack of accuracy)
- popping
- performance (init is slow, + very inefficient storage of heightmap)
- ridiculous memory consumption

- compare display lists / VBO
- geomorphing?
- multi-texturing (will allow pre-rendered lightmap)
- refactor my chunked code into something actually usable

Fire it up !  Grin
Offline darkprophet

Senior Devvie

Go Go Gadget Arms

« Reply #1 - Posted 2006-08-15 01:31:47 »

*cough* LINUX! LINUX! *cough*


Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline bahuman

Junior Devvie

« Reply #2 - Posted 2006-08-15 01:34:16 »

*cough* LINUX! LINUX! *cough*


I solemnly promise, if (when?) I ever get around to making my killer super-duper game that is going to make me rich, I'll include the linux binaries as well.  Tongue

in the meantime:
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven

« JGO Overlord »

Medals: 1341
Projects: 4
Exp: 16 years

Hand over your head.

« Reply #3 - Posted 2006-08-15 07:15:48 »

Quite nice! Did you know that in chunked-LOD the chunks are cLODed ? That is, independant of camera-position (distance) and orientation.

It really shouldn't be hard to keep the data in vRAM, displaylists are your easiest pick, VBOs would be better if you'd want to implement morphing later on.

Prerendered lightmaps (or normal-maps) are indeed required of you don't want the poor shading of vertex-lighting of LODed geometry, that tends to get really ugly.

You'll find that once you keep your data in vRAM, performance will get a very serious boost, allowing to use terrain of 16x16 chunks or even more. Combine that with frustum-culling (on a per-chunk basis) and it can't get much more efficient.

Good luck!

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

Senior Newbie

« Reply #4 - Posted 2006-08-16 19:13:07 »

The camera movement is very nice.

I need to read up on chunked lod but you probably also need some kind of error metric to decide which level of the lod to show.

Also a webstart version would be nice, you can easily include the jnlp file from the jogl website.


Pages: [1]
  ignore  |  Print  

EgonOlsen (79 views)
2018-06-10 19:43:48

EgonOlsen (59 views)
2018-06-10 19:43:44

EgonOlsen (78 views)
2018-06-10 19:43:20

DesertCoockie (261 views)
2018-05-13 18:23:11

nelsongames (159 views)
2018-04-24 18:15:36

nelsongames (158 views)
2018-04-24 18:14:32

ivj94 (901 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (813 views)
2018-03-24 14:43:53

Solater (177 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!