[Bf-committers] How about adding boost uBLAS librarytoblender/extern?
Brecht Van Lommel
brecht at blender.org
Wed Jan 28 03:22:46 CET 2009
Interesting discussion here, I didn't want to get sucked into it but
decided to anyway :).
First, the Blender internal render is not somehow very optimized for C.
Using C++ can work fine, but it would obviously be a lot of work to
convert all the code, and not all developers like working with C++, so
there's isn't really incentive for it. Eigen has neat template tricks,
but all the math data types we need in the render engine are a fast 4x4
matrix and 4-vector (assuming 3-vector is not worth the overhead), which
can be SSE optimized in C too.
Second about the render engine design, evidently the shading system
could be improved along with many other areas. I don't think anyone
doubts that, we can always use more people to work on the render engine.
Regarding raytracing, I find this very interesting. However often
performance numbers are based on rendering coherent rays from the
camera, which rasterization is already very good at anyway. For shadows
however raytracing is still quite coherent and there it can provide
great results without worrying about shadow map resolution and such.
Similarly for sharp reflections and refractions (but the shading cost of
that gets high quickly). It does break down when you have hair or a tree
with many leaves, that gets incredibly noisy and incoherent..
On Tue, 2009-01-27 at 19:16 -0500, Yves Poissant wrote:
> At work, I implemented a production ray-tracer that can render complex
> scenes including indirect illumination in less than 10 seconds per 800x450
> 5x-AA frame on a single core and not even using SSE, the GPU or even Boost
> (or Eigen).
I'm a bit skeptical about what you mean by 'complex' here :). Complex
like architectural scenes with a few 100k polygons or 25 million
polygons as in a BBB scene? Nevermind the complexity of a 4k picture
with displacement mapping everywhere.. . The number of operations scales
logarithmically but the memory access gets slower too, and it's even
worse when the scene does not fit in main memory.
Now, even for very highly poly scenes I think raytracing is valuable,
but not pure raytracing, you need to start thinking about disk caching,
multiresolution, prefiltering, irradiance caching, etc. I also read that
Pixar often used point based occlusion and environment maps(!) for
Wall-E because the scenes were too complex to raytrace efficiently. That
does not mean ray tracing isn't usable because it obviously is being
used for production rendering, but somehow I don't think pure raytracing
scales up as well as it does in theory, and designing a render engine
with multiresolution, prefiltering and caching in mind is just as
Anyways, I don't really disagree with you that much since not everyone
is trying to render crowds in 4k resolution .. but I guess that's the
use case I'll judge rendering algorithms by in the next 12 months or so.
More information about the Bf-committers