Live Video Stream Input

Just for fun…

I’ve worked through @john_pierson 's example, using colours from an image at specific points and to override the colour of elements in Revit.

I believe it could be possible to take this idea further and essentially use a video or live stream to continuously override the colour of the revit elements.

Perhaps a possible approach is to have a Dynamo script run through a series of still images, or potentially base it on one image, which is continuously being overwritten and Dynamo keeps refreshing the script?

Thanks in advance!

The ‘hack-around’ methods of reading a series of image files or overwriting an image file and refreshing are certainly doable now. Look into the DateTime.Now, DateTime.Components, and Periodic run mode, and think about how you could get an image from a list of images and you should be well on your way.

For reading a video things are a bit more complex as there isn’t a ‘read video’ node out there, and video formats are very complex due to the nature of their encoding.

The other potential roadblock I see is speed. Reading an image is a time consuming process in Dynamo. Working with the data even more so. As such I have found that usually a 1 or even 2 second delay in the periodic run is best. You can then capture the output from Revit by saving out images or using a tool like Screen2Gif.

Thanks @JacobSmall. That gives me something to get started with :+1:

I’ve done this before by separating the video into its frames with something like VLC.

I can’t find the exact graph at the moment, but here is a GIF I hade made (It seems to show all the logic).

Utility.FaderOneWay is from the package Firefly and the graph was set to run on periodic at 100ms.

4 Likes

Thank you @john_pierson!!! :clap:

1 Like

Nice script. Well done :clap:

This was the last place on Earth where I thought I could be rickrolled.

But hey, “You know the rules and so do I”. :man_dancing:

2 Likes

A rainy lunchtime, so got a minute to take another stab at this. Not a live stream, but GIF frames in the end.
Thanks for the inspiration @john_pierson… Went for BoJo instead of Rick for this one…


4 Likes