”SkyDistance” / Max. RenderDistance

Hi all, :slight_smile:

my problem is, that when I load a more or less large terrain, jME doesn’t render the scene from a certain distance. I’ve made a screen to explain it:





Do you see the line, where the terrain isn’t rendered anymore? It just “cut” it up there - If I move the camera, the line is moving, too, so that I guess, there is a certain maximum distance, that is rendered.



Is there a way to change that distance or render “everything”? It’s because I’m creating some clips (with the Cinematic-Classes) for my game and in these, the user should see all of the terrain. :wink:



destro

It is probably the far clipping plane you are looking at. Haven’t tried it myself but you should be able to change the values for that in the camera class, or change the scale of your terrain. There simply has to be a far plane to render the scene for computational reasons. To get rid of the sharp line effect you may use a fog filter for a more subtle change into the background sky.

It is probably the far clipping plane you are looking at. Haven’t tried it myself but you should be able to change the values for that in the camera class

Hm.. I found nothing in these classes.
Sure, with a fog filter, it should look better, but I would like to have the complete terrain in my view...

Use this method on camera initialization:



Camera#setFrustumPerspective(float fovY, float aspect, float near, float far)



Near and far for clipping is here. Aspect = width/height of your window, and fovY something like 60-80° (in radians i think)

Hey, thanks! :slight_smile: Worked finde.



I found out, that you can simply call:

[java]cam.setFrustumFar(float far);[/java]

That’s all. :slight_smile: jME is really cool. :smiley: