Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (593)
Games in Android Showcase (168)
games submitted by our members
Games in WIP (646)
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  
  Terrain gen  (Read 1868 times)
0 Members and 1 Guest are viewing this topic.
Offline lclc98

Junior Newbie

« Posted 2013-03-04 09:56:08 »

Im coding terrain to work with a heightmap but when i have a image greater then 1024x1024 it seems to cut the fps to 3 fps(From 75). I have been stuck on this for weeks. I have asked on multiple sites and irc with no response. Im using lwjgl, I think i might need a way to stop rendering terrain at a certain distance, but im not sure. Code:
Offline GabrielBailey74
« Reply #1 - Posted 2013-03-05 04:11:05 »

I know if the terrain is 1024x1024 the 'patches' (for me) are usually around 64 each.
(Major Lag for me anyways, my computers a dinosaur)

Make sure that the size of the terrain patches are all possible for ^2 (so 8, 16, 32, 64, etc).
Might be why this is occurring, didn't bother to look at the source code yet XD

If it's performance issues.
Try implementing a LOD calculator (Level Of Detail).
I can't find a link for a explication of it so I'll put a brief description of it here Roll Eyes
Basically it's a 'quality calculator'.
The further the camera is away from the terrain patch the lower 'patches inside patches' that will occur.
It makes a terrain patch that is far from you: render as 1 patch composed of 1 static geometry, instead of rendering as 1 patch composed of many static geometry's (High Texture Quality).

Note: If a LOD specialist comes along and finds this brief description wrong, this is from my own observations XD.

Hope it helps mate Smiley

Offline HeroesGraveDev

JGO Kernel

Medals: 359
Projects: 11
Exp: 3 years

┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻

« Reply #2 - Posted 2013-03-05 04:19:13 »

Isn't LOD Level of Detail?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline GabrielBailey74
« Reply #3 - Posted 2013-03-05 04:19:56 »

Well.., I'm st***d...!
Yes, Level Of Detail >.....>

EDIT: Corrected.

Offline HeroesGraveDev

JGO Kernel

Medals: 359
Projects: 11
Exp: 3 years

┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻

« Reply #4 - Posted 2013-03-05 04:21:58 »

A blog post with a bit about LOD

Offline lclc98

Junior Newbie

« Reply #5 - Posted 2013-03-05 07:36:12 »

ok, il look into LOD
Offline HeroesGraveDev

JGO Kernel

Medals: 359
Projects: 11
Exp: 3 years

┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻

« Reply #6 - Posted 2013-03-05 08:04:48 »

Why not just put a cap on the view distance?

Offline GabrielBailey74
« Reply #7 - Posted 2013-03-05 09:11:44 »

Just recently learned this:
Adding fog can prevent such a rendering 'strain' (Less to render right?)

Offline lclc98

Junior Newbie

« Reply #8 - Posted 2013-03-07 08:15:43 »

Fog is making my terrain black
Offline GabrielBailey74
« Reply #9 - Posted 2013-03-08 00:12:16 »

Fog is making my terrain black

I don't know how you implemented the fog.

When I implemented fog into my 3D game I was using JMonkeyEngine.
So they had methods to lessen the thickness of the fog, change the color and distance of the fog etc.

Only thing I can think of at the moment is: you have no lights in the 3D scene.
(Why the terrain would be showing up black)

Or the fog is in a state I've never been able to see.
(Doesn't have a thickness level set, doesn't have a starting / ending distance set)

No biggie if you can't get the fog to work mate.
Just something I heard online, I can't back it up myself as I've done no benchmarking on it.

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

Riven (16 views)
2015-07-03 11:22:16

deepthought (44 views)
2015-06-30 15:39:44

deepthought (48 views)
2015-06-30 15:39:09

deepthought (60 views)
2015-06-30 15:36:52

Za\'Anzabar (28 views)
2015-06-29 05:44:54

TritonDreyja (44 views)
2015-06-24 17:10:40

CopyableCougar4 (43 views)
2015-06-23 00:34:45

BurntPizza (46 views)
2015-06-21 20:36:46

cookiecompiler (88 views)
2015-06-11 15:42:53

cookiecompiler (51 views)
2015-06-11 15:41:14
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14 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!