Hello everyone, I met a problem with the 3D View of Human UI.
I’d like to link a gradient tool to the 3D View tool to get a color gradient of temperature on my 3D Graph (like the one I got in Rhino), I tried many combinations but impossible to get that gradient, the color of the 3D solid stay in a unique color.
Anyone knows if it’s possible to do that color gradient thing on Human UI? And if yes, how?
Searching desperatly for the answer …!
What I want :
What I did :
What I got :
This is possible, but not exactly straightforward. The viewport library I use in Human UI does not (as far as I know) support per-vertex coloring the way rhino does. The (somewhat involved) workaround is as follows:
- Create a bitmap from your gradient
- Map the bitmap to your mesh’s texture vertices (in this particular case since the Z-height of the graph appears to correspond to the same measure as the coloration does, this might be quite simple)
- use “Set 3d View Textured” and pass it the texture-mapped mesh and the created texture.
Attached is a definition that demonstrates this process. Included is a custom script to extract a gradient to a bitmap. It will also require Human to assign the mesh vertex texture coordinates. You can see they won’t look exactly the same because the viewport meshes are shaded.
Download the example here:
Mesh Vertex Coloring in HUI.gh (19.0 KB)
It works great ! Thank you very much for your help, I couldn’t find the solution without this.
How could I make the viewport mesh unshaded?
I can’t get the part where you get the gradient as a bitmap to work? It says it’s missing a reference ?
I only downloaded your GH, so hasn’t changed anything. Would be massive help to get this to work.
Could it be that I’m on Rhino 7 that is the problem?
@andheum Could you maybe update the script? something with the imports broke and Im not sure how to fix it