Grasshopper

algorithmic modeling for Rhino

The color information is present as a material - shows correctly in Rhino render mode. Is there a method to retrieve the color information at a location (i.e. vertex)? I tried saving the .OBJ with per vertex color. Importing still has the color as material, in this case there is per vertex color information but the values are always (255,255,255). 

There must be a way (it renders) but I have not found anything in either this forum or the discourse.

hope someone can help

Views: 1440

Replies to This Discussion

Grasshopper doesn't understand textures or materials or UV-mapping. So if that's how the data is stored, you either can't extract it or you need some plugin.

I was hoping to find how I might accomplish from python: is there a method from either rhinoscript or rhinocommon? Especially for rhinocommon I am only just beginning to find my way. 

You should be able to write a script to get the UV texture coordinates of the mesh vertices - and then map that back to the texture image being used. If you upload your OBJ (and associated materials/textures) I can try to write a sample.

Last week I stumbled across mention of "ComputeVertexColors" which seems to do the trick of loading the per vertex information. However, if you have time and know the incantation I would much like to know what the method of getting the texture mapping directly. The two files attached are (I believe) the complete .obj. (The .3dm with it imported is >5M so I cant upload)

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service