Software Vs Hardware Rendering

You don’t need specialized hardware to do ray tracing, but you want it.

Software-based ray tracing, of course, is decades old. And it looks great: movie makers have been using ray tracing for decades now.

In this case, it might be cheaper to get a hardware encoder, than to get a dedicated computer for streaming. A note on costs: remember that software encoders are resource intensive. If you’re serious about streaming, in the long run, it will likely cost less to run a hardware encoder. Studio vs on Location Streamers. On my desktop, the hardware encoding option is grayed out, forcing one to choose software. The render starts, but, its really slow. Like, to encode a 3 minute 1080 DNxHR file seems to take something like 45 theoretical hours. Software Rendering. Ideally, software rendering algorithms should be translatable directly to hardware. However, this is not possible because hardware and software rendering use two very different approaches: Software rendering holds the 3D scene to be rendered (or the relevant portions of it) in memory, and samples it pixel. Hardware or GPU rendering is, as you guessed using the graphical processing unit (aka Video Card) to render an image. The opposite is software rendering where the CPU is used. Software rendering is usually used as a fallback when there is no (suitable) GPU available.

But it’s now clear that specialized hardware — like the RT Cores built into NVIDIA’s Turing architecture — makes a huge difference if you’re doing ray tracing in real time. Games require real-time ray tracing.

Once considered the “holy grail” of graphics, real-time ray tracing brings the same techniques long used by movie makers to gamers and creators.

Thanks to a raft of new AAA games developers have introduced this year — and the introduction last year of NVIDIA GeForce RTX GPUs — this once wild idea is mainstream.

Millions are now firing up PCs that benefit from the RT Cores and Tensor Cores built into RTX. And they’re enjoying ray-tracing enhanced experiences many thought would be years, even decades, away.

Real-time ray tracing, however, is possible without dedicated hardware. That’s because — while ray tracing has been around since the 1970s — the real trend is much newer: GPU-accelerated ray tracing with dedicated cores.

The use of GPUs to accelerate ray-tracing algorithms gained fresh momentum last year with the introduction of Microsoft’s DirectX Raytracing (DXR) API. And that’s great news for gamers and creators.

Ray Tracing Isn’t New

So what is ray tracing? Look around you. The objects you’re seeing are illuminated by beams of light. Now follow the path of those beams backwards from your eye to the objects that light interacts with. That’s ray tracing.

It’s a technique first described by IBM’s Arthur Appel, in 1969, in “Some Techniques for Shading Machine Renderings of Solids.” Thanks to pioneers such as Turner Whitted, Lucasfilm’s Robert Cook, Thomas Porter and Loren Carpenter, CalTech’s Jim Kajiya, and a host of others, ray tracing is now the standard in the film and computer graphics industry for creating lifelike lighting and images.

However, until last year, almost all ray tracing was done offline. It’s very compute intensive. Even today, the effects you see at movie theaters require sprawling, CPU-equipped server farms. Gamers want to play interactive, real-time games. They won’t wait minutes or hours per frame.

GPUs, by contrast, can move much faster, thanks to the fact they rely on larger numbers of computing cores to get complex tasks done more quickly. And, traditionally, they’ve used another rendering technique, known as “rasterization,” to display three-dimensional objects on a two-dimensional screen.

With rasterization, objects on the screen are created from a mesh of virtual triangles, or polygons, that create 3D models of objects. In this virtual mesh, the corners of each triangle — known as vertices — intersect with the vertices of other triangles of different sizes and shapes. It’s fast and the results have gotten very good, even if it’s still not always as good as what ray tracing can do.

GPUs Take on Ray Tracing

But what if you used these GPUs — and their parallel processing capabilities — to accelerate ray tracing? This is where GPU-accelerated software ray tracing comes in. NVIDIA OptiX, introduced in 2009, targeted design professionals with GPU-accelerated ray tracing. Over the next decade, OptiX rode the steady advance in speed delivered by successive generations of NVIDIA GPUs.

By 2015, NVIDIA was demonstrating at SIGGRAPH how ray tracing could turn a CAD model into a photorealistic image — indistinguishable from a photograph — in seconds, speeding up the work of architects, product designers and graphic artists.

That approach — GPU-accelerated software ray tracing — was endorsed by Microsoft early last year, with the introduction of DXR, which enables full support of NVIDIA RTX ray-tracing software through Microsoft’s DXR API.

Delivering high-performance, real-time ray tracing required two innovations: dedicated ray-tracing hardware, RT Cores; and Tensor Cores for high-performance AI processing for advanced denoising, anti-aliasing and super resolution.

RT Cores accelerate ray tracing by speeding up the process of finding out where a ray intersects with the 3D geometry of a scene. These specialized cores accelerate a tree-based ray-tracing structure called a bounding volume hierarchy, or BVH, used to calculate where rays and the triangles that comprise a computer-generated image intersect.

Tensor Cores — first unveiled with NVIDIA’s Volta architecture aimed at enterprise and scientific computing in 2018 to accelerate AI algorithms — further accelerate graphically intense workloads. That’s through a special AI technique called NVIDIA DLSS, short for Deep Learning Super Sampling. RTX’s Tensor Cores make this possible.

Turing at Work

You can see how this works by comparing how quickly Turing and our previous generation Pascal architecture render a single frame of Metro Exodus.

On Turing, you can see several things happening. One is green, that’s our RT cores kicking in. As you can see, the same ray tracing done on Pascal GPU is done in one-fifth of the time on Turing.

Reinventing graphics, NVIDIA and our partners have been driving Turing to market through a stack of products that now range from the highest performance product, at $999, all the way down to an entry gamer, at $149. The RTX products, with RT Cores and Tensor Cores, start at $349.

Software

Broad Support

Software Vs Hardware Rendering Software

There’s no question that real-time ray tracing is the next generation of gaming.

Some of the most important ecosystem partners have announced their support and are now opening the floodgates for real-time ray tracing in games.

Inside of Microsoft’s DirectX 12 multimedia programming interfaces is a ray-tracing component they call DirectX Raytracing (DXR). So every PC, if enabled by the GPU, is capable of accelerated ray tracing.

Which Rendering Software Is The Best

At the Game Developers Conference in March, we turned on DXR-accelerated ray tracing on our Pascal and Turing GTX GPUs.

To be sure, earlier GPU architectures, such as Pascal, were designed to accelerate DirectX 12. So on this hardware, these calculations are performed on the programmable shader cores, a resource shared with many other graphics functions of the GPU.

So while your mileage will vary — since there are many ways ray tracing can be implemented — Turing will consistently perform better when playing games that make use of ray-tracing effects.

And that performance advantage on the most popular games is only going to grow.

EA’s AAA engine Frostbite, supports ray tracing. Unity and Unreal, which together power 90 percent of the world’s games, now support Microsoft’s DirectX ray tracing in the engine.

Collectively, that opens up an easy path for thousands and thousands of game developers to implement ray tracing in their games.

All told, NVIDIA’s engaged somewhere in excess of 100 developers who are working on ray-traced games.

To date we have millions of gamers who are gaming on RTX hardware, GPU-accelerated hardware with RT Cores.

And — thanks to ray tracing — that number is growing every week.

Learn about the key concepts of this technology in the on-demand webinar, Ray-Tracing Essentials.

home<<prevnext>>contents
Software Vs Hardware Rendering


Hardware vs. Software Rendering

Ideally, software rendering algorithms should be translatabledirectly to hardware. However, this is not possible becausehardware and software rendering use two very differentapproaches:

  • Software rendering holds the 3D scene to be rendered (or therelevant portions of it) in memory, and samples it pixel by pixelor subpixel by subpixel. In other words, the scene is static andalways present, but the renderer deals with one pixel or subpixelat a time.
  • Hardware rendering operates the opposite way. All pixels arepresent at all times, but rendering consists of considering thescene one triangle at a time, 'painting' each one into the framebuffer. The hardware has no notion of a scene; only a singletriangle is known at any one time.

Software is completely unconstrained, except by performanceconsiderations, and can perform any algorithm whatever. Thesubpixel loop method is chosen because it allows rendering nonlocaleffects that require considering different portions of the scene inorder to compute a single pixel or subpixel. For example,reflections require access to both the reflecting and the reflectedobject. A more complex example is global illumination, whichconsiders the indirect light from all surrounding objects tocompute the brightness of the subpixel being rendered. Hardware cando none of this because it only ever knows one triangle at a time,and has no notion of other objects.

Hardware rendering uses a limited range of workarounds toaddress some of these limitations. These workarounds typicallyinvolve pre-rendering objects into 'maps', which are rectangularpixel rectangles encoding properties of other objects and arestored in the graphics hardware in the form of texture images.While graphics hardware cannot deal with multiple objects, it candeal very efficiently with texture images. Examples for suchmapping techniques are:

  • Shadow mapping renders the scene from the viewpoint of eachlight source, recording only the depth of the frontmost object.This can later be used during final rendering to decide whether apoint is in shadow, if it is farther away from the light than therecorded depth. This approach does not work well for area lightsthat cast soft shadows (shadowswith fuzzy edges), and it cannot handle transparent objects such asstained glass or smoke.
  • Reflection maps render the scene from the viewpoint of amirror. This image is then 'pasted in' when the final render needsto know what is seen in the mirror. This works only for flat ornear-flat mirrors.
  • Environment maps contain a hemispherical or otherwise completeview of the surroundings as seen from the rendered scene. Nearbyobjects are not normally included. Although environment mapsrepresent the scene poorly, and cannot capture the arrangement ofnearby objects at reasonable computational cost, they areacceptable for highly curved reflectors such as chrome trims.

Workarounds like this have one difficulty: they require a lot ofmanual preparation and fine-tuning to work; for example, decidingon a good environment map. The computer cannot do this becausewhile computing a correct map is possible, it would be veryexpensive and easily defeat the expected time savings.

The driving force behind graphics hardware design is gaming,which involves rendering as many triangles per second as possibleto a video screen. Also, procedural shading is still quiteprimitive and requires workarounds as described above. This createssome limitations of hardware rendering:

  • Rendered images go to a video screen. Retrieving them to themain memory for further processing is often poorly optimized andslow. This can be the main factor limiting frame rates.
  • To achieve full speed, the entire renderer must be carefullyhand-crafted to the scene being rendered. This cannot be done for ageneral-purpose renderer.
  • Many effects beside the mapping workarounds described aboverequire rendering the scene multiple times because the complexityof the effect exceeds the capacity of the hardware. This is called'layering' and described in more detail below. This reduces theachievable frame rates.
  • Multiple frame buffers are unavailable. Rendering to video onlyrequires RGBA video with low bit depth and a depth (Z) buffer.General-purpose production rendering requires many frame bufferswith high bit depths.
  • Oversampling to reduce 'staircase' aliasing is generally slowand has poor quality. The subpixels computed are inaccessible; onlythe final pixel is available.
  • There is no good approach to motion blurring. This iscritically important for film production.
  • Textures must be stored in the video hardware before use. Theavailable memory is usually 256 or 512 MB. Film production oftenuses gigabytes of textures, which requires very slow paging.
  • Compatibility between the hardware from different vendors, andeven between successive hardware generations from the same vendor,is very poor. Although OpenGL hides many differences, the mostadvanced features and the fastest speed paths generally have notfound an abstraction in OpenGL yet. Hardware development cycles areextremely rapid.

Hardware Rendering Vs Software Rendering

None of this is mentioned in the literature and sales materialfor graphics hardware boards. In general, it is unrealistic toexpect to attain advertised realtime frame rates, often over 100frames per second, for general-purpose rendering without spendingthe years of custom development that game designers generallyrequire.

Yet, despite all the limitations of hardware rendering, thethings it can do are done at extremely high speed, sometimes morethan a thousand times faster than software. Harnessing this speedis the object of the hardware shading support in mental ray 3.3.Although the limitations make it impossible to simply switch fromsoftware to hardware rendering, much of the advantage can berealized with an appropriate combination of hardware rendering andsoftware rendering, combining hardware speed with softwareflexibility. This document describes how mental ray does this.

home<<prevnext>>contents

Software Vs Hardware Rendering Systems


Copyright © 1986-2007 by mental images GmbH