As you may have noticed, with terraingrid, the terrain loads only when you reach the edge of it. I may be missing something big here, but I can’t find a way to make it load further away from the edge of each terrainquad. I want to give the effect that the whole world is loaded automatically, instead of quad-by-quad. Yeah I have fog, but it just isnt enough, i’d need such dense fog that you wouldnt be able to play the game properly. Does anyone know how I can sort this out? thanks.
It loads half way through the quad. If your quads are small, then as you move you will get close to the edge and then it will appear (as it takes time to load). So you need larger quads.
If you are using a old version of jme (maybe even stable beta release without updates) then there was a bug that caused this. If that is the case then you should update.
Ok, i’m updating now but im pretty sure this isnt a bug. I dont really want to go past 513 for the terrainquad size, if I go 1025 then it just glitches up.
Is this also supposed to work if I use setLocalScale? I have it set to 2f right now, but that doesnt seem to make much of a difference to when the terrain loads.
Yep it works with scale too.
What do you mean “glitches up”? I have not seen terrain grid glitch up past a certain size.
Well when I tried it before the new terrain just wouldnt load when i past past the end. Tried it again & JVM runs out of memory.
ok well you need to allocate some more memory then. TerrainGrid caches tiles on the border for fast loading (if they have already been loaded), and terrain takes up a decent amount of memory when it is large.
OK, how do I allocate more memory, & is there any way to do this on the players computer without them having to mess around?
In the SDK, under Properties (of your project) → Run → VM Options. You set the memory there.
I’m not sure if it builds the distribution with that, haven’t tried. But it will definitely increase the amount of memory locally when you run it.
Ok, thanks, but I still have the problem of the terrain being too small, no matter how big I make it. If I set it to 8f then it gets culled & its just too damn big anyway. I’m going to call it a day for tonight but thanks for your help.
It is it ‘too small’ no matter how big you make it, then you need to play around with your in-game unit size. ie. is 1 jme unit 1 meter, 2 meters? You can always adjust your clipping plane distance. But remember, you need to balance out the polygon count.
How do I increase the clipping plane distance?
This is a video showing how it is. The terrain size is 513, scaled up by 2f,2f,2f.
http://www.youtube.com/watch?v=KFz7eeJ4Nvk&feature=youtu.be
Where it looks like its lagging about 0:15 its because i am moving in jolts.
I am just using a flat black heightmap for now to test out my splat maps.
yea your tiles are small and you are moving very, very fast. They are switching at half way through the tile as they should. There is a delay in them loading, so if you are still moving while they are loading it will appear as if they are loading as you reach the edge.
cam.setFrustumFar(distance);
Ok, ill try that. Is that frustrum to determine the distance at which the edge of the terrain is culled?
Thanks Sploreg
@javagame said:
Ok, ill try that. Is that frustrum to determine the distance at which the edge of the terrain is culled?
It sets how far out the entire scene is culled..
Yes thats what I meants silly me
So I set the flycam.movespeed to 100 & scaled the terrain by 30f. Ill just have to make my the paths on my splat maps really small becasue now the paths are massive. Thanks @Sploreg
Also, does anyone know a quicker way of splitting up one big height/splat map into many smaller images? It took me ages to divide them all up on photoshop last time.