linear combination of vertices vs. normals
#1
Posted 20 April 2011 - 09:33 PM
Is it possible to prove that if a new vertex is produced by linearly combining two other vertices, its normal will be linear combination of the two normals?
It seems that way experimentally.
Thanks!
#2
Posted 20 April 2011 - 10:33 PM
#3
Posted 20 April 2011 - 10:43 PM
For example, Mesh1 & Mesh2 have only vertical normals while blended mesh not:
#4
Posted 20 April 2011 - 10:48 PM
v1 be on mesh1
v2 be on mesh2
and create mesh3 where v3 = 0.5 * (v1+v2)
under which conditions n3 = 0.5*(n1 + n2) ?
#5
Posted 20 April 2011 - 10:50 PM
#6
Posted 21 April 2011 - 12:06 AM
Even if the interpolation factor is constant over the whole mesh, I do not think it completely works. It may give a good approximation in many cases however.
#7
Posted 21 April 2011 - 04:07 AM
What are the assumptions that are made in such a case?
Thanks
#8
Posted 21 April 2011 - 01:01 PM
Consider interpolation between triangles {(0,0,0); pt1; pt2} and {(0,0,0); pt1+d1; pt2+d2}. Unnormalized normals will be cross(pt1, pt2) and cross(pt1+d1, pt2+d2) correspondingly.
With interpolation factor t triangle becomes {(0,0,0); pt1+t*d1; pt2+t*d2}. Right normal for this triangle is
cross(pt1+t*d1, pt2+t*d2) = cross(pt1, pt2) + t*cross(pt1, d2) + t*cross(d1, pt2) + t*t*cross(d1, d2).
Interpolated normal diverges from that expression in last term, simple linear interpolation gives t*cross(d1, d2) instead of t*t*cross(d1, d2).
In case of normalized normals expressions will be more heavy but not mathematically correct either.
#9
Posted 21 April 2011 - 03:00 PM
y3=(y1+y2)/2
z3=(z1+z2)/2
(renormalize 3)
doesnt get any more complex when your subdividing a triangle.
#10
Posted 21 April 2011 - 07:20 PM
rouncer said:
y3=(y1+y2)/2
z3=(z1+z2)/2
(renormalize 3)
doesnt get any more complex when your subdividing a triangle.
#11
Posted 21 April 2011 - 07:24 PM
'}:+()___ [Smile said:
Consider interpolation between triangles {(0,0,0); pt1; pt2} and {(0,0,0); pt1+d1; pt2+d2}. Unnormalized normals will be cross(pt1, pt2) and cross(pt1+d1, pt2+d2) correspondingly.
With interpolation factor t triangle becomes {(0,0,0); pt1+t*d1; pt2+t*d2}. Right normal for this triangle is
cross(pt1+t*d1, pt2+t*d2) = cross(pt1, pt2) + t*cross(pt1, d2) + t*cross(d1, pt2) + t*t*cross(d1, d2).
Interpolated normal diverges from that expression in last term, simple linear interpolation gives t*cross(d1, d2) instead of t*t*cross(d1, d2).
In case of normalized normals expressions will be more heavy but not mathematically correct either.
#12
Posted 21 April 2011 - 08:13 PM
p1 is the point on mesh1 and p2=p1+d is the point on mesh2.
n1 = p1 x (p1+v) --> this basically assumes that there is a dense mesh
n2 = (p1+d) x (p1+d+v) ---> this assumes again density, that the neigh point on mesh2 is close by v to p2.
then the new point p = p1+ t*(p1+d) and its normal will be
n = (p1+t*(p1+d)) x (p1+t*(p1+d)+v)
= (p1+t*(p1+d)) x v
= n1 + t*n2
what do you guys say?
mankind said:
#13
Posted 21 April 2011 - 09:13 PM
mankind said:
n1 = p1 x (p1+v) --> this basically assumes that there is a dense mesh
mankind said:
A normal is nonlinear (quadratic in simple case) function of points position. Simple interpolation works only in case of linear functions.
#14
Posted 21 April 2011 - 09:21 PM
I assumed each triangle is consists of 0,0,0 p1 and p1+v
I'm trying to say that maybe the way you defined it is not completely correct--since it's not like we're stretching the triangle when we interpolate but we take other points (which are close to the interpolated point) to get the normal.
'}:+()___ [Smile said:
Wrong formula, must be p = (1-t)*p1 + t*(p1+d) = p1 + t*d.
A normal is nonlinear (quadratic in simple case) function of points position. Simple interpolation works only in case of linear functions.
#15
Posted 22 April 2011 - 09:30 AM
n = (p1 + t*d) x (v + t*dv) != n1 + t*(n2-n1).
Error is t*(1-t)*[d x dv] -- then rotation and deformation of each triangle is small compared with its size, error is small also.
Interpolation is essentially stretching triangles and normals usually calculated as weighted sum of neighbour triangle normals. But even if our meshes are approximation of some mathematic surfaces and normals calculated from exact derivatives, error will be the same order as normal is nonlinear function of that derivatives.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











