Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
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 1963 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

features:
- 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

keys:
- 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

TODO:
- 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*

Cheesy

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*

Cheesy

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:
http://users.pandora.be/bart.huylebroeck1/opengl/terrainLOD.jpg
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 832
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.

Koen

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.

SHC (24 views)
2014-11-25 12:00:59

SHC (23 views)
2014-11-25 11:53:45

Norakomi (19 views)
2014-11-25 11:26:43

Gibbo3771 (22 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (74 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (41 views)
2014-11-12 21:09:33

kovacsa (68 views)
2014-11-07 19:57:14
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!