Rhino6 Preview component grasshopper displaying geometry in render view

Hi,

Is it possible to show how to display geometry through c# component so that it would be visible in nice render view?

when I display something as meshes here it is only visible in shaded view:

public override void DrawViewportMeshes(IGH_PreviewArgs args)
{
foreach(Mesh m in Mesh1.AllData())
args.Display.DrawMeshShaded(m, new Rhino.Display.DisplayMaterial(Color.White));
}

Render Preview view will only show those elements that would actually be part of a rendered image. The only way for geometry to be included from Grasshopper in renderings is to use the Custom Display component.

Is that GH1 only? (I can’t find any such component by name in RH5/GH).

// Rolf

GH 0.9 had the component, but it didn’t include the Rendered functionality. The GH 1.0 version also has support for proper Rhino document materials.

Thank for a reply.

How curves are added to render view in rhino 6(not talking about grashopper)?

And why this is not possible via grasshopper?

Is that the Custom Preview? (since I find no Custom Display component in GH0.9).

// Rolf

Oops, yes. Custom Preview.

You can have a display pipeline which draws in Rendered viewports. Grasshopper used to do this until we decided that GH geometry ought to be usable directly in Render and Cycles (Raytraced) using existing materials without baking. This meant switching from Grasshopper taking an “I’ll draw everything myself” approach to a “here’s the geometry I’d like Rhino to include” approach.

1 Like