RenderBin optimization

Works correctly here.

OK. Thanks. I’ll investigate, why it isn’t here.

The optimization is done ;D As I said: From my calculations we should be up to par with Java3D now (even if I haven’t tested it myself).

The scenegraph is now only refilled when, one sets the dirty flag on the VirtualUniverse object or the Locale or a BranchGroup. Or when a Switch node has changed it’s value. The least behaviour can be avoided, too. But this needs some more brainstorming and I don’t expect too much from it.

The scenegraph modifiactions are managed by com.xith3d.scenegraph.modifications.ScenegraphModificationsListener respectively com.xith3d.render.ScenegraphModificationsManager. Maybe I forgot to manage anything (being notified of a specific change in the scenegraph) if this is the case. please tell me.

Frustum culling of course needs to be done each frame. I’ve written a new class called FrustumCuller, which does the job quite efficiently. It makes use of the current frame id, which simply is a number, that is incremented each frame. Only atoms holding this number are rendered. This way the groupwise culling can still be done without clearing the RenderBins.

RenderBin sorting can be an FPS killer. It must not be done too often. I’ve added a field to the Renderer class called get/setMaxViewDelta(), which is by default 0.1f and which I have set to 1.0f for Q3 test. The view has to move 1.0f in the virtual world until the atoms get resorted (or if anything else has been changed, which needs resorting). 1.0f is a good tradeoff. Play with this value to increase performance.

renanse, could you please use the current version for the webstart thing?

If i forgot to mention anything, I’ll tell you when I remember (or just ask).

Enjoy :wink:

Marvin

Woohoo ! 23.69151467089611 FPS now ! (which is incredible compared to the previous flights… I used to run at ~16.8 FPS)

Are link and sharedgroups correctly handled with display lists now ?

Will do it this evening.

OK, so I don’t use them for now in my game.

[quote=“Marvin Fröhlich,post:23,topic:28472”]
Sure, I’ll plan to go forward with this then soon here.

Hmm, after updating xith3d and xith-tk, the geometry of the quake level is a bit odd. It looks like the indices are messed up in some places or something, especially over the doorways. Anyone else see that?

Got a screenshot?

Kev

Yes, I see that, too. But I don’t think, it has somehting to do with the renderer, but with the loader. But I have no idea what it could be.

done.

Sure. http://www.renanse.com/xith/xith-geom-problem.jpg

Ahhh HA!!! ;D my missing FPS counter is yellow in the upper corner of this image…

My mistake this was a HUD sample in the BSPLoader not my code…

I believe thats that FRAPS counter - though maybe it’s a good mimic?

Kev

It’s fraps. :slight_smile:

What is fraps? is it a person, who wronte an fps counter? Is it based on the HUD system? Is it based on RenderLoop’s FPS event? How is it done? Does it effect the actual FPS?

http://www.google.com/search?hl=en&q=fraps&btnG=Google+Search

http://www.fraps.com/

It’s a frame rate counter (and video capture and other stuff) which is independent on the software/engine/scenegraph generating the render. It’s nice in that it doesn’t rely on some part of the engine getting the timing right etc. I would assume in this case it’s being used on all 3 engines to check FPS as an independent observer.

Kev

Ah. Thanks.

Same problem… should be in the BSPLoader/BSPConverter… who touched that recently ?