sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Export Animation w/Transparency

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    5 Posts 3 Posters 1.5k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • oceanembersO Offline
      oceanembers
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • F Offline
        faust07
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • jujuJ Offline
          juju
          last edited by

          @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=sceneExporter

          You 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.

          Save the Earth, it's the only planet with chocolate.

          1 Reply Last reply Reply Quote 0
          • F Offline
            faust07
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • F Offline
              faust07
              last edited by

              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 Wilson

              
              model = 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.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement