Gradient mesh render

Hello. Please tell me how can I bake a relief with a gradient and then render it in twinmotion, enscape. I saw this feature in the human plugin but couldn’t find a solution for the mesh.


1.gh (99.0 KB)

Are you just trying to get the heightfield texture or the geometry?

If the texture only, You can skip the bake all together and use the custom preview component in GH, make sure everything else is turned off except the heightfield mesh and then export your viewport at the desired resolution and square crop the result in an image editor.

Then create a plane the same size as your overall heightfield, map the exported texture onto it with planar,srf,box map or whatever in Rhino Object Material Properties and you have a flat plane with your heightfield texture on it.

If you are trying to render the mesh itself and don’t need the heightfield texture then just bake your heightfield mesh from GH to Rhino and render it in Enscape or Twinmotion.

Or lastly, if you are trying to render the mesh WITH the heightfield coloration on it then bake the mesh to Rhino, apply the earlier step (exporting the heightfield texture/creating a material for it) and then apply the material to your baked mesh in Rhino, select the mesh and under Texture Mapping choose “Custom Object” as the type, select your flat plane with the texture mapped onto it and hit enter. You can then delete the plane. Alternatively here you can probably just apply the material to the heightfield mesh and choose planar mapping in this case but either way…

Another option is to bake the mesh to Rhino, go to top view->shaded, turn of mesh wires in Display Properties->shaded and run the Rhino command ShowZBuffer. This will essentially give you the same result as the output GH mesh (in this case, not all cases)

1 Like

Render Mesh Colors.ghuser (7.7 KB)

This cluster takes a colored mesh and saves out a bitmap and outputs a mesh for baking. The bitmap will map automatically to the baked out mesh when set on a material.

Please explain what and where to connect. I also found another script with an explanation, it worked well. preserve colors of baked mesh when exporting - Grasshopper

Input mesh, file path and then trigger to save out bitmap. bake out the mesh on the right.

This will save a square bitmap to wherever you specify that will look like something like this.

Use that image as a bitmap in any material for the baked out mesh.

1 Like