Extracting rendermesh with bump texture

I’m looking for a way to extract the mesh I see when I use a displacement pattern. In this case I have applied a displacement to a prep and it shows correctly in Rhino. But when I get the rendermesh, I just get a simple mesh ignoring the displacement. I know the mesh exists somewhere, because I can see it! But how can I possibly extract it?

I have used

rhobj = Rhino.RhinoDoc.ActiveDoc.Objects.FindId(ID)
a = Rhino.DocObjects.RhinoObject.GetMeshes(rhobj, Rhino.Geometry.MeshType.Render)

Extract RenderMesh.3dm (2.3 MB)
GetRenderMesh.gh (7.8 KB)

Hi @Timo_Harboe_Nielsen, you might use the RenderMeshes method since Rhino 8.

If you’re doing this with GH, test with low displacement settings, especially if flags are set to DisableCaching (it will regenerate the displacement) before.

_
c.

Thanks a lot clement.
I think this could be the way forward but I gave up a little on these here:

ViewportInfo vp,
List<InstanceObject> ancestry,
ref Flags flags,
PlugIn plugin,
DisplayPipelineAttributes attrs

I would love to see an example of how this can be done.

Hi @Timo_Harboe_Nielsen, try this with your file: GetRenderMesh.gh (8.1 KB)

let me know if it works on mac, i’ve tested on windows.
_
c.

1 Like

This works beautifully – also on Mac. Thank you so much! Exactly what I was after.

1 Like