Showing posts with label compositing. Show all posts
Showing posts with label compositing. Show all posts

Monday, August 06, 2012

CGI Workstations



Because I am a bit of a techie I often get the question what kind of workstation people should get to do their post production and CGI work on. In this article I look into what is useful and what is merely fluff. Since hardware specifications change regularly I will try to be as general as possible so hopefully this article will still be valid in years to come.

The machine

Any computer can be used to do graphics on but I am sure you will get frustrated quickly when things don't move along smoothly. Let's not kid ourselves though, machines get faster every year but scene complexity goes up as well. In the end you always need a good machine to do CGI.

CPU or processor

Let's start with the heart of the workstation. The CPU will take care of most calculations. A fast processor is great to have but there are some things to consider.
  • MHz vs cores: Multicore processors are quite common the last couple of years. These are great for multitasking but also for programs which are multithreaded. Most CGI software is multithreaded and uses more than one core at the time. Having a fast CPU with several MHz will help you along as well as it will execute a thread faster. To find the balance is a bit tricky but I always check these CPU benchmark reports. They give added performance of all cores in a processor. This way you can see if it is better to go for that high MHz quad core processor or for the lower MHz hexa core processor.
  • Price vs performance: Now that you have an idea how each processor performs you have to balance it with how much it costs. Most processor series have a sweet spot where you get the best performance for its price. It is usually a good idea to pick the one which performs a couple of steps better than the sweet spot one. Yes, it is more expensive but these are a bit more future proof. If you got unlimited funds you can pick the fastest one but keep in mind that these are only 20% to 30% faster but more than triple the price.
I am a fan of lot of cores since my main competence lies in lighting and rendering. It used to be that you had to buy a render license for each core but luckily those days are over. Buying a 12 core machine over a 8 core one could be beneficial if your post production software is really expensive.

I also like to suggest to take server rated processors like the Intel Xeon and the AMD Opteron series. They are a bit more expensive but have no trouble running 24/7.

Memory or RAM

Next up is memory. 3D, compositing and render software use tons of memory. The good part is that in comparison to processors memory is rather cheap. Don't skimp on it! I know it is easy to add in more but getting enough memory will help you a long way. It also allows to have multiple programs open at the same time. I often have Maya and Nuke open while rendering a scene in the background with Mental Ray.

When you run out of memory the workstation will start swapping memory to disk. This really grinds it to a halt as disks are death slow in comparison to RAM. Once it starts swapping you will pull your hair out of frustration and it can take literally minutes before your machine becomes responsive again.

So how much should you get you ask? As a rule of thumb take at least twice as much as the market puts in machines by default. For example most good performing machines have 8 GB of RAM at the time of release of this article. I suggest you put in 16 GB. Each year this number will go up so adjust accordingly.

Make sure to choose the right RAM for your motherboard. Some motherboards need the more expensive ECC memory.

Graphics Cards

Graphics cards are probably the most discussed items in a workstation. They are not only important to show your graphics on the screen but also have some calculation capabilities which gives a boost to the performance of the workstation.

  • Game card vs Professional card: This is one of the big questions. Should you get a cheaper good performing game card or a slower very expensive professional card. The reason there is so much discussion about it is that it is a difficult question to answer. Post production software usually claims they are only certified to work with professional cards. In practice we see that most game cards cope quite well though. If you build a dedicated workstation and are willing to spend the money then it might be worth to get the professional card. If you are on a limited budget and also like to use your machine for games, go for good processors first and get a good performance game card. NVIDIA has a document which promotes the Quadro series over their GeForce series for professional work. Look it up and see what is important to you.
  • NVIDIA or ATI (from AMD): The race to make the fastest graphics card is an ongoing process. NVIDIA has the Quadro series and ATI has the FirePro series for professional graphics. In my opinion NVIDIA is the clear winner here. They have developed the very popular CUDA which allows to run calculations on your graphics card which usually are done by the CPU. A lot of programs are already taking advantage of this. Even the game cards support this technology.
At the time of writing this article there is not much choice when you are using a Mac Pro as your workstation and want an NVIDIA card. Only the expensive Quadro 4000 is currently available. I hope this will change in the near future.

Motherboard

Since processors dictate what kind of technology you use, choosing a motherboard becomes slightly less important. Most of the time the hardware manufacturers won't even give you a real choice. If you go for server rated processors then you usually also get a server rated motherboard which is good enough.

Hard drives

Most computers have only one hard drive. If you work in a facility with a server then this one disk will be enough. It just needs to be big enough to store all your post production software. All created content will be stored on the server so multiple people can have easy access to it.

If you have a standalone workstation then it is a good idea to get two extra disks and put them into a RAID 0. This RAID disk will be used for all your data while your main disk will contain the operating system and the installed software. It will increase reading performance quite a bit. There is a caveat with this kind of setup though. Since data is divided over two disks the chance of a hard disk failure is doubled. Make sure to backup your data regularly, preferably onto an external disk (which can be a SAN).

Take server rated drives which run at 7200 rpm or faster. These are manufactured to run 24/7. Cheap green disks just don't have enough performance for this kind of work.

Sound card

Most motherboards have built in audio and if you are not making any music then this will do.

Mouse and keyboard

Just pick a keyboard you feel comfortable with but do pay some attention to the mouse. Most mice are too light and are not comfortable to work with. Keep in mind that the mouse is used a lot while creating graphics and getting Carpal tunnel syndrome because of a bad mouse will kill your VFX career rather quickly. A heavy mouse works more accurately. I use game mice with a good grip on which I can add little weights. Most post production software make heavily use of the middle mouse button. This is usually a scroll wheel so make sure it feels comfortable enough to be used as a button too.

Tablet and pen

This is a bit of an investment but I have a tablet since 2000 and I really can't mis it anymore. I don't use it for Maya but it is incredibly handy when editing, compositing and, last but actually really important, when doing Photoshop paintwork. It has a complete different feel than a mouse and it just works way faster for certain things.

Monitors

Depending on what you do you can get a cheap one (when modeling or animating) or an expensive one (when doing color critical work like painting or lighting). I suggest not to skimp too much on a good monitor. I only use 1920 by 1200 LCD panels nowadays. They have enough pixels to show all important screen assets and can handle full HD. If you do have color critical work make sure to get a monitor which can be calibrated. It will save you a lot of hassle later on. 

I worked for production companies who didn't bother too much to get good monitors and the result was that everything we produced looked different on each monitor. You can imagine that it can become quite frustrating when a director sees your image on his screen and tells you it is too dark or too red while on your own screen it is too light and too green. If you work together with other people and can't afford multiple good monitors, you need to pick a reference monitor on which everyone will judge the color fidelity of the entire project. This way everyone sees the same image with the same color balance.

Other Peripherals

Feel free to add in other peripherals that may ease up your life like a Blu-ray player or an old school floppy drive. Do check that they do not eat too much resources like CPU power and memory.

Conclusion

You might have noticed that building a dedicated workstation can cost quite a bit of money. Yes, it usually surpasses the price of a very expensive gaming rig. If you are a hobbyist it might be enough to use that gaming rig. If you are a professional trying to make money out of VFX work then you better go for a professional workstation. Having a decent system will accelerate your workflow and since time is money you can make the calculations yourself how much money you can save over time by making the the initial investment.

Tuesday, June 19, 2012

How we made Toilet Run



Toilet Run is Belgian Boomsticks' second production.


The idea

Queueing for a public toilet is something which happens to all of us now and then but is never pleasant when you need to go urgently. It gets worse when it is out of order and you need to find another one. What happens when it becomes a race to get there first but the path to it is full of obstacles?

Since all obstacles are in different locations we wanted to have something which tied it all together. Using the map with the animated heads was the ideal solution to avoid discontinuity in environments. All obstacles are merely accidents. We didn't want them to be induced by direct rivalry between the two characters.

Equipment

We used almost the same camera and sound equipment as with Agent Orange (check this link) but we did have some extra ropes en rigs to get over the ditch. The rope was a regular  climbing rope and we had an issue getting reasonable tension on it. Without tension Jef-Aram would get wet feet rather quickly. Luckily we had a Grigri with us, which helped us tighten the rope. We know that this is not the proper way of using a Grigri but it worked and that is all what matters when you need to shoot stuff in a couple of hours time.

Again we tried to use the GoPro to get some nice shots on the cables but  the shots didn't work that well. It is better to cut them out as bad shots would bring the quality down a lot. I guess we still need to train more on how to position the GoPro camera. The lack of a viewfinder just doesn't make it easy.

Music and Sound FX

We tapped again into our royalty free library of music and sound FX but this time we also added more of our own foley recordings. All cloth movement and some impacts were done by us. We noticed that when two objects collide you do not need one sound but two. Both objects have their own distinguished sound. The truck hitting Jef-Aram is a combination of a metal sound from the body of the truck and a human impact sound. This makes it much more dramatic.

Post Production

The first small bits to fix were the toilets. As a matter of fact those are not toilets at all but electricity booths. The first one was solved practically with the"out of order" messages. On the second one we painted out the voltage signs and added a toilet sign in After Effects.

A bit of more work was the map. We designed one big map in illustrator and colored it in Photoshop. The colored map was then taken into After Effects for the animation. In the end we showed only a fraction of the map in the clip. It was useful to draw the whole map as it gave us more continuity while editing.

The full map. Click to enlarge.

The biggest challenge in compositing was the truck hitting Jef-Aram. We first wanted to hit him with me driving a car but since all the obstacles were more things that just happened as accidents instead of direct rivalry, that seemed too violent. We decided to go for a truck instead of a car as the impact would be more dramatic. The problem was that we didn't know anybody at all who could drive us a truck. At first we were thinking of using an image of a truck but that idea was quickly ditched as we realized there is no perspective change on a translating image. So we jumped in the car and drove around an industry area where lots of trucks pass by. Most people are not too happy getting caught on camera so instead of filming a truck passing by we drove by a parked truck ourselves. This gives exactly the same result in perspective change. After some rotowork and color grading the truck fitted right in.

A still of the truck while driving past it. Just using a photo of a truck would never have the right perspective change while driving by.

The truck moves so fast that it was not even necessary to animate the wheels properly to make the effect convincing enough. Luckily for us the weather was the same as on the day of shooting the electricity booths. The cloudy sky provides soft shadows in both images.

What's next?

Jef-Aram and I are already working on our next short. Make sure to stay tuned. You can do this by following us on twitter or by subscribing to our YouTube channel.

Links:

Saturday, June 09, 2012

VFX Back to Basics Series: 8. What is compositing?



This is part of a series on the basic elements of Visual Effects. Each post will talk about a certain element which is one of the basic bricks used for building VFX shots.

In this eighth and final post in the Back to Basics Series I will talk about compositing.

A CGI image with a split trough the middle which shows color channels in the top part and the alpha channel in the bottom part. Alpha channels are the key to compositing.

Where all the previous posts talked about generating elements, this one will talk about combining these elements into a final image. For people who don't know the word compositing I always compare it to "Photoshop with moving images". We layer up different images and combine them into one with the illusion that the final image looks as if everything was filmed at the same time.

Back in the old days

Although digital compositing is a very powerful tool in filmmaking, compositing itself did start out as an analog process with the use of the optical printer. The first optical printers were created in the 1920's and were improved up till the 1980's. At first the effects were quite simple like a fade in or fade out but the effects became increasingly complex with the addition of things like matte paintings and blue screen effects. All these elements were combined by exposing the film several times.

This also explains the necessity of using mattes. If the film would be exposed twice it would create a double exposure unless the area where the second element needs to come is masked out. For blue or green screen shots these mattes were made with high contrast film and the use of a color filter to separate out the background color. In some other cases mattes were painted by hand which could result in chattering edges.

Films like 2001: A Space Odyssey and Star Wars had a staggering amount of success with this optical workflow.

The digital era

At the end of the 1980's digital compositing started to take over. It has two major improvements over its optical counterpart:

  • In the optical process it is necessary to create the several layers like the mattes by copying it from one film strip to another. Each copy degrades the image and adds extra noise to the result. In the digital realm a copy is 100% the same as the original (unless you resample or recompress them but that is usually not done).
  • The second problem is that film going trough a machine can drift a bit which could result in chattering mattes or halos. If done correctly digital compositing does never suffer from this.

When we need to composite for film a digital intermediate is created by scanning the film. When shot on digital cameras the source is already digital and does not need scanning.

Popular compositing packages today are Nuke, Digital Fusion and After Effects. The first two are node based packages while After Effects is a layer based package and works in a similar way as Photoshop does. Node based systems are represented by a flow chart where every node applies an operator to tree. Life action and CGI compositing do benefit more from this method while motion graphics are usually done in layer based packages.

A Nuke node based network.

Layered based compositing in After Effects.

Color and Alpha channels

Let's have a look at how compositing works in the digital realm. A digital image consists out of pixels which are represented by a combination of the three primary colors red, green and blue. This combination can create a broad amount of other colors available in the visible spectrum. Every color is stored in a channel.

In order to combine different images, it is necessary to have a fourth channel which is called the alpha or matte channel. It contains the transparency information of each pixel and this dictates how the result looks like when one image is put atop another image. It works just like its analog counterpart.

There are two ways to show an image with an alpha channel. The premultiplied one where the value of the alpha channel is already multiplied by the color values or the unpremultiplied one where the color values have their original values. This is very important to understand as failing to grasp this concept will possibly make composites look horrible with weird matte lines as a result. Check what your software package expects you to work with.

CGI images are usually premultiplied automatically when rendered.

A magnified CGI image. Look at the anti-aliased edges. This image is premultiplied.

The corresponding alpha channel image of the above image which has the same anti-aliased edges.

When unpremultiplied the edges become aliased.

The Extra's

Composting packages do not only put one image over another but have a vast set of tools available:

  • Rotoscope tools: With these it is possible to create mattes to isolate parts of the image. These include also operations to modify edges or to paint over existing imagery.
  • Retiming tools: All kinds of operators to manipulate the speed of the sequence.
  • Color correction tools: Operators to analyze and change the color of the image. Very useful to match foreground and background elements.
  • Filters: All kind of filters like blur, motion blur, noise, denoise and many more.
  • Keying tools: These are useful for matte extraction from images with blue or green screen but also other methods are available like luma keying.
  • Layering tools: from simple operators to put one image over another to operators for premultiplication.
  • Transformation tools: Operators such as translate, rotate, scale, resize and distortions.
  • Tracking tools: Tools to track objects in a scene or to stabilize a shot.

Although compositing is a 2D process, nowadays most packages support 3D environments. This adds extra functionality as it is possible to have proper parallax, use projections and makes the integration of particle systems really useful.

Another rather recent development is stereo conversion tools. It allows regular images to be converted to stereographic images. Note that I use the term stereographic instead of more common and commercial term 3D. Stereographic images are not truly 3D as the audience can not look behind objects by moving their head. I therefor prefer the term stereographic.


This concludes the eighth part of the VFX Back to Basics series.
Make sure to subscribe (at the top) or follow me on Twitter (check the link on the right) if you want to stay informed on the release of new posts.

6. What is lighting and rendering?
7. What is matte painting?

Thursday, April 12, 2012

How we made Agent Orange



Jef-Aram Van Gorp and I joined forces as the Belgian Boomsticks and we produced our first YouTube short. In this post I explain the how we made it all happen.


The Idea

Jef-Aram and I are fans of shorts like the ones made by Freddie Wong and Brandon Laatsch. They are low budget, have decent enough effects and have often great stories. 
Since making shorts is fun we decided to give it a go ourselves. Guns and action are always well received with the YouTube public but we wanted an original angle on this so Jef-Aram came up with the idea of using bananas as guns just like kids usually do. To extend this a bit we added the double barrel leek to the arsenal.

With the general theme being fruit and vegetables, sugar and salt was quickly added as the so called drugs as these are bad when eating them in big quantities.

We consider this a hobby project so we had only limited amount of time and resources to complete this next to our full time jobs.

Equipment on set

We both have some filming equipment so we threw everything together for this shoot.

Camera's:
  • Panasonic HVX 200
  • Nikon D7000
  • Canon 600D/T3i
  • GoPro Hero2
Sound:
  • Rode VideoMic Pro
  • Rode NTG2
  • Rode NTA2 (studio Mic for additional sounds)
and also some tripods and the Edelkrone Pocket Rig (Link to Edelkrone Pocket Rig review).

The HVX 200 is an older camera so it was the limiting factor resolution wise. 720P is more than enough for YouTube so we decided to stick to that. 
The biggest problem when shooting with different camera's is color balance. Every camera has it own characteristics so we had to solve this one in post production. We did make the mistake to shoot a bit overexposed. The H264 codec in the DSLR's is a lossy 8bit format and does limit the things you can do when color channels get clipped to their maximum value.

We left out any footage from the GoPro camera. Although we had some cool shots, the angle was so wide that even the shadow of the camera man filming with one of the other camera's was in view. Since we don't have a clip on LCD screen for the GoPro it was hard to estimate what we were shooting exactly. Something we need to prepare better next time around.

A screenshot from the GoPro. Although it looks cool it is useless because the shadow of the camera is visible in the lower left corner.

The microphones did give a good results. These are condenser microphones with a cardioid pattern which helps just getting the voice of the actor and not so much the environment. Luckily for us there was not too much wind that morning. It was -15 degrees Celsius though which made it hard to manipulate the small knobs on the cameras without our fingers freezing off.

Music and Sound FX

All music is royalty free. We bought these some time ago at a big discount. This is a good way to get cheap music which does not infringe on the youtube copyright rules.
The sound FX were free samples on the net. These were also royalty free. When you grab files from the web, make sure to check their license before using them.

Post Production

Post production consisted of cleaning up bits and pieces we didn't want to have in view after all, adding muzzle flashes, some smoke, a bullet hole in my head, a bit of blood and the orange disks which we use for the glasses of Agent Orange. The effects are quite rough but they'll do the trick when everything is moving fast.

Using compositing to clean up the plates is really powerful and it is not too hard to do. When something is just visible for a couple of frames it easy enough to copy the background from a couple of frames before. If the camera is handheld it is a bit trickier but nothing a tracker cannot solve.

The banana in the lower left corner came a bit too early into view when Agent Orange points it to my head.  It was easily repaired by taking a part of the wall two frames earlier.

The Muzzle flashes and dust clouds come from the Action Essentials 2 pack from Video Copilot. The pack is not to expensive but I am sure you can find free muzzle flashes on the web. Check if they got an alpha channel as it makes compositing them over your footage much easier. If they are against a black background it is easy enough to pull your own matte.

The blood spatter is just a paint splatter image we pulled from the web. We created a matte, gave it the right color and made it blurry. Since it sticks to the lens, there is no need to track it in.

Frame without the blood spatter.

Frame with the blood spatter and the hole in my head.

The more tricky effects are the ones you need to track over more than 10 frames. Both the oranges and the bullet hole in my head do move around. We started with a full 3D track but everything moves so much that it would become a nightmare to clean up the jumpy tracking points to get a solid track.
So we switched to the classic four point track instead. We let the computer do the track but every so often the computer got totally lost and you have to correct it manually. The perspective change was done by hand as it was just quicker to do this for a couple of frames then for the computer to try and figure it out.

Oranges fixed with gaffer tape to the glasses. Didn't look very cool so we had to replace them in post.

Oranges replaced by a clean image.



What's next?

Jef-Aram and I are already working on the second short. Make sure to stay tuned. You can do this by following us on twitter or by subscribing to our YouTube channel.

Links:
Belgian Boomsticks YouTube Channel
Jef-Aram's Blog

Frederic's Twitter Page
Jef-Aram's Twitter Page

Tuesday, January 17, 2012

VFX Back to Basics Series: 1. What is rotoscoping?


This is part of a series on the basic elements of Visual Effects. Each post will talk about a certain element which is one of the basic bricks used for building VFX shots.


In this first post of the series I will talk about rotoscoping.

I am sure that most of the artists out there have dealt with some form of roto work in their career. I usually have to do it when the shooting crew didn't put in the time to set up a proper green screen or when the client wants some modifications on the live action plates which weren't planned for. Removing and replacing commercials signs while people walk in front of them are a classic. The whole point of rotoscoping is to create a cut out image so the image can be split up in several layers.

Although rotoscoping is used differently today it is one of the oldest tricks of the trade. The technique was originally used by classic animators in which they traced over projected live action film to capture the motion of the actors or animals to produce life like animations. It was invented by Max Fleischer in 1915 and has been used in famous features like Disney's Snow White and the Seven Dwarfs and the Beatles animated film Yellow Submarine.

Later on the technique was used  to create mattes to cut out bits out of live action movies. The mattes  were used to create layers during the compositing stage, which was still done with an optical printer, so they could place elements behind the rotoscoped elements or they could add effects which only affected the rotoscoped elements themselves. The famous lightsabers of the Star Wars series is a perfect example of this latter technique. These mattes were still hand painted frame by frame. It did cost the artist quite some time to finish a shot and it was prone to chatter. Chatter can be perceived when de movement of the matte is slightly erratic and wobbles over the edges.

Nowadays we have computers to help us out. We usually start by placing roto curves at specific keyframes and the software will create the curve for the in between frames. The in between frames can then manually be adjusted to create accurate mattes. Quite a bit faster than doing it frame by frame and it reduces possible chatter. Another advantage is that you can feather the mattes to create softer edges and that will make it easier to create mattes for motion blurred or out of focus elements. Roto work can also be combined with tracking. This technique works extremely well when the rotoscoped elements are non deformable and it speeds up the process considerably.

Here is a small example to illustrate one way to use rotoscoping.


original image

A roto shape around the target

Matted out area

Rotoscoping is usually seen as a junior position before people move onto compositing jobs. Although it looks simple enough and not a huge amount of training is needed it can be tricky to create perfect mattes. The big companies have specific roto departments while the smaller ones have their compositors taking care of the work. Most compositing packages like Nuke, Fusion and After Effects have built in roto tools but there is also dedicated software like Silhouette FX and Mocha to take care of the job.

This concludes the first part of the VFX Back to Basics series.
Make sure to subscribe (at the top) or follow me on Twitter (check the link on the right) if you want to stay informed on the release of new posts.

In this series: