diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-07-13 23:33:25 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-07-13 23:33:25 +0400 |
commit | 33b65832d2002979c27b39a1fbe1d59f77a24565 (patch) | |
tree | 331a9914fe8a231a7b0ecaa3cd2513750f314a02 /source/blender/freestyle/intern/view_map/BoxGrid.cpp | |
parent | b7396654e181b84985ef54b7afce252b2584e69a (diff) |
Fix for [#35482] 2.67 freestyle line visibility computation bug.
The reported line visibility issue was caused by a wrong calculation of a 2D
bounding box (so-called "proscenium face" in Freestyle) in the case of a
spherical grid data structure used for a perspective camera. The problem was
resulting from the proscenium computation based on two corners (min and max)
of the 3D bounding box of imported mesh data. Aware of the spherical coordinate
transformation involving non-linear (arctangent) functions, now the proscenium
is computed by taking in account all the eight corners of the 3D bounding box.
Also added minor code changes to facilitate future debugging.
Diffstat (limited to 'source/blender/freestyle/intern/view_map/BoxGrid.cpp')
-rw-r--r-- | source/blender/freestyle/intern/view_map/BoxGrid.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/view_map/BoxGrid.cpp b/source/blender/freestyle/intern/view_map/BoxGrid.cpp index 2e702813fb8..f770bf6843f 100644 --- a/source/blender/freestyle/intern/view_map/BoxGrid.cpp +++ b/source/blender/freestyle/intern/view_map/BoxGrid.cpp @@ -129,6 +129,10 @@ void BoxGrid::assignCells (OccluderSource& source, GridDensityProvider& density, _cellsY = density.cellsY(); _cellOrigin[0] = density.cellOrigin(0); _cellOrigin[1] = density.cellOrigin(1); + if (G.debug & G_DEBUG_FREESTYLE) { + cout << "Using " << _cellsX << "x" << _cellsY << " cells of size " << _cellSize << " square." << endl; + cout << "Cell origin: " << _cellOrigin[0] << ", " << _cellOrigin[1] << endl; + } // Now allocate the cell table and fill it with default (empty) cells _cells.resize(_cellsX * _cellsY); |