Review Index:
Feedback

Ray Tracing in Games: A Story from The Other Side

Author: Jacco Bikker
Manufacturer: General
Tagged:

Ray tracing's impact on visual art

Start your engines

At the start of both projects, a lot was unknown. During its development, the ray tracer was tested using a limited set of scenes, but none of these scenes were representative of actual game art. Scenes that explicitly make use of ray tracing features are hard to come by: Art is created either for offline rendering - and thus extremely complex - or real-time rendering, and thus lacking use of reflection and refraction. What we are striving for is scenery with typical game-level complexity, and subtle, yet relevant use of reflection, refraction, complex shadows and lighting.

The visual artists had to start with these somewhat vague guidelines. On top of that, they worked with an ever evolving engine that did not have a fully worked-out asset pipeline. Simple questions by the visual artists, like how many polygons can be used, and how many lights, are hard to answer. We simply had to try.

Trevor (designer, Let there be Light): “After a demo of the Arauna engine I was pretty much sold. I expected to be able to use huge amounts of textures and triangles. And, we would have no problems using reflectivity, shadows, and dynamic light.”

Jan (designer, Outbound): “I was used to building game levels using 20k triangles. The idea of building scenery using 1M triangles is something completely different. You have far more freedom in the use of detail. I definitely expected to create scenes that would be impossible using a rasterizer.”


Rutger (programmer, Outbound): “We knew the frame rate was going to be low, but we wanted to work with future technology and already gain experience with ray tracing. With reflection, refraction and perfect shadows we knew that great graphics were possible, instead of faked and wrong looking versions in rasterized games.”

For both projects, a considerable amount of time was spent on preparing tools. The Outbound team added a scripting language, and integrated a physics and audio engine. The Let there be Light team worked on a lighting tool to make an artists life a little easier. Still, at the end of the project, the lack of proper tools was the biggest complaint.



Screenshot from Let There Be Light- Click to Enlarge



Screenshot from Let There Be Light- Click to Enlarge

 

 

Design goals

In the past, there have been some experiments with real-time ray traced games. The most well-known project is probably Daniel Pohl’s port of Quake IV, which however does not include actual game play. Another project is Oasen, which is based on the OpenRT ray tracer. This game requires a cluster of PC’s for interactive frame rates, and is not publicly available. A version of Quake 2, rendered using real-time ray tracing, was shown by Carsten Wächter and Alexander Keller, during the Breakpoint 2005 demo party, running on a single laptop.

The aim of both Outbound and Let there be Light is to build games for consumer PC’s, using original art, and to release these for free, as ‘proof of concept’ games, showing what can be achieved right now. Let there be Light is designed to be playable on any dual core machine; fluent frame rates are achieved on a high-end consumer PC with a quad-core CPU. Rendering is done using the CPU alone; the performance of the GPU is therefore not relevant. In terms of graphical features, both games use anti-aliasing, normal mapping, bilinear filtered textures, reflection, refraction, emissive materials and a HDR rendering pipeline.

Impact on visual art

One of the reasons for starting projects based on ray tracing was the expectation that a ray tracer would require a different kind of art than a rasterizer, with different performance characteristics. In case ray tracing takes off in the near future, hands-on experience is valuable for students. This proved to be quite correct.

Karim: “A possible problem we all looked up against was a possible limited amount of lights and polygons, however, in the end it turned out otherwise; the polycount and amount of lights we were allowed to utilize was quite high.”

One thing that is different in a ray tracer is the relative insensitivity to polygonal detail. Outbound uses a scene consisting of more than one million triangles. The factor that really determines performance is the amount of screen space occupied by very detailed objects: It’s generally better to have a small, highly detailed object, than an even distribution of detail. The Let there be Light team designed low-poly scenery with some clustered detail. This resulted in very good frame rates. The Outbound team opted for unrestricted, detailed environments.

Matthijs (programmer, Outbound): “Ray tracing allows for a much more detailed world due to the ability to render insane amounts of static geometry, which allows for previously impossible designs to be implemented. Our product in the end featured more polygons then you would expect from a rasterizer in one level.”

Roel (programmer, Let there be Light): “At one point, we took one scene from the game, and replicated it 50 times. Then, we put a camera in one room, with all other copies invisible. The frame rate was simply the same as without the extra copies.”

In a ray tracer, materials that require extra rays (reflections, refractions, basically everything that you want a ray tracer for in the first place) must be used with care: Large, complex reflecting objects that reflect complex scenery really drag down performance. We learned that the more ‘interesting’ objects generally should be placed in a relatively simple environment to counter this.

Light sources (or rather, shadows) also require extra rays. Arauna uses a custom lighting model, with a limited sphere of influence for each light. That way, a level may contain hundreds of light sources, as long as the overlap of light sources is kept to a minimum. And, if the shadows for a particular light source are of little importance, they can be disabled, making the light source effectively ‘free’.

Normal mapping is used heavily in both games. The reason is simple: In Arauna, the performance cost of normal mapping is virtually zero. In practice, representing some detail using normal maps instead of extra polygons actually improves performance.



Art under construction: Let there be Light: Roman Era - Click to Enlarge



Art under construction: Let there be Light: Game World Overview - Click to Enlarge

Getting a feel for what it is that makes a scene slow or fast in a ray tracer is a worthwhile experience. Designers learned (often by trial and error) that a reflective ceiling is a performance killer. Detail is OK, but not if it covers the entire screen. High resolution textures don’t hurt at all. Normal mapping should be used liberally. Dynamic lights should be used everywhere, but preferably, they should not overlap. Most designers found this experience somewhat painful, but all of them managed to deliver good art at the end of the project.

Wussie: “Performance does suffer when you have large reflecting surfaces. One scene in Outbound has a reflective ceiling in an already pretty complex area. That particular room is very heavy on the machine. We really need more performance so we can build a more ‘complete’ product, with more design freedom.”

No comments posted yet.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote><p><br>
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.