I can see how positions and color can be a weighted combination of the vertices' positions and color but how are texture/material attributes weighted? For example, would it affect opacity, saturation, gloss, etc.?
Something interesting that I was thinking about regarding the color spectrum here is that no matter what colors you place at the A,B,C vertices, you're limiting yourself to a subset of the color spectrum. For example, with the colors here you have no way of achieving black or white since the sum of the weights would have to be 0 or 3 respectively
Following up on the first comment, how would the A,B, C vertices also represent things like normal vectors or material attributes? Would material attributes then be limited to 3 characteristics? Also, not sure of what the normal vectors would represent or the use of it in this case
Also confused about knguyen0811's question! It's not clear to me how weighted sums of texture coordinates work/get represented visually.
Also, for cases where the vertices are representing texture or color, what happens when one of the barycentric coordinates is negative, or if they don't add up to 1? How does that affect what the image looks like?
Here's how weighted sums of texture coordinates work. Imagine the vertices have texture coordinates uAu_AuA, uBu_BuB, and uCu_CuC (these are vectors in R2\mathbb R^2R2). Then the point VVV would have interpolated texture coordinates αuA+βuB+γuC\alpha u_A + \beta u_B + \gamma u_CαuA+βuB+γuC. This probably won't be integer valued... so how do you get the texel at these coordinates? There's a couple things you could do, and you get to implement them on assignment 1.
In general, you can interpolate any data that is in a vector space (which could have any dimension). Basically, if you have some data dA,dB,dCd_A, d_B, d_CdA,dB,dC at the vertices, you just need αdA+βdB+γdC\alpha d_A + \beta d_B + \gamma d_CαdA+βdB+γdC to be well-defined, which happens when dA,dB,dCd_A, d_B, d_CdA,dB,dC are in a vector space of some sort.
For wangcynthia, if one of the barycentric coordinates is negative, then that means the point represented is outside of the triangle that you're using. While there probably are some circumstances for which this is useful, in practice that probably shouldn't happen, since your computation pipeline is probably something like: find triangle containing point -> compute barycentric coordinates -> interpolate colors.
If they don't add up to 1, there are a couple ways to interpret the coordinates. The way that barycentric coordinates were defined states that they must add up to 1, so you could say that you just don't have a well-defined point. Alternatively, remember how for homogenous coordinates, we were allowed to have our 4th extra coordinate be some non-one value w, so long as we also stipulated that the points (wx,wy,wz,w) and (x,y,z,1) were equivalent? You can also do the same thing where you say (wa, wb, wc) and (a,b,c) are equivalent barycentric coordinates, in which case coordinates that don't add up to 1 just have to be rescaled so that they do add up to 1 before doing any kind of interpolation. There are some neat ways to use this idea to solve euclidean geometry problems, but I'm not sure if it ever comes up in computer graphics.
@nebster100, couldn't you achieve a fully black triangle by placing black (0, 0, 0) at all vertices?
@zehric I think what nebster is trying to say is that the colors inside the triangle is limited by the edge colors. So a black triangle would be possible by placing (0,0,0) at all edges, but no other color could possibly be in the triangle. Similarly, if each of the three edges of the triangle only had red and blue components, a green pixel won't appear inside the triangle.