algorithmic modeling for Rhino
hello, i'm having issues with colored mesh baked out of grasshopper.
I bake the GH object and get a colored mesh (not a texture, right??), let's say a gradient.
Then i switch the viewport to 'rendered', or render it, and it displays the right colors.
When i try to export my model to another format, as obj or 3ds for instance (i want to upload the colored mesh on a website which doesnt accept 3dm) i get just a blank geometry.
question: HOW TO PRESERVE MESH COLORS WHEN EXPORTING? or relative workarounds
Maybe someone can help with this? thanx
They were some discussions on the subject.
The colors in the render and viewport capture don't seem to match. Are you sure it's working for you?
hi Kim. can u explain how it worked for you.
im trying the script however i can not make work for me.
what file should i save the material as?(you wrote pgn file??) and how to upload it to keyshot.
It doesn't save a material, it saves a texture. Yes, as a PNG image.
In Keyshot you have to create a new material and assign that texture, usually as the (diffuse) color of the material, or you can assign it to any other material property, like reflectance, etc.
I translated Vicente's script into Python and added a flag that makes it automatically write the OBJ file.
Update: this version doesn’t strip alphas from colors: if the vertex colors have alpha component, so will the texture PNG.
It also outputs the mesh with the texture map and with vertex colors stripped. This last because it doesn’t really make sense to have both sources of color active, but if you don’t want to strip the colors then comment out m.VertexColors.Clear().
And if you want a baked mesh that has a material with the texture map, comment out rs.DeleteObject at the end.