Grasshopper to Enscape Bridge - A Novel Approach

Hello all.

I’ve been trying to put together a grasshopper definition that can take geometry inside grasshopper and display it inside Enscape. The ultimate purpose of this is to create rendered animations. I’m halfway there and feel like this is a useful and sorely needed feature. As far as I can tell, no other thread on this forum has addressed this problem, so hopefully someone a bit smarter than me can help bring this across the finish line.

Right now this feature is not supported natively by Enscape - despite being requested multiple times for years they haven’t made any progress. My script (included below) is a [crude] way to bake geometry into Rhino (which Enscape can recognize) and then automatically delete previous geometry. In the included definition, the geometry is just a cube and the slider simply moves it over in the X axis. This is meant to be a test definition only. For something this simple a hacky solution actually already exists with Bongo + Enscape: Script help needed - #27 by Jarek

I want use grasshopper geometry directly however - this will allow alterations to the geometry itself (i.e. object morphs shape) as well as parametric choreography of objects (i.e. complex movement of a multitude of geometries that would be time consuming to keyframe individually).

The idea is to have Enscape render a screenshot each time a slider in grasshopper alters the scene, save that picture to file, and repeat until the end of the slider. Please take a look at the definition below which is annotated to describe how it works and what is missing.

220413_GrasshoppertoEnscapeBridge.gh (21.0 KB)

Essentially, it requires a way to communicate with Enscape and to save the frame to file, either through a command prompt in Rhino, or a move clever way I haven’t thought of. The frames then can be turned into an animation in Photoshop or After Effects.

I’m also having the same issue, it seems the Rhino command for enscape “take screenshot” has been disabled. I’m curious if anyone has found a work-around.

At the very least, something like this; Enscape Scipting (python rhinoscript) - #4 by samuel.n.sweeney

Maybe use the built in Enscape macro for saving a render. Lunchbox has a component for sending commands to the rhino command line so you could get away without scripting. Rhino Command - LunchBox - Component for Grasshopper | Grasshopper Docs

1 Like

This approach used to work, but in newer versions of enscape, there isn’t a command for “takeScreenshot” from the command line. Am I missing something?

My apologies, you are correct.

No worries, are there any workarounds that you know of?

Patt: Yes, if you’d take a look at the script I attached to the first post (220413_GrasshoppertoEnscapeBridge.gh (21.0 KB)) - it is listening for changes to the model (for example moving a cube over on the X axis) - once this happens it sends a command prompt to Rhino through the lunchbox component you’re referencing. 2 problems persist however:

  1. Enscape doesnt seem to work with the same “takescreenshot” as command it had in the past (as you can see from the script I provided, its repeatedly sending the command to Rhino, but nothing happens). This means a work around of some kinds is needed to direct Enscape to take a screenshot when a new frame occurs.
  2. There needs to be a way to name and save the screenshot to file automatically.

I’ve read through the post you attached as well and it doesnt seem to have a solution to this problem?

The post (Script help needed - #27 by Jarek) I attached in the first post has a html file that works with Bongo and (i think) would provide a solution to this problem. Im just not a programmer and don’t understand how I could use the work thats been done there to modify it to work for grasshopper.

My apologies for bumping if this is not allowed. Hopefully someone can help me in this issue?