Greetings (again). My last attempt at a topic was a bit too nebulous to provide the information necessary to give worthy opinions, so here’s version 2.0. ^^
I’m new to OpenGL and Jogl so please bear with me, I’ve read the “better read these first” topics but I haven’t found an answer to my problem.
I’m working on a scene representing an ancient Greek theatre, the Epidaurus one. If you don’t know what it looks like and have the Quicktime plugin, go here: http://www.ub.es/telemac/qtvr/grk/epidauro.htm for a 360 look.
Onto the problem. I have most of the structure done. I’ve made it entirely of quads and none of them show clipping or anything. The scene is rendered on top of the Nicholas Campbell Jogl version of NeHe’s “Moving around a 3d world” tutorial. It amounts to, more or less, 5000 quads, and 1 scene unit has been taken as though it were 1 meter of length. There’s also one ambient light and one directional light, and mipmap filtering enabled for textures, though enabling it or disabling it doesn’t seem to do much or any difference at all. The coordinates for the scene are calculated once and then stored in multidimensional arrays for access through gvertex etc.
The problem is that I’m at the point where the theatre looks a bit ugly unless I cover the sides of the ‘staircases’ with ‘walls’. These walls have to be “thick”, so they’re actually solid objects (or mostly that, they lack some faces, ie groundwards etc). I can manage wtih 3 polygons to make a ‘wall’. Up to 2 walls done and placed, everything’s fine. As soon as I place one more polygon to start building the next wall though, the whole scene goes sluggish and the framerate drops. You can tell that because the basic movement provided in this tutorial is not time-based and so the viewer position is updated along with the display() cycles.
Here’s pictures of the scene:
this is the left side of the theatre, there’s a ‘wall’ on the lower level and everything’s fine so far.
http://immano.altervista.org/forum/Capture_17.jpg
This is the same side with a wall added to the upper level: framerate drops dramatically.
http://immano.altervista.org/forum/Capture_18.jpg
Closeup of the area with no wall:
http://immano.altervista.org/forum/Capture_19.jpg
Same as above but with the wall: as you can see, it’s made of 3 polygons: the ‘top’ of the wall, the side adjacent to the stairs, which is as tall as the stairs, and the taller quad parallel to it.
http://immano.altervista.org/forum/Capture_20.jpg
Mind that it doesn’t take that huge polygon to screw up the scene, the thin ‘top’ polygon is sufficient to that effect.
You may have noticed that the textures are monotone…yes, it’s the same texture everywhere, it’s stretched to have different looks depending where it is applied, but the shape is always regular, no inversions or anything like that.
The lower side walls were made first. They seemed to perform much worse with heavy tiling though, so since they even looked better with less, I just had the texture repeated once on them. It’s a standard 256x256 bmp, taken from here: http://www.noctua-graphics.de/english/Tex/stone_01.htm (it’s stone 08).
The machine I’m using is a 2800+ AthlonXP with 1Gb ram and a Radeon 9700, and another thing I think is worth noting is that changing resolution to the scene seems to change nothing. It stutters just as bad at 640x480 as it doest at 1280x1024. Just as it worked as fine in the same range of resolution until I added that one polygon.
So the question becomes: what could be the cause for the sudden decrease? It’s not the size of the polygon. It’s not the position either, I think, cause I’ve taken out the lower walls and put the upper ones in the scene and once again the scene becomes fluid. The polygon’s aren’t clipping with each other or adjacent ones, and there’s no change if I reasonably increase or decrease the tiles of texturing in them…one tile stretched over the whole polygon works the same as four of them on the same surface. At least, I think. A few weeks ago any OpenGL/DirectX client I’d open, be it Jogl or a videogame (Half-Life2, Metal Gear Solid 2, whatever) would display an uncalled for framecounter on the top-right angle of the screen, and now that I’d need that it’s nowhere to be seen. >:(
What I haven’t tried yet is adding a polygon in a completely different region of the scene, and I’m going to try that now, but still, I wouldn’t know what to make of any results it gave. There must be some stupid reason why a 5000-quad scene is fluid and a 5001 one is not, and it can’t be that the whole thing is fed up with me.
Any help would be greatly appreciated. Thanks in advance.