Blender Git Loki

Git Commits -> Revision c7ffe7f

Revision c7ffe7f by Nicholas Bishop (master)
March 6, 2012, 02:40 (GMT)
Draw individual face's material and shading correctly in the PBVH.

Previously, the shading and material was set once per PBVHNode when
drawing. This is still the case, but PBVHNodes are now built to
contain only one material and shading mode.

This is done with an extra partitioning step; once the number of
primitives in the node falls below the PBVH leaf limit, it's
primitives are checked for matching materials. If more than one
material or shading mode is present in the node, it is split and
partitioned (partitioned by material rather than 3D location.)

Given a sufficiently 'annoying' input, like a dense mesh with
thousands of materials randomly scattered across it, this could
greatly increase PBVH build time (since nodes might end up containing
a single primitive), but in general this shouldn't come up.

In order to support materials for grids, the CCGDM is building another
grid array (of DMFaceMat structs). This could be used to replace
CCGDM.faceFlag for some small memory savings (TODO).

Commit Details:

Full Hash: c7ffe7f621810f61e53343850ce42f367830fad9
SVN Revision: 44665
Parent Commit: 9c7e8e8
Lines Changed: +201, -75

8 Modified Paths:

/source/blender/blenkernel/BKE_DerivedMesh.h (+8, -0) (Diff)
/source/blender/blenkernel/BKE_subsurf.h (+3, -2) (Diff)
/source/blender/blenkernel/intern/cdderivedmesh.c (+1, -2) (Diff)
/source/blender/blenkernel/intern/subsurf_ccg.c (+27, -20) (Diff)
/source/blender/blenlib/BLI_pbvh.h (+7, -5) (Diff)
/source/blender/blenlib/intern/pbvh.c (+118, -31) (Diff)
/source/blender/gpu/GPU_buffers.h (+5, -3) (Diff)
/source/blender/gpu/intern/gpu_buffers.c (+32, -12) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021