Inquiry Details (Also a plan)

Hoi!

I’d like to write for a little bit about the kind of thing I want to do for my first inquiry of the year. Let’s start with a problem.

I like using Blender. It’s a pretty popular 3D modelling/video editing/node-based compositing/sculpting/animating software package with a killer feature: all of it is free and open source. My computer, however, doesn’t like using Blender. Rendering out projects takes an embarrassingly long amount of time. (I should point out that this is true of any 3D renderer on most computers)

So the solution seems pretty obvious to me – find/salvage/summon from the void/make a computer that can render out Blender projects like there’s no tomorrow. Now, I also want to do a public service to the school and make this computer’s frankly silly amount of power consumption massive rendering power available to the students that may be interested in it.

Let’s get our thinking caps on and figure out how we’re going to design this machine!

First of all, let’s quickly cover the hardware the we have to work with, and then get started on the software side. I happen to own an ethereum-mining computer, meant to generate the best cryptocurrency. It doesn’t work as well as it used to, and doesn’t really make a profit anymore, so it’s (financially speaking,) okay for me to use it in this project. The computer is kitted out with a basic 7th-generation i3 processor(I’ll update this later when I remember or find out what it actually is,) 4 AMD GPUs, 8GB of DDR3 RAM, and two (count ’em!) power supplies, one attached to the motherboard and two graphics cards, the other attached to a paperclip and two graphics cards. The GPUs are the real meat of this machine, we have one R390X available to us, two Sapphire(upd8 later) cards, and another (whose name will also be updated later.)

OpenCL support in both of Blender’s render engines is pretty experimental, so I think that the performance of this rig could be better with nVidia cards… but you work with what you’ve got. On the software side of things, I considered a couple of options for giving students access to the rig, and I’ll list two of the options that didn’t make the cut here:

  • Setting up a web e-mail address and checking it for messages with attachments every once in a while

I think that this is a bad idea because it requires writing custom software, for which I have absolutely no time given the close deadline of the project, and because it would be horrifically easy to screw up writing it and give random people on the internet the ability to run arbitrary code on the school network. So, not a good time.

  • Setting up a local web server that accepts file uploads

This would be fine if it didn’t require me to write more software… which, you guessed it, I’m not very fond of at all. Most of the problems with the previous idea are averted though, due to the local network restriction. I wrote up some code for this idea, but it kinda failed due to my lack of experience with writing any kind of web server applications.

Let’s move on to the winner:

  • Setting up a local [S]FTP server that requires a login and password to access.

Guess what, it’s absolutely perfect! Most of the files I’ll be writing to make this plan work are config files, [S]FTP is easy to set up on a Linux machine, and I’ll mostly be able to know exactly who is uploading what files. Plus, there are many friendly SFTP web-interfaces out there, and most everything that has a filesystem, has [S]FTP support.

So that’s the file transfer mechanism down, let’s see what we can do about actually rendering all of the files we’ll receive.

I think that, again, simple is best in this scenario, and that rolling my own software to deal with this is not at all perfect. So, I feel that a simple cron system would be quite easy to write up, and even easier to maintain. A cronjob would run every couple of minutes, checking for any new files, and rendering them out. Fortunately enough, blender itself comes with a command-line mode, which means that it should be very easy to do this. Once rendered, the files are removed, and the resulting image file should be rendered out to some public download-only [S]FTP directory. That can be done using blender’s command-line options.

Maybe I’ll draw a nice graph to describe this whole process later, but it’s quite simple, isn’t it?

To summarize:

  • I’d like to make a server on the school network that can render .blend files.
  • It should accept files from registered/authorized/whatever students via [S]FTP and maybe a web client
  • Every few minutes, a cronjob should render any new files in the “uploads” directory, delete them, and put the image file in a “downloads” directory

To be frank, I think that the most difficult part of this project will be setting up the drivers for the AMD graphics cards on Linux, and getting them to work with Blender.

Well, it’s been nice writing and I’ll see ya later.
-Stan

5 thoughts on “Inquiry Details (Also a plan)

  1. Out of interest, do you plan to set up separate SFTP accounts on the machine for each student who would be rendering content, or giving out access to communal accounts?

    • I don’t want to bother with individual accounts at all. I think I’ll set up a communal user with write-only access to a “dropbox” folder, and read-only access to an “output” folder. If people are being naughty with it (which I’m not counting on,) then I’ll think about individual accounts. The theme of this project, you may have noticed, is the minimization of all possible complicated setup. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *