Export Animation w/Transparency
-
So I'm using export animation with no scene transitions to quickly save out the images in a project which has about 100 scenes across 15 models.
I'd like to give the images transparent backgrounds, but export animation doesn't have the option. Going through and exporting 2D one-by-one isn't worth the the time it takes, especially when I may have to revise models. Has anybody found a good way to get around this?
-
Since I thought I could also realize my own wish - animations as line style representations with transparent background to overlay them with rendered animations - I combined 2 plugins.
Thomthom's tt_export.rbz and Rick Wilson's sceneExporter.rb have been turned into a scene exporter that outputs all animated scenes as one 2D PNG files with transparent background (tested under SketchUp 2016 Pro and 2017 Make).
Since I don't know if I'm violating copyright, I wanted to ask if I can post the modified plugin here?
The original posts with much usefull hints:
https://sketchucation.com/forums/viewtopic.php?f=323&t=30819&hilit=tt_export
https://sketchucation.com/forums/viewtopic.php?f=323&t=11173&hilit=sceneExporter -
@faust07 said:
Since I thought I could also realize my own wish - animations as line style representations with transparent background to overlay them with rendered animations - I combined 2 plugins.
Thomthom's tt_export.rbz and Rick Wilson's sceneExporter.rb have been turned into a scene exporter that outputs all animated scenes as one 2D PNG files with transparent background (tested under SketchUp 2016 Pro and 2017 Make).
Since I don't know if I'm violating copyright, I wanted to ask if I can post the modified plugin here?
The original posts with much usefull hints:
https://sketchucation.com/forums/viewtopic.php?f=323&t=30819&hilit=tt_export
https://sketchucation.com/forums/viewtopic.php?f=323&t=11173&hilit=sceneExporterYou would be violating copyright, I suggest you contact the original authors and discuss with them and sort it out before posting / circulating any work derivative of their own.
-
Yeah, that's what I thought. Spontaneous customization of existing plugins for your own purposes may go too far. Maybe I should only post the changed or used code snippets to disclose and discuss the interventions. Maybe oceanembers can make something out of it for himself.
-
Here is the reduced code to export scenes in one go as single images with transparent background. This is not a plugin.
Important: Disable Scene Transition, name scenes properly, switch off sky and floor in the SketchUp style used, include the scenes to be exported in the animation
Copy the code to the Ruby console and press Enter
The images end up in the directory where the model is stored.
Sources for code snippets: the above mentioned free plugins from Thomas Thomassen (thomthom) and Rick Wilsonmodel = Sketchup.active_model pages = model.pages original_page = pages.selected_page model.start_operation "ExportScenes" path = (model.path.sub(/.skp/," - ")) pages.each do |page| if page.name==page.label pname = path+(page.name.to_s)+".png" Sketchup.set_status_text("Writing #{pname}") pages.selected_page = page options = { ;filename => pname, ;width => 1920, ;height => 1080, ;antialias => true, ;compression => 0.9, ;transparent => true } model.active_view.write_image(options) end end pages.selected_page = original_page model.abort_operation
Unfortunately, the exporter does not work for my purpose, the export of hidden line stiles on a completely transparent viewport. For this I would have to be able to make a Color (White)transparent before exporting. But luckily there are video editing programs that can be used to overlay animations in different styles.
Advertisement