- Home /
Painting regions of a mesh segmentation in editor
Hi,
I'm building a mesh segmentation tool (C#) in Unity editor.
I managed to do properly the segmentation but now I have to visualize the segmentation regions in the editor.
Now I'm using Handles to painting triangles of the regions :
But it isn't fast enough and it paints too the rear portion of the object, relative to the user view, and I don't want this, it doesn't do a proper visualization.
How can I fix these problems ? What can I use to visualize properly the regions ? Handles ? Textures ? ...
Thanks for your answers !
Answer by robusto · Jun 12, 2014 at 08:17 AM
vertex colors, which is part of Mesh, which is part of the Meshfilter component of the gameobject. There are many ways to do this, you can use the highlighter class to see if the rect and vertices (transform the verts to screen space using scene view camera and loop through the verts). Another more tedious way is to use gizmos and set them at each vert and set colors to the gizmos which set them to the corresponding vert.
Thanks for your answer.
I finally used vertex colors to paint segmented regions.
Your answer
Follow this Question
Related Questions
How would you go about 'painting' images onto terrain 0 Answers
Editor Script Handles.Label problem. Labels don't move with gameobject 1 Answer
Initialising List array for use in a custom Editor 1 Answer
Prevent gameobject from losing focus when clicking on handle in editor 0 Answers
Editor Windows : Help required 1 Answer