Combining Blender Animation with Sketchup in Studio

Created a nice video, document or a translation of another document? Share it here for licensed users.
DavePSB
Licensed User v1.5
Licensed User v1.5
Posts: 1291
Joined: Wed May 12, 2010 8:56 pm
Location: France
Has thanked: 13 times
Been thanked: 16 times

I've posted a video on YouTube that shows how to render an animation in Thea Studio that combines a base scene built in Sketchup with an animated (translating and mesh deforming) object created in Blender.

I'm not an expert with the Blender Plugin. A lot of this is the result of trial and error. If something is incorrect or should be added, let me know.

The video should be embedded at the end of this post, but if not, it is at

https://youtu.be/gm-F7xuJHoU


Here are the basic steps:


Short Version:

Assuming you are quite familiar with the SU and Blender plugins, the basic steps are:

Create a base scene in SU. Export to Thea. Tweak camera, lighting, etc. Save as .scn.thea.
Create and texture an animated object in Blender.
Under the Render tab, tick Thea Merge Scene. Select your base .scn.thea file and change Models to Name Collision - Replace
Under the Render tab, tick Thea Tools.
Select your animated object.
Under Thea Tools, click on Enable Animation Export and Enable Mesh Animation
Click Export Animation
Load the base .scn.thea file into Thea Studio
Open (name)_Camera.ipt.thea
Click OK
The animation renders.


Longer Version:

I recommend creating a unique project folder and keeping your SU, Blender, and Thea files there. You should also set your Blender output render directory to this project folder . A unique project folder is probably not really required, but I think it is much easier and, in my mind, eliminated a few pesky crashes that kept happening to me.

Create a base scene in Sketchup. In the example, this is composed of a floor with a box on it. This is the scene that the animated object will interact with.

Note that things will be easier if you stick to metric units in SU, Blender Units in Blender, and Thea Units in Thea. Again, this is not necessary, but tends to avoid scale problems down the line.

Export the SU scene to Thea Studio.

Make adjustments to this scene inside of Thea. You can, for example, set a different camera angle, change the lighting, change the render engine, number of samples, etc. . You should also think of some method to determine the coordinates of where you need to create your animated object in Blender. Since you will eventually be running a Thea script to render the animation, you won't have the opportunity to place the animated object from within Thea Studio. In the example, I want my animated object to slide across the top of the box, so I note that the box is 0.6M high and also where it is relative to the origin.

Save as a .scn.thea file.

In Blender, start a new file and make sure Thea Render is set as the renderer.

Immediately (if it were me) enter you project folder in the Render/Output box, tick Thea Physical Sky in the World tab, and save the blend file to your project folder . Don't use any weird characters or spaces in the filenames. Turning on the physical sky tends to avoid errors later, but will eventually be overridden by the settings in your base .scn.thea file.

Create your object and animate it. Be sure to assign a material to it.

Keep saving your work.

Note that in the final animation, lighting, camera angle, and render parameters will most likely have been set in the base .scn.thea file. In this example, camera angles and lighting that are set in the Sketchup and Blender files will be ignored.

Tick Thea Merge Scene under the Render tab. Tick Load Thea Scene First and select your base .scn.thea file. Note that the contents of this file are not being imported into Blender. The .scn.thea file is only for reference in the merge scripts that will be written when the animation is finally exported.

Leave all of the merge options as Keep Current - Throw Away New EXCEPT for Models, which must be changed to Name Collision - Replace.

Have you saved your work lately…

Tick Thea Tools under the Render tab and open the drop down panel.

I don't know what it does, but go ahead and click on the Enable Animation Export button.

If your mesh is deforming (like a fluid), you must select the object and Click on Enable Mesh Animation. You must do this for each object that is mesh deforming. I don't think you need to do it for objects that are only translating or rotating, and you probably shouldn't because it would cause extra mesh files to be written, one for each frame, and all those extra files would be essentially identical.

I usually tick (or it is ticked by default) Export Animation Data of Objects (not sure what this does).

I usually do not tick Export Every Animation Keyframe (not sure what it does either).

Save your work, and press Export Animation.

Start Thea Studio and open the .scn.thea base file.

From Thea Studio, Open the latest (name)_Camera.ipt.thea file. This is the script that the Export Animation button just created.

A message box should come up reporting the number of frames.

Click OK and your animation should start rendering in Thea. Note that the Animation tab in Thea does not seem to update (ie, the frame number does not increment), but the animation is indeed being rendered. The images will be in your project folder/~export/frames.

Hope this is helpful.

https://www.youtube.com/v/gm-F7xuJHoU[/youtube]
Win 10
i7-9700K,3.6GHz,32Gb,
RTX2060Super, 8Gb, 442.19
SUMake2015 (15.3.331)
TheaForSU (1.5.09.547.1462)
Thea Studio (1.5.09.1462)
SUMake 2017 (17.2.2555)
TheaForSU (2.2.954.1860)
Blender 2.79, Plugin 1.5.8.760.1455
Blender 2.8x
Revised 14 Feb 2020
User avatar
leminilab
Licensed User v1.5
Licensed User v1.5
Posts: 817
Joined: Sat Nov 14, 2009 6:41 pm
Location: Vitry-sur-Seine
Has thanked: 25 times
Been thanked: 23 times
Contact:

I just watched your tutorial: people like you reconcile me with mankind! :D
I can't thank you enough for the time you spent on this simple, yet eye-opening, piece of explanation. :thumbup:

As a complement, I think you could have exported your Sketchup model to Blender in order to place your cylinder accurately. The dae export option in Sketchup gives good result as long as the units are consistent. And the exported model are imported in their right place in Blender.

Some fiddles indeed to get the animation exported but it's 100% worth it to get the best of all these worlds! :)

Thank you!
Live every day as if it were your last and then some day you'll be right.
User avatar
nigec
Thea Beta Tester
Thea Beta Tester
Posts: 10524
Joined: Wed Jul 01, 2009 9:47 pm
Location: UK
Has thanked: 60 times
Been thanked: 52 times

nice tutorial Dave :thumbup:
"Life is what happens to you while you're busy making other plans."
My Gallery
User avatar
Frederik
Thea A Team
Thea A Team
Posts: 5581
Joined: Fri Jul 18, 2008 2:24 pm
Location: Denmark
Has thanked: 43 times
Been thanked: 100 times

Although I'm not using Blender, I'm grateful that you've made this and shared it with the Thea community...! :clap: :thumbup:
Thanks for doing this...! :thumbup:
Cheers
Kim Frederik

"If you have no critics you'll likely have no success..."
-Malcolm X
User avatar
leminilab
Licensed User v1.5
Licensed User v1.5
Posts: 817
Joined: Sat Nov 14, 2009 6:41 pm
Location: Vitry-sur-Seine
Has thanked: 25 times
Been thanked: 23 times
Contact:

That being said, I just failed at exporting my build modifier animation... :problem:
I think I need to watch again... :lol:
Live every day as if it were your last and then some day you'll be right.
DavePSB
Licensed User v1.5
Licensed User v1.5
Posts: 1291
Joined: Wed May 12, 2010 8:56 pm
Location: France
Has thanked: 13 times
Been thanked: 16 times

leminilab wrote: I just failed at exporting my build modifier animation
Sorry to hear that. What are the symptoms? I must say I had a number of crashes along the way and never really pinned down what was causing them. Other times, the mesh animated but wouldn't translate, and so it goes.
Win 10
i7-9700K,3.6GHz,32Gb,
RTX2060Super, 8Gb, 442.19
SUMake2015 (15.3.331)
TheaForSU (1.5.09.547.1462)
Thea Studio (1.5.09.1462)
SUMake 2017 (17.2.2555)
TheaForSU (2.2.954.1860)
Blender 2.79, Plugin 1.5.8.760.1455
Blender 2.8x
Revised 14 Feb 2020
User avatar
yglemarec
Licensed User v1.5
Licensed User v1.5
Posts: 292
Joined: Thu Sep 15, 2011 3:59 pm
Location: paris (france)
Has thanked: 0
Been thanked: 0

i agree with leminilab and frederik
thanks a lot for sharing your tut !!!
:thumbup: :thumbup: :thumbup:
"no pen , no gain ! "
User avatar
leminilab
Licensed User v1.5
Licensed User v1.5
Posts: 817
Joined: Sat Nov 14, 2009 6:41 pm
Location: Vitry-sur-Seine
Has thanked: 25 times
Been thanked: 23 times
Contact:

DavePSB wrote:Sorry to hear that. What are the symptoms? I must say I had a number of crashes along the way and never really pinned down what was causing them. Other times, the mesh animated but wouldn't translate, and so it goes.
Well I had to move on and ended rendering it at a lower resolution in Cycles. the mesh would export but the build animation did not show up... I will try again though!

I have noticed the Material Id pass did not render either... I should find it in the same folder as the renders, shouldn't I? :think:
Live every day as if it were your last and then some day you'll be right.
DavePSB
Licensed User v1.5
Licensed User v1.5
Posts: 1291
Joined: Wed May 12, 2010 8:56 pm
Location: France
Has thanked: 13 times
Been thanked: 16 times

Well, at least you tried. I will try to render an animated beveled curve again (it worked for me) just to see if there is something odd going on. But, yes, must eventually move on. Rumor has it an updated version of the plug-in is being worked on, so that might make everything easier...

I think the Material ID pass should be in a folder called material_id in the ~export/frames folder. I don't use it. Mine is empty, but I think there are boxes to tick in the Blender Plugin (and/or Thea) to nominate what passes you want. But I would think that if you set up your base scene in Thea and ticked the desired passes there (under Channels), it should have written them out.
Win 10
i7-9700K,3.6GHz,32Gb,
RTX2060Super, 8Gb, 442.19
SUMake2015 (15.3.331)
TheaForSU (1.5.09.547.1462)
Thea Studio (1.5.09.1462)
SUMake 2017 (17.2.2555)
TheaForSU (2.2.954.1860)
Blender 2.79, Plugin 1.5.8.760.1455
Blender 2.8x
Revised 14 Feb 2020
DavePSB
Licensed User v1.5
Licensed User v1.5
Posts: 1291
Joined: Wed May 12, 2010 8:56 pm
Location: France
Has thanked: 13 times
Been thanked: 16 times

@liminilab

Just to follow up...

I tried again and was able to export an animated curve bevel (with Build modifier) to Thea Studio and render it there.

I am still curious about why your attempt failed (like maybe my tutorial missed something). I think perhaps your curves are a bit more complicated than mine in that there are four of them and I notice that the "tail" of each glowing curve fades out as the "head" progresses forward (I don't know how you did that but it is a nice effect).

I was going to ask for a cut-down non-proprietary version of the .blend of one of your curves so I could see if I could get the export working. However, I know the beta testers are already working with updated versions of the plugin, and grzybu suggests maybe curves will be supported in the next release. Therefore, I suppose we might as well wait until the next release when hopefully my tutorial will become obsolete.
Win 10
i7-9700K,3.6GHz,32Gb,
RTX2060Super, 8Gb, 442.19
SUMake2015 (15.3.331)
TheaForSU (1.5.09.547.1462)
Thea Studio (1.5.09.1462)
SUMake 2017 (17.2.2555)
TheaForSU (2.2.954.1860)
Blender 2.79, Plugin 1.5.8.760.1455
Blender 2.8x
Revised 14 Feb 2020
Post Reply

Return to “Tutorials & Translations”