In order to make the next VR cartoon, I'm going to have to render nearly ten thousand 360-degree 16 megapixel images.
Which might be fine if it was mono-vision, but if you want stereo-vision you have to do tricky things with translation of the cameras for each pixel-column in the output image or you'd be cross-eyed when you turned around.
So what you have to do is: build a rig of about 60 1-pixel-wide cameras pointing at right-angles to each other and rotated x/4096th of a circle, and scan that rig over the time-frozen scene as they rotate to fill each of 30 columns in the output image [ https://github.com/revpriest/godotPanoRenderer ]
And the trouble with that, is it takes like two or three minutes per frame. So doing ten thousand of them takes two weeks or so.
Two weeks of render!? Not ideal. Some of the future cartoons are supposed to be topical and done in a weekend.
But what if you could just rent a hundred computers overnight from Amazon? Get them to do a hundred frames each.
Well you can indeed rent the machines, but can I install my software on it and run it on a computer that doesn't have a monitor plugged in and I can't see the windows?
Proof of concept is done: Yes I can!
We install the Nvida drivers, and then X11lib, and vulkan libs, then run startx in one console window, while in another I do the display-config by prefixing the launch of the built app with "DISPLAY=:0.0 " in another console.
A few changes to my code to allow it to accept command-line arguments telling it which frames to render, and my Godot app can run on a remote machine and save the rendered files to disk.
Next up is how to scale that, so I can run it on 100 spot machines overnight. They will need some sort of coordinator scripts I guess.
And the particle effects are going to be annoying since they are random, and will thus be different on each machine. Hopefully I can fix their seeds somehow.
But, the good news: I have successfully rendered an image on a remote amazon machine. Being able to do the render on many machines at once is not going to be a blocker.
The show will go on!
#godot #vr #gamedev #cartoon #renderFarm