[Bf-committers] viewport bug #27979

Ingo Randolf ingo at quitch.net
Wed Sep 14 12:56:14 CEST 2011


I found some time to work on this patch...


- Distance
is computed from object bounding-box, only the z-distance is computed, not the whole matrix... 
(using the bounding-box-center)

- sorting / drawing
z-sorting is only done if drawtype > OB_SOLID, for smaller drawtypes the current drawing code is used.

please find the patch here:

it is not a general solution for this issue... i don't know how to solve the problem of overlapping objects...
(the bounding-box center of an object can be further away than the one of another object but still can have face being in front)

how is this done properly?
i could imagine something like comparing the bounding-boxes of each object to take care of overlappings and figure out the drawing-order
but i also can imagine that this is very slow... hmm...

by testing i found, that the game-engine has a similar problem.
plz find a .blend here:

(the upper plane is moving away from the camera, at a certain distance the plane is flipping behind the other plane)

blender: 2.59.2 r40181
system: osx 10.6

i havent searched in the bug-tracker... so i don't know if this is a known issue and i am sorry if i am pointing out something obvious... ;)

any suggestions to solve this problem are much appreciated.


More information about the Bf-committers mailing list