Artifacts then enabling frustum culling

Hello,



I'm new to jMonkey and is playing around with the TestIsland. I tried to enable the frustum culling with changing the line

rootNode.setCullMode(SceneElement.CULL_NEVER);


to

skybox.setCullMode(SceneElement.CULL_NEVER);


But then running I sometimes get a black screen in some angles then I look up in the sky. Although the culling is working fine (I can see that the number of triangles drawn is changing based on where i look). The black screen only happens at some specific angles and always then looking up. An then it's not black on the screen, the sky is rendered as it should be.

Am I missing something? Tried to search the forum but found nothing.

/Robert

skybox is connected to rootNode and does not have a world bound associated with it…  therefore, when the world bound of the root node goes out of frustum, all of its children go too.  The correct change is to have rootNode remain cull never, but make the terrain cull dynamic.

Ok, i tried setting:


rootNode.setCullMode(SceneElement.CULL_NEVER);
splatTerrain.setCullMode(SceneElement.CULL_DYNAMIC);



but then no culling is performed on the terrain. Is it because the frustrum culling thinks all nodes connected below the rootNode are visible because of the CULL_NEVER mode?

Actually, I've done the same thing locally and it works like I've said.  Just remember though to take the other CULL_NEVER out down in the initSpatial method.  You may also need to remove the lockBounds in the buildSkyBox method