I’m trying to subdivide/refine a mesh, and I want the colors of the new faces to reflect an interpolation of the vertex colors from the original mesh.
something like this although a more pixalated version is also fine
I started under the assumption that the component “MSmooth” could do this, but it didn’t—and here I am, down the rabbit hole!
I’ve worked with a AI-assistent to create a Python script to attempt this. While I’ve made progress, I ran into several challenges:
-
Vertex color assignment: Ensuring vertex colors are properly interpolated and applied.
-
Handling face indices: Errors or inconsistencies when accessing or mapping the subdivided mesh to the original.
-
Has anyone worked on a similar problem and found a better, faster, or smarter approach to refine a mesh while handling color interpolation effectively?
Another method i tried, based upon averaging colors of nearest vertices. Although i assumed this would look better, it’s more like a blur effect with the original resolution and when i try it on the refined mesh (matching the vertex and color count), the order is mismatched
example_2.gh (124.9 KB)
For context: I’m using Ladybug to run an analysis with a certain grid resolution. To create a ‘cleaner visual representation’ for presentation purposes, I’d like to refine/subdivide this mesh. Directly increasing the grid resolution itself significantly increases computation time to get the same result (i need to run many analysis).
Any tips, examples, or resources for correctly implementing color interpolation on meshes or managing this workflow efficiently would be greatly appreciated. Thank you in advance!