Blood Is Like A Salad 6/7/2013
Here is an exercise any animator should do at some point: Go to YouTube. Look up Blood Flow Animation. Try to find one that’s visually inspiring. It’s going to be hard, because they’re all about as interesting as bowls of lettuce calling themselves a salad. But ask any hematologist and they’ll tell you: blood is anything but boring.
In the jumble of animations that showed up in our little search, there’s probably a few that looked pretty good at first, and then got boring once you looked closer. Maybe they had white blood cells (if so, probably too many), maybe even platelets. But what about lipoproteins? Chylomicrons? What about blood albumin or any of the hundreds of other proteins that form a suspended silt in the plasma that we should be able to at least see hints of if the camera is really floating in that stuff?
I found only 2 sequences that were really great– maybe you can find them as well. Animating blood flow is a little bit like making a salad. Sure, a tube with red frisbees technically gets the message across, just like you can pour ranch dressing on a handful of lettuce and leave it at that. But a good salad is going to have different types of greens (red blood cells aren’t perfect toroids after all, they’re like big floppy pillows. Look up scanning electron micrographs of RBC’s sometime). Salads should have tomatoes and nuts and green onions and chunks of avocados and peppers and cheese and meat and eggs (unless you’re more of a tofu type), so many different things that any dressing you’d put on it would just get in the way of the flavor. How is your blood vessel lit? Like a spooky aquarium with light from above, or like a cave with light at the end? Or how about with the light attached to the camera, found-footage style, or illuminated entirely by brightly glowing lipoproteins, like fireflies? And the vessel walls, are the cells visible there? Did you make them red? You probably did. Why would you do that when erythrocytes don’t contain any heme?
The core message here is this: don’t cop-out. Just because a particular type of tissue has been animated before doesn’t mean you have to do it the same way everyone else has. I always tell my animators to put as much thought and detail as they can into the content of their blood flow, as long as it doesn’t obscure the message. That goes for every type of scientific animation. If you’re going to feed someone a salad, at least make it interesting.
No More Limits 12/6/2012
Every new studio has to build its infrastructure– when Cosmocyte first started we had 4 machines to use as a render farm, and they were all workstations. Now we have a large, dedicated farm with custom-built machines. But sometimes even our in-house farm can be bogged down, and when deadlines encroach, there’s always the potential for limited computational resources to force any company to cut corners on their render quality. However, thanks to Amazon’s Elastic Compute Cloud, we can rent time on the world’s 5th largest supercomputer whenever we want, and it’s cheaper than professional render farm services. MUCH cheaper.
This article takes you step-by-step through getting your own on-demand Cinema 4D render farm going. The primary disadvantage to this approach is that it takes time to set up and tear down whenever you want to render. The obvious advantage is that it also effectively removes render time as a production hurdle because you can conjure up as many net render clients as you like. I’ve used as many as 45 at once in the past, and I’m sure I’ll use even more in the future. This procedure may look daunting, but the first half of it is all just what you’ll do the first time. Once your virtual machine is set up, it should take about 15 minutes every time you want to start your farm.
Create an account at http://aws.amazon.com/console/
You’ll need credit card but they don’t charge you until you turn on a virtual machine. Have a working phone handy; they will have a zombie robot call you to make sure you’re not a zombie robot.
Choose your AMI (virtual machine disc image)
Got to aws.amazon.com/account/ (they will email you a direct link) and go to management console. Click on EC2.
On the left side of the screen is the navigation bar. Click Images>AMIs. This stands for “Amazon Machine Instances,” and you can either create your own machine and install all your own software by clicking “register new AMI” (if you use a different program from C4D), or you can use the instance we created that already has C4D, dropbox and chrome installed. In the search parameters, set viewing to “public images” and “windows” and in the search dialog type our instance name: ami-31ae2e58 (this usually takes a minute to load, there are a lot of instances for Amazon to sift through). This machine image has both r13 and r14 server and client, with no serial numbers or plugins, so you will need your own versions of all of that as well as a dropbox account to link to it.
Create your first virtual machine
Right click on the AMI. Click “request spot instance,” this will give you the best possible price for your virtual machine. You can select how many instances to launch at once, although your first configuration session will only require one. I like to set the instance type to M1 medium when I’m configuring, because (at the time of this writing) it’s ~3 cents per hour to use and pretty zippy. Later when I’m really rendering, I currently prefer the M2 high-memory quadruple extra large instance type. It’s fast, and with 68G RAM we’ve never overloaded it. At $0.28/hour at the time of this writing, it’s a steal and in my opinion gives excellent performance return on cost, although you’ll find your own balance point through experimentation. Whatever instance type you use, enter the max price you’re willing to pay for each of these instances (they don’t deviate much normally, if at all). Launch into a common availability zone– always launch instances into the same zone so they can communicate without incurring data transfer costs. Continue on through the next two bits until you reach Create Key Pair.
Security settings: Make sure you can access your virtual machine
Proceed without a key pair (you don’t need it because this is a temporary-use machine and you won’t come back to it later except to shut it down). Click create new security group. You only need to do this once. I call mine “render farm,” but you can call yours “Navy Seal-protected ultramax” or whatever you like. Where it says “create a new rule,” click the dialog (it says “custom TCP rule” by default) and set it to “all TCP,” then click “add rule.” Do it again, only this time set it to “All UDP.” Because “source” is set to all zeros for both of these, this will make it so that any machine anywhere can access this computer; you could simply add your own ip address into the source dialog and make it so that only your terminal can access the machines, but considering this computer will only exist during your render cycle it’s not necessary. You only need to do this step once, and then on future activations simply select “render farm” (or “Pete’s Super Secret Clubhouse” or whatever you’ve named your security group).
Wait for your virtual machine to be built
In the navigation panel, click Instances>spot requests to see the progress of your spot request being activated. This can sometimes take a few minutes. Click refresh every couple of minutes.
Once your spot request is activated, (or before if you want to wait while looking at an empty dialog) go to the navigation panel and click Instances>Instances. Your spot instances will appear on this list when they are ready and have undergone startup (it will say “2/2 checks passed” under “status checks” when it’s ready to use). Right click on the instances and click “connect”. Download the link to a folder you make just for this purpose– they’re pretty much single-use, and you’ll download a lot of these, so it’s handy to have them all go into the same place.
Open the links (just hit “yes”) and enter the password when prompted (we’ve set the password to be C4Dnode).
Customize your machine and save it to your account
Once you’ve entered in your serial data for the C4D server, connected your dropbox, set the wallpaper and any other configurations you wanted to make, right click the instance in “my instances” and click “create image (EBS AMI)”. This will save your very own copy so that you don’t have to re-enter all the information every time.
How many farm machines for a render?
That depends on how much time you have. Keep in mind that your render will cost pretty much the same no matter how many machines you’re running; 4 hours of render time on one machine is the same as 1 hour on 4, or 15 minutes on 16 and so on. If you’re going to be doing small test renders all day, you might just want a few instances so that there’s as little down-time for the clients as possible (you want them to be working the whole time they’re alive). If you’ve got a massive render that needs to be done quick for a huge deadline, make a lot of them to get it done on time, and keep adding more as you see you need them to get it done quicker. The one consideration is that every machine costs you from the moment it is initiated until the moment it is terminated. If you have a whole lot of virtual machines, be sure to watch your render carefully so that you can shut them all down the moment it’s done. Even $0.28/hour can add up with enough instances.
Start your farm machines
For each client machine you make, you’ll have to enter the IP address of your server machine– this means opening your server and getting the IP address, and then accessing every other instance and entering it into the C4D net render client network settings and restarting the C4D net render client. It’s a pain, but the unique ip address of your server machine changes every time you start up so with Cinema 4D this always must be done. In theory, you could enter the server’s IP address into the C4D network settings, take a snapshot of the AMI and then create instances of that machine– regardless of your approach, there’s no perfect way to do it (if you discover one, please tell us!). In case you’ve never built a C4D net render farm before, here’s how to get your server’s IP:
Click on start>run and enter “cmd” for the command line interface. In the command line interface, type ipconfig. Write down the Ipv4 number, and then type it into the network settings for all your client instances.
Get your render files onto the server
With Dropbox synced (use selective sync to only upload your files to be rendered), you simply drag and drop items you want to render (along with materials, illumination caches, etc.) into dropbox to get the files onto your server. Once they’re uploaded use the net render HTML dialog to upload. For the net render dialog, just like always, open chrome (within the server instance) and enter the server’s IPv4 address. We set up a “renders” folder on the desktop that is the access folder for all c4d renders. Drag rendered results from there to the dropbox folder to download. There is no cost to upload files– we uploaded over 20 gigs to build this machine– but downloading does have a cost. You can refer to Amazon’s price list here: http://aws.amazon.com/ec2/#pricing. Spoiler: downloading from your farm machines (or rather, uploading from your farm machines to dropbox so you can get it on your own machine’s dropbox folder) is free for the first Gigabyte and 12 cents/Gb after that.
Shut it all down when you’re done
In EC2 control panel, Right click on your instances and select “terminate”.
In the navigation panel, go to Elastic Block Store>volumes. Right click on EBS volumes, delete. Don’t forget to do this– they cost you money for as long as they exist!
When you’re all done and shut everything down, double check that you’re closed up by selecting EC2 Dashboard and looking at the “My Resources” panel. Ideally you’ll have no running instances, no EBS volumes, 2 security groups and 1EBS snapshot (if you saved a snapshot of your configured server/client virtual machine). This will cost around $1.20 per month to own and maintain the EBS snapshot, aside from whatever rendering you do.
One more thing:
The EC2 farm is an incredibly powerful tool for the small studio, students and individual artists, and I wish I had it around when I first started out. That being said, it has a couple of drawbacks:
- It is a net render, so the problems inherent to net rendering apply (bake everything, cache everything)
- A single instance on the EC2 is still distributed across multiple processors, hard drives and motherboards in its own computing cluster, so sequences like pyrocluster that must be rendered on a single machine will fail on the EC2 just as they would on any net render. If you find exceptions to this, please let me know!
For a video tutorial from Judd Pratt about how to set up the EC2 farm for 3D Studio Max, click here: http://www.judpratt.com/tutorials/ec2-renderfarm/
If you have any questions or run into any trouble with setting up the farm or accessing the C4D instance we’ve built, please email us at email@example.com. Otherwise, happy rendering!