Hi,
I am trying to extract RGB colours from the viewport view. At the moment, the only I find is to export the viewport to a image file on the hard drive and reload it into an Image. Is there a way to load an image in the Grasshopper cache directly as shown in the viewport without having to go through the export to file/hard drive:
VIEWPORT VIEW > GRASSHOPPER [img] > Other GH operations
Hi
Capture viewport as image in cache is surely programmable.
There is no native component
Is loading from cache necessarily ?
What speaks against loading image from hard disk ?
Thank you Kahled, this is exactly what I was looking for. It works like a charm except for when the viewport is rendered (using Raytraced) which is the main point of my exercise. Is there a specific reason for it?
Very grateful for your help!
Hi Khaled Sighier,
The code you very kindly shared works very well with any view type apart from the RayTraced view. I cannot find any help on google to associate GetView with Raytraced. Would you have an idea how I can resolved this?
Many thanks in advance.
Thomas
I don’t think if this possible because in Rhino if you use Capture to file this create a new render,
maybe Grasshopper capture the first passe, but the developers know more about this
In panel, part two represents filename “!” Between filename and extension render start time is added (for better file identification only)
Set extension
Activate viewport for rendering
Change viewport mode for preview, e.g Raytraced with low count passes.
‘!’ Main function If True raytraced render starts (e.g. with higher passes)
Loads gives path of last raytraced image
Loads image with Bitmap+ component and can be edited, layer, filter and other and can be
saved ‘!’ This is only a millionth fraction of the possibilities for automation.
Check this to capture different display modes include raytraced but it is not a final render,
i don’t know if it is possible to add more settings for this mode