[LDPatternCreator] Release 1.6.2 (Primitive Fix)


RE: (solved?) Precision problem with projection on template
#18
Philippe Hurbain Wrote:Hi Nils, sorry to disturb you from LDPE work, but...

While trying to create a template for tepee canvas (see this thread) I get precision issues (unmatching surfaces) when projecting on template.

I found out what was going wrong here...
Based on your tepee files, I created a small testcase with only two triangles and two projections...
The four points from the 3D space projections were not exactly on the same plane, e.g.


Code:
{148.9761 -244.3164; -130.5928 -136.1805; -129.882 -133.6628; 155.3681 -225.7627} {119.01 -5.000004 91.32; 15.868 -275 12.176; 14.142 -275 14.142; 106.065 -5.000004 106.065}
{155.3681 -225.7627; -129.882 -133.6628; -129.3147 -131.1094; 160.6992 -206.8793} {106.065 -5.000004 106.065; 14.142 -275 14.142; 12.176 -275 15.868; 91.32 -5.000004 119.01}

are two projections which were not able to map a common point from the 2D space to [14.142 | -275 | 14.142].
Therefore the resulting projection matrix was "incorrect".
Normally, LDPC fixes this, by splitting the non-coplanar quad projection into two triangles, but the threshold was too low in this case.

However, I attached a corrected version of the tepee test template and the corresponding LPC file. I hope this helps for now.

Last but not least, I could implement another approach*, without the calculation of the projection matrix, but I am currently not sure if there are any caveats.
I could calculate the UV coordinates in 2D and transform them into 3D... but this wont work if you want to project a whole primitive or subfile from 2D to 3D (this requires a projection matrix).

edit: * I will implement this new UV-based approach. But, I need time and a rainy day first Wink


Attached Files
.lpc   tepeetest_corrected.lpc (Size: 46.02 KB / Downloads: 0)
.txt   tepee_corrected.txt (Size: 3.63 KB / Downloads: 1)
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Next development tasks... - by Nils Schmidt - 2016-09-14, 5:02
Custom Primitive - by Nils Schmidt - 2016-10-24, 21:30
RE: Custom Primitive - by Bertrand Lequy - 2016-11-04, 18:31
RE: (solved?) Precision problem with projection on template - by Nils Schmidt - 2017-02-07, 18:57
"Auto-filler" - by Nils Schmidt - 2017-02-14, 20:42
Layers - by Nils Schmidt - 2017-02-14, 20:48
RE: Layers - by Willy Tschager - 2017-02-14, 22:11

Forum Jump:


Users browsing this thread: 4 Guest(s)