render baking efficiency on SMP machines.

Blender's renderer and external renderer export

Moderators: jesterKing, stiv

Post Reply
RipSting
Posts: 5
Joined: Wed Nov 27, 2002 1:58 am
Location: Oregon, USA
Contact:

render baking efficiency on SMP machines.

Post by RipSting »

I've been noticing that smaller polygons get rendered first when baking light maps. Is it just a coincidence, or is it coded that way? Wouldn't it be more efficient if larger polygons were rendered first?

Imagine there are hundreds of small polygons in an object and one very large quadrilateral. The way it is now, all 8 threads seem to render the small polygons first. Then, at the very end it will have a single thread render the large polygon while the other 7 threads are idle. Wouldn't it make more sense for one of the threads to be rendering the large polygon while the others were taking care of the smaller ones? It would simply load-balance more efficiently.

Therefore, I propose (regardless of how it may or may not be coded currently) that render baking should give polygons with the largest area first priority. In other words, the internal area of a polygon is directly proportional to the order in which it is rendered.

This could also be extended to render the most complex materials (read: time-consuming) first, perhaps based on the number of material nodes being utilized. Each material node could perhaps have a speed quotient associated with it (RGB->BW = 1.0, Curves = 1.5, Displacement Map = 5.0) to help with this type of calculation. The higher the sum of the speed quotients of all nodes, the more priority given to polygons with that associated material.

Any thoughts?

RipSting
Posts: 5
Joined: Wed Nov 27, 2002 1:58 am
Location: Oregon, USA
Contact:

Re: render baking efficiency on SMP machines.

Post by RipSting »

I strongly believe this needs to be looked at once more. ToastBusters over at blenderartists came up with a simple load-balancing solution to tile-based rendering.

http://blenderartists.org/forum/showthread.php?t=119670

brecht_
Posts: 0
Joined: Mon Sep 25, 2006 11:06 am

Post by brecht_ »

I don't think this would be a very important optimization, especially taking into account materials adds too much complexity for the average speed gain. The proper solution is really to make baking tile based.

Similarly for rendering doing the most complex tiles first only sidesteps the problem that the tiles should be smaller.

There's loads of opportunities for optimization in many parts of Blender, not sure why this particular one would need more attention, but well coded patches are always welcome.

Post Reply