Can we tweak by script for Silhouette to be calculated by rules other than closed brep (for example by group, by block, by name)

for example the silhouette line shown in the image above is done in illustrator but possible to do in 3D via display mode and silhouette, but only after you BooleanUnion all the individual Brep into one giant Brep, which is nice but not ideal because it’s a irreversible and “destructive” process, while you usually rather the individual Brep stay individual so you can change through different design iterations and have the view silhouette update automatically. Is this possible through some tweak or maybe scripting so we can use a third parameter to control which Brep get grouped together and generate one silhouette to the current view? I know we can use MeshOutline but it does not work when you have two or three groups of Brep you want to generate silhouette and the lines generated from MeshOutline are actual lines and don’t hide/cut each other correctly if one is in front / behind another (see below).

I guess in summary I’m trying to see there is way through setting change and/or scripting to arrive at a very agile drawing production work-flow right inside Rhino. I’m already using Silhouette and display mode to generate quick images, but it falls short a little when the geometries are bit more complex like these while also requiring some flexibility.

Thank you!

1 Like

Would it be a too heavy operation to make a copy, hide the originals, then boolean, then display & print (and discard when done)?

// Rolf

Not tested but how about _ExtractRendermesh and _Join the result?

New Edit:
Actually this does not really work because it will make all the “sub-objects” one object and on the same layer, therefore only have one layer color and one material, which is not the ideal outcome comparing to the example I provided above. On the other hand, I just discovered that R6 now accept sub-surface material and perhaps color for polysurfaces? Maybe I can still do it if I can bake the copy brep with materials assigned to every sub-surfaces, and as along as BooleanUnion command will keep those material assignment afterwards then that’s one solution.

I guess that’s one way to do it, but that seems even harder to automate, and the worse about that is you don’t see the graphic live so you don’t have the immediate visual feedback when you are changing the design. I can theoretically write a script to include the copy, hide and boolean before a screenshot, but that seems more likely to break things than if it can be done from the display side alone.

Thnx I will look into those. Maybe I can have a grasshopper script running in the background reading layer geometries, hide the layer, extract and join and bake the mesh continuously as change comes in.Theoretically join mesh is less computational intense than join brep right?

Join mesh always works. Booleans on the other hand fail often. Join mesh is fast as well.

Tested and does not work, _Join Mesh must be different in a way to MeshBooleanUnion when it comes to Silhouette calculation, even if two meshes are joined their silhouette are still calculated different, while a booleanUnion brep or mesh will be calculated as one object.

Yes I see it doesn’t work, looking at the drawing in your first post it would indeed be nice to have this feature.

Currently make2D has something that comes close to what you want.

In fact what I would like if this idea gets hooked up for block items. That would make the most sense as blocks are treated as single entities, and therefore would benefit from having a single silhouette. @jeff?

I’ve been faking it by setting up my display mode as needed and then saving it out with a transparent background. From there it’s really easy to add a stroke fx in photoshop. It would be nice to keep in Rhino native but I’m going to end up changing the color mode and stuff in photoshop anyway.

can you elaborate a little on your workflow okeating?
The current work-around I can think of:

  1. if it’s simple with no complex sub-object color, use advanced Rhino display with Silhouette and _ViewCapturetoFile
  2. make copy > boolean union > print/ViewCapture with Silhouette
  3. make2D > AI > boolean union > lineweight (similar workflow in Photoshop)
  4. if it’s simple then one can just draw over the geometry with a heavy stroke

thank you

There is also the potential to use _MeshOutline, but it’s really tricky because it’s actual lines and I can’t really think of an easy way to achieve foreground/background and let the lines cut each other nicely in an automated way, do you draw rays from camera location to sample points inside the curve region and cross check to see if the ray get blocked by any other curve region? That seems computationally intensive. Plus actual lines require actual layers to stay on, tricky to update automatically, require baking, etc. I guess you can get away that by using custom display in grasshopper, Human plugin let you control lineweight for example.

I’ve also recently found out about sub-surface being able to be assigned materials individually, see this post, but seems to have a lot of limitations right now. I still don’t like it being destructive, but at least easier to automate, as long as material assignment stay put after _Join and _BooleanUnion, right now they don’t.

  1. Assign materials
  2. Select display mode. I’m using the simple bright display mode for this.
  3. Screen capture with transparency
  4. Add a stoke FX in (141.6 KB)

I’ve attached the photoshop file. The nice part about the stroke fx is you don’t need to manually draw anything.

1 Like