Terrain gen

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

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

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

Hope it helps mate :slight_smile:

Isn’t LOD Level of Detail?

Well…, I’m st***d…!
Yes, Level Of Detail >…>

EDIT: Corrected.

A blog post with a bit about LOD

ok, il look into LOD

Why not just put a cap on the view distance?

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

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.