Low FPS on the scene? Why?

Greetings community, once again I need your wise help, I finished making my scene in blender, this is the first time I do a scene on a large scale.

when compiling, if I put the camera in dirreccion to buildings / people, get a performance / low fps, but if I put the camera to another place the FPS run normally.
Low FPS:

Normal FPS:

In summarizing the model is a mountain with a village above it, the mountain has several subdivisions, think I exaggerate a bit in subdivisions, but I doubt this is the problem.

I have a couple of buildings that are textured with a file in. Png in resolution of 2000 x 2000, with others in. Jpg with resolution of 2000 x 2000.
The latter may be related to the problem?

THIS IS ALL THE CODE:
[java] public void simpleInitApp() {

     flyCam.setMoveSpeed(20);
    
     
     
     ciudad2 = assetManager.loadModel("Scenes/CiudadBeta.j3o");



rootNode.attachChild(ciudad2);

   
    

DirectionalLight dl = new DirectionalLight();
    dl.setColor(new ColorRGBA(1.0f, 0.94f, 0.8f, 1f).multLocal(1.3f));
    dl.setDirection(new Vector3f(-0.5f, -0.3f, -0.3f).normalizeLocal());
    rootNode.addLight(dl);
    
    
    DirectionalLight dl2 = new DirectionalLight();
    dl2.setColor(new ColorRGBA(1.0f, 0.94f, 0.8f, 1f).multLocal(1.3f));
    dl2.setDirection(new Vector3f(-0.230979f,-0.20555435f,0.9509974f).normalizeLocal());
    rootNode.addLight(dl2);
    




    
    Texture west = assetManager.loadTexture("Textures/paisajepreuba2/Vue4.jpg");
    Texture east = assetManager.loadTexture("Textures/paisajepreuba2/Vue2.jpg");
    Texture north = assetManager.loadTexture("Textures/paisajepreuba2/Vue1.jpg");
    Texture south = assetManager.loadTexture("Textures/paisajepreuba2/Vue3.jpg");
    Texture up = assetManager.loadTexture("Textures/paisajepreuba2/Vue5.jpg");
    Texture down = assetManager.loadTexture("Textures/paisajepreuba2/Vue6.jpg");

    Spatial sky = SkyFactory.createSky(assetManager, west, east, north, south, up, down);
    rootNode.attachChild(sky);
    
}[/java]

The first screen with the 9 FPS you have 250 objects. While in the 2nd screen with 835 FPS you only have 50 objects. The more objects you have the slower it will go, not necessarily related to the poly count.
Try BatchNode to bundle your separate objects together. Also for the terrain you could try using JME’s terrain instead and enable the LOD control to save on the poly count.
Also, textures that are 2000x2000 might be a little much for your videocard, especially if it has a hard time rendering only 250 objects.

Actually, it’s 175 and 140 (slow) versus 50 (fast). Which is pretty bad for your setup if it’s an object count related issue.

Can you tell us more about your hardware?

To me, it’s more likely to be textures. The 800+ FPS one only has 20 textures showing… I suspect the 9 that aren’t in frame are slowing you down. On one of my slower machines, reducing the number of textures (to one in my test, versus 30) improved performance significantly.

Also, the uniform count goes up non-linearly with respect to object count for some reason even though the shader count stays the same. That’s not a problem itself but may point to some differences in what is rendered (more lit polygons versus unlit or whatever is different about one object’s shader versus another).

@pspeed said: Actually, it's 175 and 140 (slow) versus 50 (fast). Which is pretty bad for your setup if it's an object count related issue.

Can you tell us more about your hardware?

To me, it’s more likely to be textures. The 800+ FPS one only has 20 textures showing… I suspect the 9 that aren’t in frame are slowing you down. On one of my slower machines, reducing the number of textures (to one in my test, versus 30) improved performance significantly.

Also, the uniform count goes up non-linearly with respect to object count for some reason even though the shader count stays the same. That’s not a problem itself but may point to some differences in what is rendered (more lit polygons versus unlit or whatever is different about one object’s shader versus another).

this is my PC:
-AMD FX 4100 3.6Ghz ,16mb cache , 4 cores
-amd radeon hd 7770 1GB
-8GB RAM

First you have 2 directional lights. so all your object are rendered twice. try using an ambient light instead of the second directional light.
do you have shadows enabled?
in the last screen shot it seems you have, but not in the 2 first one and the code you posted doesn’t reflect it.
If you do please tell us what is you shadows setup (number of splits, size of the textures).
The texture size might be an issue too. Also idk if that can be an issue, but try to have texture sizes that are a power of 2 (2048 instead of 2000).

Also what’s in your ciudadBeta.j3o? Make sure you don’t have aother light in the j3o.

Do you have the low FPS also in fullscreen mode? Because I have a similar issue, but when I run fullscreen,
the FPS are fine…