Hi! I’m relatively new to Blender and I want to get a better understanding of something. I don’t think I’ve ever seen this behavior in other software and just want to confirm or fix my understanding about the difference of Vertices and Loop Indices and why we need loops at all.
The part that I am struggling with is that you can’t get/set attribute values on a per vertex basis. You must use loop indices which are unique for every face and vertex. The problem this brings is a lot of duplicate data, for example if I want to set a vertex color, I have to do it for every loop index of every face which uses that vertex, rather than just setting it in one place (the vertex.) You also have a lot more redundant storage of UV data, where you really only want UV data per vertex rather than per face… or am I missing something, is that actually desired in certain cases?
Along with this struggle, I am also wondering if there is some built in way to access data based on vertex ID rather than loop, because I do not need or want the behavior of having unique data per face, but only per vertex. As of right now, I have been unable to find an example of anyone doing this and all I can figure is I have to store 2 dictionaries so I can lookup what verts are tied to what loops and what loops are tied to what verts - yet more redundancy… tell me it isn’t so and there is a better way!
I guess I don’t understand why you would want a bunch of redundant data that you probably don’t need, where if you did need it you could always just separate that face… again, trying to find insight on this decision/behavior. I’m sure there’s some benefits of having things this way, I just don’t know what they are, so please share. Also, do other apps do this? If I export to certain file formats, do the exporters simply get rid of the redundant data by averaging or some such thing?
What I am doing is playing with coloring vertices based on a map, similar to the addon which ships with Blender now called “Bake UV-Texture to Vertex Colors”, however what I am trying to do is do a weighted average of all the pixels contained within a UV polygon so that each vertex gets colored according to all the pixels which are near it, rather than a 1 sample whatever pixel is under my UV vertex make that my vertex color kind of thing (what the current script does.) This script is setting color data on a per loop basis, which works out fine for this script because although the data is being set redundantly per loop it is also being redundantly calculated to the same color value per loop… where it could be doing a single color lookup and setting it for this vertex in every loop which uses it.