Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 1332 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: http://pastebin.java-gaming.org/c26a695424f
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
Quote
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: 250
Projects: 11
Exp: 2 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: 250
Projects: 11
Exp: 2 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: 250
Projects: 11
Exp: 2 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.

 

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

The first screenshot will be displayed as a thumbnail.

Dwinin (28 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (74 views)
2014-09-10 06:39:09

Tekkerue (37 views)
2014-09-09 02:24:56

mitcheeb (57 views)
2014-09-08 06:06:29

BurntPizza (44 views)
2014-09-07 01:13:42

Longarmx (27 views)
2014-09-07 01:12:14

Longarmx (34 views)
2014-09-07 01:11:22

Longarmx (34 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
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!