Skip to main content

Tech Focus: Low cost stereo 3D

Ninja Theory co-founder Mike Ball on Enslaved's 3D implementation

Enslaved's third person view helps somewhat and in terms of speedy integration, Ninja Theory actually saw the limited camera as a plus point.

"One of the strengths of the TriOviz system is the way that it automatically handles the cameras in your game by analysing the depth buffer and working out a good focal point for the stereoscopy," Mike Ball contends.

"In Enslaved the cameras were already placed so we were fortunate that we did not need to make any large scale modifications due to this system. Obviously if you want to get in there and have more fine detail control you can."

There are reprojections artifacts though, and they are all limited to the right eye view, making for a curious effect. They are especially noticeable in the cut-scenes where characters leap out from the screen.

The second issue concerns elements in the rendering process that are not found in the depth buffer.

"Transparencies are unfortunately problematic with the z-buffer analysis that TriOviz performs," Ball agrees.

"Either your alpha components write depth or they don't but they are always combined with the colour of the object behind. This has the unfortunate effect of either projecting the alpha texture over the geometry in the background or pulling the geometry behind the alpha to the same scene depth as the alpha plane. Either way just looks plain odd.

"The solution would be to render the alpha effects separately which would add additional rendering cost. Minimising the amount of alpha used in your scene will obviously reduce the amount of artifacting that you will get. Let's face it, minimising alpha coverage is always good."

Reprojection artifacts occur when the camera exposes detail not found in the base 2D image. With TriOviz, the errors crop up in the right-hand eye view. Here are a couple of HDMI 1.4 framebuffer dumps - notice the artifacts around the characters on the bottom images.

Implementation of stereoscopic 3D on Xbox 360 is also problematic due to the hardware not supporting HDMI 1.4. While the Microsoft console's HANA chip has been cajoled into outputting larger resolutions (such as 1080p), the stereo 3D 1280x1470 framebuffer employed by the PlayStation 3 appears to be beyond its capabilities.

In theory, 1080p resolution could be employed to give a 960x1080 output per eye in the side-by-side configuration. This would actually offer more resolution than the HDMI 1.4 spec and it would be compatible with 3DTVs, but on the minus side, after the image is processed by the 3DTV, pixels would be rectangular with a 2:1 aspect ratio. The solution employed right now is mostly to render at 720p, half resolution per eye, and this is one of the formats Enslaved employs.

"On Xbox 360 the left and right image are encoded into the same display buffer according to a use selected patter. This effectively halves the resolution in the process. The 3DTV is then responsible for extracting the left and right images from the single buffer according to the encoding used," explains Mike Ball.

"This is an option that the user needs to manually select through their TV's interface. There are a number of encoding formats available - checkerboarded, vertically or horizontally interlaced as well as side-by-side or top and bottom. 3DTVs generally support at least one of these modes so there is a little trial and error to get the correct setup. There is also the option to encode the display buffer utilising TriOviz's patented colour encoding that allows users without a 3DTV to experience the effect by wearing a pair of TriOviz glasses. Their special colour encoding actually preserves some of the original colour in the scene unlike other colour encoding schemes."

For the right games, and with the right implementation, it's clear that reprojection techniques - be they from TriOviz or generated by the developer itself - are an interesting solution for studios looking to get low-cost 3D. In the case of Enslaved on PS3, the performance deficit is noticeable, but some of this appears to be down to the use of v-sync. In the basic 2D version, the game drops v-sync when frame-rate dips below 30FPS, in common with most UE3 titles.

Performance analysis of the HDMI 1.4 enabled version of Enslaved 3D demonstrates a performance hit we don't see on the Xbox 360 SKU, but full 720p resolution is retained. Blue line indicates 2D performance, cyan represents 3D. Tear data applies to the 2D version only as v-sync is active on the HDMI 1.4 mode.

Sony says that the forthcoming SOCOM 4 runs at 30 frames per second in both 2D and 3D modes, while Crytek has made a number of claims about the reprojection techniques being used for Crysis 2 effectively offering zero-cost 3D. However, analysis of the Xbox 360 demo suggested that the developer was actually using a fixed pixel offset to create a diorama effect of three distinct 2D layers as opposed to any real attempt at stereoscopy. Improvements are being promised for the full game, out at the end of this month.

Ninja Theory's Mike Ball looks back positively on the integration of stereoscopic 3D into Enslaved.

"It was definitely an interesting experience for us. We were able to add an additional dimension to the game. The response from anyone who experienced the game in 3D was so good that it justified some of the teething pains we had with HDMI 1.4," he says.

"Overall though the 3D functionality provided by the TV manufacturers still feels very much like the wild west with many different competing technologies but overall TriOviz provided a solution that allowed us to target as many different TV types as possible with minimal code and art change to the product."

Read this next

Richard Leadbetter avatar
Richard Leadbetter: Rich has been a games journalist since the days of 16-bit and specialises in technical analysis. He's commonly known around Eurogamer as the Blacksmith of the Future.
Related topics