computer-graphics-meshes icon indicating copy to clipboard operation
computer-graphics-meshes copied to clipboard

Question about per-corner normals

Open WilliamKingsford opened this issue 6 years ago • 3 comments

I have two questions about the use of per-corner normals in assignment 5:

  1. In the formula given for the corner normal, the sum considers only those vectors whose dot products with the face normal are less than epsilon. Shouldn't this be greater than epsilon, since the higher the dot product, the smaller angle between the vectors, and thus the less of a crease between the faces?
  2. In normals.cpp, a value of 20 is given for corner_threshold. This means that the normal vectors being considered must not be normalized first (or the dot product would always be <= 1), which seems counter-intuitive to me since then the angle cutoff before a normal vector is included in the average is dependent on the overall scale of the model (and thus the magnitude of the normal vectors), whereas it seems like we would want it to be scale-invariant. I also found that when I used the given value of 20 and didn't normalize my normal vectors, the model shows up as entirely dark for me, but if I use unit normal vectors and a corner_threshold value such as 0.8 I get the desired appearance.

Please let me know if there's something I'm misunderstanding.

WilliamKingsford avatar Oct 14 '18 21:10 WilliamKingsford

I have the same question with the dot product, For the second question, the header file shows that the corner_threshold are given in degrees. So I'm wondering if it means that if the degree between the two normals are bigger than, say 20 degrees, then we don't add the normal.

songfeil avatar Oct 15 '18 21:10 songfeil

I have a similar question regarding the dot product. Does it matter which face normal you take to compare? For example, if v1 has face f1,f2,f3 and f4, do you take f1 as the benchmark and dot product the rest with f1 to ensure its below the threshold? Like I am a bit confused about exactly which 2 normals to compare and which to reject

nafis95 avatar Oct 15 '18 22:10 nafis95

@nafis95 I think it involves with which face you're currently look at. Say v1 has face f1, f2, f3. Then for the v1 corner in face f1, compare with the normal of f1. For the corner in face f2 compare with the normal of f2.

songfeil avatar Oct 15 '18 22:10 songfeil