[Bf-committers] Camera clipping planes / Depth buffer

Alberto Torres kungfoobar at gmail.com
Sun Aug 10 19:01:17 CEST 2014


It's an issue with drawing editing stuff (points, lines and semi
transparent faces) over the mesh. There are two posibilities:

* Blender draws that stuff with a scale offset. That scale seems to me
absolute and instead it should be relative to the frustum size.
* Blender draws that stuff with a Z position offset assigned before being
transformed by the projection matrix, but it should be applied just after.
I've done this in a shader but I don't know if it's possible with fixed
pipeline functions.


2014-08-10 17:58 GMT+02:00 Igor Donevski <igor at fxlab.hr>:

> Actually I took another look at source and it seems to set glFrustum fine,
> however with metric and scale=1 it seems to prefer values nearing 0 for
> zNear. Setting the scale lower and upping the nearclip and farclip seems to
> help. I know depthbuffer isn't linear, maybe thats the problem? Maybe scale
> should be decoupled in the interface from the GL display?
>
> I can say from experience with other software that setting the clipping
> range to for example .01-100 shouldn't produce zbuffer problems, but there
> is occlusion problems in Blender with such range.
>
> Igor Donevski
> Animation director
>
> FX LAB
> Mahatme Gandhija 1
> 10000 Zagreb
> Croatia
>
> cell: +385 91 9309 132
> www.fxlab.hr
>
> On 10.08.2014., at 12:59, Igor Donevski <igor at fxlab.hr> wrote:
>
> > Currently it seems blender only uses near clip + fixed depth to setup
> the view camera. It should really fit between near and far clipping values
> for better zbuffer accuracy. I took a quick look at the code but don't have
> the time right now to do a patch. Anyone with better familiarity with the
> code could correct this with ease.
> >
> > Its a real annoyance with scenes that span big scale/details.
> >
> > Igor Donevski
> > Animation director
> >
> > FX LAB
> > Mahatme Gandhija 1
> > 10000 Zagreb
> > Croatia
> >
> > cell: +385 91 9309 132
> > www.fxlab.hr
> >
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list