kevancress / MeasureIt_ARCH

MeasureIt_ARCH is an addon for Blender, that adds tools to create design documentation and technical drawings that can be previewed within Blender's 3D viewport, and exported as images, vector graphics or .dxf files. Read the Doc's here:
https://kevancress.github.io/MeasureIt_ARCH/
Other
255 stars 36 forks source link

Improve Vector Depth Test Sampling. For inside Corners #243

Open kevancress opened 1 year ago

kevancress commented 1 year ago

I could probably use some of the techniques from here: https://github.com/ssloy/tinyrenderer/wiki/Lesson-1:-Bresenham%E2%80%99s-Line-Drawing-Algorithm

and here: https://github.com/ssloy/tinyrenderer/wiki/Lesson-2:-Triangle-rasterization-and-back-face-culling

to improve my vector depth sampling. Getting the pixel with the least error distance to the vector, line and sampling it, rather than aggregating samples from all adjacent pixels should be more accurate and faster.

kevancress commented 1 year ago

Started in 3b78e21272302075a6e09d46347935f6ae346ecf

kevancress commented 1 year ago

Depth testing is significantly improved for outside corners with these commits:

583a4f6d306bd68d7452c914f7c30cbcb9cdbce3 5604305566432967e009953c76ab6445f7f3b068 e0a440721bfb27e7834ed8f485ee1ed56dffefde

This does sampling of adjacent pixels based on the screen space normal, if any of the spine sample, inner normal or outer normal return true, then the point is considered visible.