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.
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.