I made a short example in OpenSCAD to change the color of the .stl file and the rotation so I could output the animation still frames:
![](https://infinityplays.com/content/images/2023/11/71-1.png)
Here is the code:
Path_to_STL_File="";
Path_to_DXF_File="";
/*[Animate]*/
STL= true;
DXF= false;
Rotate_x=0;//[-360:.01:360]
Rotate_y=0;//[-360:.01:360]
Rotate_z=360;//[-360:.01:360]
/*[Color]*/
red = 255;//[0:255]
green = 255;//[0:255]
blue = 0;//[0:255]
transparency = 1;//[0:.01:1]
module animate_stl(){
if (STL)
color([red/255,green/255,blue/255],transparency)
rotate([Rotate_x*$t,Rotate_y*$t,Rotate_z*$t])
import(Path_to_STL_File);
}
module animate_DXF(){
if (DXF)
color([red/255,green/255,blue/255],transparency)
rotate([Rotate_x*$t,Rotate_y*$t,Rotate_z*$t])
rotate([90,0,0])
linear_extrude(1,convexity=5)
import(Path_to_DXF_File);
}
animate_stl();
animate_DXF();
It helps to change the background in OpenSCAD to a solid color because it is going to be erased, I changed it to black and disabled the axes and scale markers:
![](https://infinityplays.com/content/images/2023/11/71-5.png)
I set the frames per second and steps to a low number just to try out a simple animation, then selected the dump pictures box and the pictures were saved to the folder where the OpenScad file resides:
![](https://infinityplays.com/content/images/2023/11/71-2.png)
Next I imported them into GIMP so I could remove the background:
![](https://infinityplays.com/content/images/2023/11/71-3.png)
I selected all of the files using shift and clicking on each one, then all files loaded into GIMP :
![](https://infinityplays.com/content/images/2023/11/71-4.png)
In Gimp I went to Select>By Color and selected the background. You'll notice I forgot to change the background color to black in OpenSCAD so I had to go back,change it and export the pictures again.
![](https://infinityplays.com/content/images/2023/11/71-6.png)
Now I can select the black back ground by color and press the delete key and it gets deleted.
Next I went to Layer>Transparency>Add Alpha Channel:
![](https://infinityplays.com/content/images/2023/11/71-7.png)
Then hit the delete key again and this leaves a transparent back ground:
![](https://infinityplays.com/content/images/2023/11/71-8.png)
I had to do this for each frame:
![](https://infinityplays.com/content/images/2023/11/71-9.png)
Now I can save the files and import them into my video editing software, here I am using OpenShot:
![](https://infinityplays.com/content/images/2023/11/71-10.png)
I won't go into detail on using OpenShot in this post, but I highly recommend giving it a try if you are new to making videos, it's really easy to learn and has excellent features.
![](https://cdn.openshot.org/static/img/logos/logo.png)
Here is a simple video I made with the infinity plays logo and the hub from the examples above:
and an animated gif:
![](https://infinityplays.com/content/images/2024/01/Test-Project-3.gif)