Italy
Joined: Jun 13, 2023
Post Count: 1
Status:
Offline
Headless Video Rendering
Hi everybody, And thanks first of all for this excellent software.
I have used it proficiently in the past month to prepare a 3D model of my new home. Just brilliant.
I wanted to produce a high-quality (exceptionally long) video using the nice yafaray renderer, but quickly noticed that it would take forever on my laptop. I honestly didn't want to burn my second fan.
So I decided to attempt a headless video renderer program to run the rendering on one of my 48-core HPC machines. This wasn't as easy as expected, but you can find the source code repository here. I hope it can be of any help to somebody.
In line with the Console Photo Generator approach, the program is taking the camera path from the SH3D file. So, you can prepare a path using the "Video" window, save it, and run it on your server in headless mode. The SH3D file format is just clever for this stuff.
I am not particularly happy with the code quality, but much of the noise is related to the quality of the JMF library (), which cannot consistently make a difference between the GUI and the processing part. With some class overriding, running in AWT headless mode was possible.
I didn't test the codebase thoroughly, though: only a couple of samples from the SH3D website and my massive model. Should you find any problem, open an issue on GitHub. Also, I tested it only on Linux. Due to a lack of time, I couldn't run it on my Windows and Mac OS machines. I may try to check that in the future if there is some interest.
Thanks for this great program, I hope my small contribution may benefit someone.
PS: the next step could be to drop in MPI and support clusters to render high-quality videos, but the code should need some refactoring at the data source level. I am not sure I will ever find the time for that, but if anyone is interested, I may spend a couple of days on this.
Program W x H Frame FPS Time Time / Frame ------------ ---------- ----- --- ----------- ------------
Create Video 320 x 240 166 25 4 min 10 s 1.5 s
PVR 2.6.2 320 x 240 135 25 6 min 34 s 2.9 s
Headless VR 320 x 240 111 25 2 min 36 s 1.4 s
Headless VR 640 x 480 111 25 12 min 27 s 6.7 s
Headless VR 1280 x 960 111 25 39 min 18 s 21.2 s
Good thing about this program:
1. Create 9:16 video format (e.g --width=450 --height=800). This format not available in Create Video and PVR. Hope Puybaret and Enko Nyito can consider that.
2. Reduce number of frame to render (e.g --speed=8/16/32). Very useful if you need to move the camera quickly for a relatively long distance such as 100 meter.
If you don't mind, I would like to request the following:
1. Add option to choose SunFlow.
2. Add option to create 3D video with Quality 1.
Lastly, a big THANK YOU to Puybaret for developing this excellent program.
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: Headless Video Rendering
Thanks for your feedback
It's not possible to create a video at the two first quality levels in headless mode under Linux if your computer doesn't run a X11 display.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator