I’d like to see functionality similar to what the particles have where you can query within a spherical radius and get # neighbors, avg position, avg color, etc. This would help find high density areas of the mesh or ‘blur’ colors.
Also curious if since custom channels are supported, there would be a way to store a ‘radius’ value to a vertex and be read by frost. Again, you could have vertices that were dense have smaller radii than isolated vertices.
Some of this could be done, like number of vertices and average position, but in general there is no easy mapping from a geometric vertex to a map channel value like color.
Wouldn’t you just sample the texture verts or faces in those cases? You might need to sample faces in a separate node as geometry verts, but you’d still be returning a single piece of data per iteration primative.
In addition to sum and average, I’d really like to see min, max, and gradient (as a vector). This goes for Particles and Krakatoa too.
Since there are potentially many texture verts that correspond to a single geometry vert, it is not clear to me how to you reduce that to a single value. For example, if collecting the sum of vertices within 5 units. What is the result if some vertices have multiple color values?
This is, of course, a non-issue when reducing via a min or max operation.
Hmmm… In the case of color, you could find the average color of the geometry vertex based on the angles of the edges from the color verts. But for mapping, the average might not be useful at all since it might end up in a UVW that is not on any of the face, or even represented anywhere on the surface at all. But if the mapping isn’t broken up, like in the case of an XYZ->UVW, then it would probably work fine. But I guess you won’t have multiple texture verts in those cases either. Yeah, in the cases where you have a 1:1 mapping, meaning no seams, then it should be fine.
I should point out that unlike with particles, you could search on a mesh based on Euclidean or geodesic distances. It would be cool to be able to get the weighted average positions of the vertices that are a certain distance away along the surface.
Someone mentioned the lack of loops to be a reason you couldn’t do a Relax, but I’m not seeing where you could figure out any connectivity in Genome. Like how would each vertex know what the edge connected vertices indexes were?
I have actually encountered the need for this twice now I would imagine things like average position and normal would be most used and easiest to gather. Would be a great addition
Excepting the lack of loop unrolling, you could do things like average yourself if you could GET the neighbors. I can’t figure out how you have one vertex get the vertices that it shares a face with?
Actually, could FaceQuery add 3 more output channels, V1, V2, V3 as int32? Can’t think of how you would go the other way, like having a VertexQuery output the face indices that it touches, since that could be any number.
I’m reluctant to expose connectivity information because I would prefer to have Genome expose these sort of operations as reductions over a vertex 1-ring or over incident faces, etc. Like a sum of values of neighboring vertices that are weighted by inverse edge length. I’d love to have suggestions for what sort of things you want to accomplish and see how we could turn those into specific algorithms.
Excepting things that have already been done (like the fact that barycentric coordinates are used in places) I’m trying to avoid making Genome assume that we are working on triangles at all. We would prefer to have a Genome modifier work just as effectively on polygons as on faces.
Perhaps you need an array datatype for these types of issues?
So FaceQuery outputs an array of int32’s of unknown length, but you have special operators that can deal with it and return either another array (so you can combine or split the arrays) or another datatype by reducing the value down (like average, min, count, etc).
The problem is all the specific use cases I can think of involve some other constraint, like you’d need loops or the ability to change the ratios of faces/vertices/TV’s… I’ll think more about it on the bus ride…
My ideas primarily involved a sort of averaging all position with respect to their neighbors like a relax…but one where where I could control the relax direction…ie their normals or world z or whatever. Basically I was using the ray project and it worked great for the verts that were valid for the projection, but I wanted those invalid verts nearest the valid ones to average out and basically create a soft transition.
Then, I was using particles to push the mesh out and I wanted an average of nearest normals for the push direction.
Another idea involved creating a soft select sort of thing…
I use this functionality in both Krakatoa and Box3 periodically and I know I would use it in Genome if it were there