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.
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.
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?
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:
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.
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.
Hi all! I think I found a workaround for this, building on what Bcd2130 did. I couldn’t find a Rhino command to trigger an Enscape screenshot but if you trigger the “Shift + F11” keys (which is the Enscape shortcut to screenshot) it works. You can do this in Grasshopper with a short python script (from here). I never used python before but even I could make sense of it! I just replaced Alt + Tab with Shift + F11 + Enter (to save the image).
Couple of notes: 1.) while the animation is running you might not be able to do anything else on the computer because the save image dialog keeps popping up.
2.) Experimentally I allowed a 3 second interval between each screenshot…otherwise it seemed to fail…but that might actually have been due to the autosave command interrupting or something else.
I realise the script as I had it was constantly triggering Shift + F11 keys without any proper interval so now I updated it to do so every 6 seconds (3 seconds to allow the scene to update and 3 to take the screenshot). 220413_GrasshoppertoEnscapeBridge_Adapted.gh (17.8 KB)
hi @mclovin4552,
i got your gh script running. it does the enscape screenshot very well, but the bongo animation is not running. may be i did something wrong…
would be great if you could show a video here how you work with your gh file and bongo
thank a lot!