Grasshopper

algorithmic modeling for Rhino

Hello All. I wonder if there is any way to save a slider animation as PNG with TRANSPARENT BACKGROUND? If not any idea how could I get this?
Cheers,
Rod

Views: 3672

Replies to This Discussion

hi kVVV,

I don't know if Rhino can export viewport contents with alpha channel. But what you could do is run the animation twice, once with colours, once with only black geometry and a white background. You can then use that second pass and apply it as an alpha using some sort of pixel post-processing.

Pretty involved, but I don't see another way soon or indeed at all.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks David. Yes, pretty involved, but it should work. I will try it.
Cheers
Rod

I've found a relatively painless way to do this... green-screen technique

1. set viewport bg to green=255

2. run animation export.

3. photoshop define an action like this:

3a. open file

3b. right click bg layer, click layer from bg

3c. select color range (greens)

3d. delete

3e. save as

4. photoshop automate batch with that action.

that should give you all the sequential images w/ transparent background. 

of course, if you have a lot of green in your image, you'll need to pick a different color for replacement...

Using photoshop to automate and using David's "alpha channel" method might produce a better result? I'm thinking anti-alias edges here...

Rhino 5 can capture with transparent background. So this method is neccessary for Rhino 4 only.

Has anyone found a more elegant solution for this? It would still be nice to be able to automate generation of png files with a transparent background.

Currently there is no support for transparent background in viewport capture in RhinoCommon. Only ViewportCaptureToBitmap is exposed, which doesn't return transparent bitmaps. (see here)

For now you could script the ViewportCaptureToFile command.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service