PDA

View Full Version : Each scene redrawn for each frame?



mallyone
07-01-2009, 11:25 AM
I'm used to 2d animation, blit'ing small chunks of graphics to a canvas. Only overwriting parts of the canvas that need overwriting, keeping the overhead as low as possible.

In straight openGL it looks like each scene must be built for each frame? Is this the case, does that mean that if I'm getting 60fps, each scene is drawn 60 times a second? Is there anyway of reusing previously rendered "objects" in a scene?

I've started looking into scenegraphs and physics engines as a way to manage scenes and scene objects, but I'm more intersted in how to do it myself.


Thanks, m1.

zeoverlord
07-01-2009, 01:26 PM
It depends on the situation, it is possible to save it as a texture sometimes(like a background scene), but depending on what your doing, it might not.

so yea, in general expect to render everything 60 times a second, but then again hardware accelerated graphics is so much faster than in any situation where 2d bliting is an improvement.

Alfonse Reinheart
07-01-2009, 01:45 PM
Think about it. If you move the camera, even slightly, there's nothing you can use from the previous render. If a light moves, there's nothing you can use from the previous render.

It takes so little to completely invalidate a 3D scene that it's never actually worth the effort.

scratt
07-01-2009, 08:12 PM
Well unless some objects are relatively distant in your world / scene, and then you can learn all about Impostors.. Wonderful things. Something I think zeoverlord was alluding to.

But for all intents and purposes for your local scene you are much better off having a good SceneGraph implementation and using as much frustum and occlusion culling as you can get away with.

OpenSceneGraph is certainly worth a look if you are considering scene graphs.

mallyone
07-02-2009, 09:18 AM
Thanks members, I know it seems like a stupid question, but you have to start somewhere :).

I'll definitely check out openscenegraph, there's also a set of tools out by garage games, costs a few bucks but might be a decent abstraction.

Thanks again :).