I have a problem I’m not able to find an answer to. I tried everything I could think of, but I got nothing.
I have a room, 200x200x10, and a cube (2x2x2) at every intersection of lines with x and y multiple of 10 (361 cubes). You can see what I’m talking about here - http://www.dako.ro/panda3d/m7.mov.
The problem is that the frame rate drops when pitching up (angle is greater than zero), but only when going in some directions. The camera is initially in the right-bottom (so to speak) corner of the room. Walking along Y-axis with pitch -5 gives me 60fps (http://www.dako.ro/panda3d/m1.mov). Pitching with +5 in the same direction gives me less than 20fps (http://www.dako.ro/panda3d/m2.mov). Walking along X-axis with pitch -5 gives me 60fps (http://www.dako.ro/panda3d/m3.mov) and I get the same with pitch +5 (http://www.dako.ro/panda3d/m4.mov). Going diagonally gives me different values for -5/+5 pitch (http://www.dako.ro/panda3d/m5.mov/http://www.dako.ro/panda3d/m6.mov). In the movies the frame rates are different because of QuickTime recording, but even so you can see the differences…
Initially I had some other objects instead of the cubes, objects with more vertices and more materials and textures. Replacing them with really simple objects didn’t solve the issue.
I also had my camera attached to another 3d object, but even without that object the problem persists. I took out collisions and got the same results.
I also tried different lights (point, directional) and no lights, with walls, floor and ceiling and without, with textures or colors, but none of this fixed my problem.
Can anyone shed some light on this issue?
There is another issue, not so important at this moment, but it would be nice to have an answer to this one too. In m7.mov you can see that the colors of floor, ceiling and walls are changing dramatically as the camera moves. It gets better if I use textures, but how can I use colors and have better results?
Thanks & best regards,
P.S. The simplified code and the objects used are here - dako.ro/panda3d/app.zip