Rendering suggestion

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
Lgilmour
Posts: 0
Joined: Mon Oct 29, 2007 9:50 pm

Rendering suggestion

Post by Lgilmour »

Hello. So...we are in the same class as jmeehan apparently. We are hoping to improve upon the render time of the program, or at least experiment with it, since this is probably a heavily investigated portion of the program. We are wondering if anyone has any suggestions on the location of a data structure that may affect the runtime of a render? We searched the raytracer source, but the data structures seem to be far elsewhere.

Thanks!

SirDude
Posts: 233
Joined: Sun Oct 13, 2002 7:37 pm
Location: University of Minnesota (USA)
Contact:

Post by SirDude »

The core rendering code is here:
blender/source/blender/render/intern/source

That doesn't really answer your question the way you asked it but thats what you should look at.... :)

Many things affect rendering time you can't just look at the data structures and come up with a speed improvement. You'll need to look at the code that does rendering and look for places that need improvement.

Now that you know where the code is, maybe a good first step would be to use gprof on some test renders that you create and use the output to find important functions you should focus on.

You should then also be able to evaluate if your "improvements" make a difference and if so how much.

Lgilmour
Posts: 0
Joined: Mon Oct 29, 2007 9:50 pm

Post by Lgilmour »

Thanks for your suggestion!

We have spent a substantial amount of time investigating the files you directed us to, and have noticed that some of the lists are extremely large. Since using the program is also a challenge to us (I went through a few tutorials just to learn to form simple mesh objects and to render them), we wonder if working on one small list (most of the objects are lists it seems - mesh, sky, etc.) might be simpler. We inserted some print statements to indicate which object lists are being called, but nothing has happened. Is there a render object that is smaller and is called whenever you render a certain object type (say a mesh or a NERB)?

Thanks again.

BeBraw
Posts: 0
Joined: Sun Feb 19, 2006 4:14 pm

Post by BeBraw »

You could take a look at convertblender.c (found in .../render/intern/source/ ). You can find the functions that convert all object types to render faces (VlakRen) there. Check the init_render_foo functions.

Basically you could do backface culling (removal of back faces) or similar tricks in that part. That could help in reducing the render time in certain cases.

Post Reply