Blender Git Commit Log

Git Commits -> Revision 460dd7a

Revision 460dd7a by Brecht Van Lommel (master)
December 15, 2007, 20:41 (GMT)

Render Instancing
=================

Big commit, but little user visible changes.

- Dupliverts and duplifaces are now rendered as instances, instead
of storing all of the geometry for each dupli, now an instance is
created with a matrix transform refering to the source object.
This should allow us to render tree leaves more memory efficient.

- Radiosity and to some degree raytracing of such objects is not
really efficient still. For radiosity this is fundamentally hard
to solve, but raytracing an octree could be created for each object,
but the current octree code with it's fixed size doesn't allow this
efficiently.

- The regression tests survived, but with I expect that some bugs will
pop up .. hopefully not too many :).

Implementation Notes
====================

- Dupligroups and linked meshes are not rendered as instances yet,
since they can in fact be different due to various reasons,
instancing of these types of duplis that are the same can be added
for them at a later point.

- Each ObjectRen now stores it's own database, instead of there being
one big databases of faces, verts, .. . Which objects that are actually
rendered are defined by the list of ObjectRenInstances, which all refer
to an ObjectRen.

- Homogeneous coordinatess and clipping is now not stored in vertices
anymore, but instead computed on the fly. This couldn't work for
instances. That does mean some extra computation has to be done, but
memory lookups can be slow too, and this saves some memory. Overall
I didn't find a significant speed impact.

- OSA rendering for solid and ztransp now is different. Instead of e.g.
going 8 times over the databases times and rendering the z-buffer, it
now goes over the database once and renders each polygon 8 times. That
was necessary to keep instances efficient, and can also give some
performance improvement without instances.

- There was already instancing support in the yafray export code, now it
uses Blender's render instances for export.

- UV and color layer storage in the render was a bit messy before, now
should be easier to understand.

- convertblender.c was reorganized somewhat. Regular render, speedvector
and baking now use a single function to create the database, previously
there was code duplicated for it.

- Some of these changes were done with future multithreading of scene
and shadow buffer creation in mind, though especially for scene creation
much work remains to be done to make it threadsafe, since it also involves
a lot of code from blenkernel, and there is an ugly conflict with the way
dupli groups work here .. though in the render code itself it's almost there.

Commit Details:

Full Hash: 460dd7a7bbd43526e684bde96fcb6098676afdc8
SVN Revision: 12896
Parent Commit: dbc8e1e
Lines Changed: +4548, -4465

34 Modified Paths:

/source/blender/blenkernel/intern/anim.c (+1, -9) (Diff)
/source/blender/makesdna/DNA_object_types.h (+1, -0) (Diff)
/source/blender/nodes/intern/SHD_nodes/SHD_geom.c (+1, -1) (Diff)
/source/blender/radiosity/intern/source/radfactors.c (+2, -2) (Diff)
/source/blender/radiosity/intern/source/radrender.c (+157, -138) (Diff)
/source/blender/render/extern/include/RE_raytrace.h (+23, -3) (Diff)
/source/blender/render/extern/include/RE_shader_ext.h (+7, -1) (Diff)
/source/blender/render/intern/include/rendercore.h (+2, -1) (Diff)
/source/blender/render/intern/include/renderdatabase.h (+40, -45) (Diff)
/source/blender/render/intern/include/render_types.h (+51, -26) (Diff)
/source/blender/render/intern/include/shadbuf.h (+5, -0) (Diff)
/source/blender/render/intern/include/shading.h (+4, -2) (Diff)
/source/blender/render/intern/include/strand.h (+3, -97) (Diff)
/source/blender/render/intern/include/zbuf.h (+21, -14) (Diff)
/source/blender/render/intern/source/convertblender.c (+2037, -2513) (Diff)
/source/blender/render/intern/source/envmap.c (+73, -63) (Diff)
/source/blender/render/intern/source/imagetexture.c (+0, -1) (Diff)
/source/blender/render/intern/source/rayshade.c (+106, -60) (Diff)
/source/blender/render/intern/source/raytrace.c (+129, -52) (Diff)
/source/blender/render/intern/source/rendercore.c (+185, -143) (Diff)
/source/blender/render/intern/source/renderdatabase.c (+381, -404) (Diff)
/source/blender/render/intern/source/shadbuf.c (+166, -134) (Diff)
/source/blender/render/intern/source/shadeinput.c (+183, -132) (Diff)
/source/blender/render/intern/source/shadeoutput.c (+1, -1) (Diff)
/source/blender/render/intern/source/strand.c (+202, -141) (Diff)
/source/blender/render/intern/source/texture.c (+34, -33) (Diff)
/source/blender/render/intern/source/zbuf.c (+635, -369) (Diff)
/source/blender/src/meshlaplacian.c (+2, -2) (Diff)
/source/blender/yafray/intern/api.cpp (+0, -2) (Diff)
/source/blender/yafray/intern/export_File.cpp (+6, -4) (Diff)
/source/blender/yafray/intern/export_Plugin.cpp (+9, -7) (Diff)
/source/blender/yafray/intern/yafray_Render.cpp (+80, -62) (Diff)
/source/blender/yafray/intern/yafray_Render.h (+1, -1) (Diff)
/source/blender/yafray/YafRay_Api.h (+0, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021