I have a mesh that records some integer information for its vertices. I expect this information to be quite sparse, with possible large variations.

How could I visualize this on a colorscheme (e.g. green to red)?

I can set the colors of the vertices according to their value and simply linearly interpolate the color along the face, but it might be the case where I have one point of large value in a dense region of the mesh, and that won't get rendered (or it would be a very small red point in a green region).

I was thinking of a Gaussian smoothing over those values, but no idea how to apply this on a mesh.

  • $\begingroup$ Have you considered weighting the vertices so that the interpolation is skewed towards the higher values? $\endgroup$ Commented Jul 24, 2019 at 21:08
  • $\begingroup$ @PixelArtDragon Not sure I got what you mean, but the interpolation is done within a triangle. Since the triangles can be extremely small (detailed mesh), I'll get one tiny patch colored. $\endgroup$
    – Paul92
    Commented Jul 24, 2019 at 21:41
  • $\begingroup$ Ah, I think I misread the first time. Is it possible to render to a much higher resolution and then apply some smoothing using another step? Also, given the large variation, maybe when storing the values use a logarithmic scale? $\endgroup$ Commented Jul 24, 2019 at 22:24
  • $\begingroup$ Storing the values is not a problem. Let's imagine a more concrete example. In a room scene, with a lot of triangles, there is something very interesting in a table corner. I get this as a value associated with the vertex. I can draw with a texture based on this value, but the problem is that only the exact corner will be highlighted (due to small triangles). I'd like to highlight a quarter of the table, to be easier to see. This is a qualitative visualization, for human inspection, so the exact location is not really important. $\endgroup$
    – Paul92
    Commented Jul 24, 2019 at 22:31


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.