Grasshopper

algorithmic modeling for Rhino

I can't seem to figure out how to shade a single mesh face in a solid color. I have tried exploding my mesh and sending the faces to Preview, but it doesn't accept them as a Geometry.  Is there any way to draw each mesh face a different color rather than gradients between points?  I need to do this to show the slopes of individual mesh faces (based on normals).

 

Thanks.

 

Attached file shows the three different ways methods I've tried to color my mesh with (some work, but only make gradients).

 

 

Views: 4140

Attachments:

Replies to This Discussion

By applying colors to the vertices of a mesh face, the face will get painted with a blend of those colors.  So, to give the face a solid color, give the all of the vertices the same color.  UTO's mesh edit components can break out a mesh's faces into individual meshes which makes it a bit easier to apply the same color to all of the verticies of a mesh.  Decomposing a mesh will give you verticies, normals at those verticies, faces*, and vertex colors if they have any.  A mesh face is actually a data type that stores the indices of the points which make up the face.  The index corresponds to the list of verticies for the entire mesh.  So a mesh face in GH is not really geometry, but really just information on which points make up the mesh face.  With UTO's component you can actually break up the faces to individual meshes.

I thought the normals where for the center of the mesh faces, not the vertices??

I assume faces are sharing vertices so I guess I would have trouble getting any solid colors on an undulating terrain.

I will check out UTOs tool.  Separate meshes seems like it might bog down, but its worth a try.

Thanks.

Meshes can have both Face normals and Vertex normals. If you want to assign unique solid colours to faces, you must unweld the entire mesh, so that the vertices are never shared amongst neighbouring faces.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Just figured that out!  Duh.  Though I don't fully understand how Vertex normals work.

My next question is now that I'm using Custom Preview to make this work, is there a way to bake this result?  I could bake a MeshCol, but I'm not sure how to bake my exploded multi-colored mesh.

Thanks,

 

Alex

Attachments:
If you want to bake it, use the mesh>primitive>mesh coloUrs component to assign the color to the mesh verticies.  The result will bake with the color you have applied.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service