Ray Tracing - Game changer, Everything you need to know

What is Ray Tracing

Ray Tracing in computer graphics is newly adopted rendering technique by major graphics manufacturers



It's ability to simulate greater degree of realism with virtual objects is whats making the tech companies go gaga over it.

Ray Tracing will supersede ray casting, scanline rendering, Rasterization and Path Tracing which are still used to render high quality images and games.

Among the list rasterization is something which you will hear quite often.

In fact most of the 3D rendering technique still heavily depend on rasterization as one of the core rendering mechanisms.

Sounds like a mouthful doesn't it? It isn't actually.

Movies uses ray tracing

Just imagine how you see objects in real life. It's surprising that you don't see the objects themselves, but you see the light which falls on them.

That creates the illusion of you seeing the object, for example your mobile.

You don't see your phone but you see the light which falls on it and your puts it together giving you the feeling of the whole phone.

That pretty much explains why we cannot see in the dark, 'coz we perceive light, and there's no light in the dark.

For ex, look at the picture below, looks lifelike, 'coz it is.



Rotterdam Erasmus Bridge

You can easily differentiate a real photo with a software rendered one, ever wondered why?

It's because of the way light is rendered around the objects.

Look at the picture below, it appears software rendered.

why?

Because software's are not capable of rendering real life like images.



And that's the reason, games don't look natural but animated.

Moreover, textures, anti aliasing, and filters are currently used to make the rendered image look as close to reality as possible.

Proper global illumination is often what creates the difference.

The best known methods of doing global illumination are all based on tracing a lot of rays.

Physically correct reflection and refraction's are nice to have, but those aren't the only reasons to prefer ray tracing.

What Ray Tracing does is correctly render reflections giving images greater degree of realism required bring it close to reality.

When was ray tracing invented?

It's surprising that initial papers related to ray tracing was submitted alongside 1451.

But, Turner Whitted, is often credited as being the inventor of modern ray traced rendering

He was the one to write the groundbreaking paper An improved illumination model for shaded display.

And it was't until now, that it is gaining popularity among the masses.

Mind you, graphics companies were already using it in the popular animated movies you see (Pixar, remember).

The reason it's uncommon because it's computationally expensive and requires a lot of hardware resources.

That kind of resource is uncommon right now and will take some time before it actually takes off.

What is real-time Ray Tracing

Ray tracing was usually used in the CGI industry where the scenes are pre-embedded and won't change post production.

Real-time ray tracing is somewhat different.

Why you ask?

Because reflections and light falling on the object would be calculated dynamically and would change with scenes in real time.

For ex., in games, its not pre-decided how the player would move the character and in what direction.

So, that calls for real time ray tracing  based on players interaction with the game.

"Real time Ray tracing" is computed and rendered in real time based on changes in interaction with the object or scenes.

Ray Tracing in Computer graphics

What is the benefit of Ray Tracing

Pictures speaks louder than words.
Below image, NVIDIA Turing Brings Real-Time Ray Tracing to Epic Games Unreal Engine




Image Courtesy nVidia

This image is an perfect examples of what Ray Tracing is capable of.

These kind of images used to take up to 4-5 days to render using conventional Ray Tracing methods.

That virtually explains why Ray Tracing has not gone main stream yet.

But nVidia turing and RTX has changed everything.

Ray Tracing at its core revolutionizes interactive graphics that opens up many new opportunities for doing things that were impossible before.

Ray Tracing vs Path Tracing

Many people use the terms somewhat interchangeably, which lends to general confusion about what the differences are.

Simply put it, Path tracing is an evolution of classic Turner Whitted ray tracing.

Jim Kajiya is responsible of bringing Path Tracing into limelight in his 1986 paper, The Rendering Equation.

Path tracing is inspired from Whitted style ray tracing, but it can solve more complex lighting situations.

A bit of science

Path Tracers are capable of producing images which are almost as good a real photograph.
They are that good, but that ends there, they suffer greatly for everything else.
That's where Ray Tracers comes into picture. (heroic entry :p)
Ray tracers trace based on polygons and in fact (of course lighting and other aspects are there in consideration)

Ray Tracing Efficiency ∝ Number of Polygons in the Scene.
Which means, Ray Tracer takes linear time depending on the number of polygons required to compose the scene.
Ray Tracer output is mostly immune (not completely) to added light, transparency and other factors composing a scene.
That brings us to Path Tracer.

Path Tracing Efficiency ∝ Light + Transparency + Translucency + Shader
The major factor favoring Path Tracers is that they are immune to the number of polygons.
Whether 1 or 1 million, the rendering speed will very but not by huge margin.
Even with these benefits combined with the ability of producing excellent life like images they are still not well suited for anything else.
Again, why you ask?
Because it's not just the polygons which has to be taken into account.
There is lightning, transparency, etc. which are equally responsible saving a scene not looking like crap.

So Now you know how it works

These Path Tracer components when in amalgamation, become horrendously and painfully slow.

And now the obvious, you might have very well guessed by now that Path Tracers are comparatively slower than Ray Tracers in general.

In fact, even in very easy to render scenes Path  Tracers can be far off behind a Ray Tracer

That's because of the points mentioned above and the algorithmic differences.

That's not to say Ray Tracers are fast, they are slow too,  and require off the hook machinery to mimic the real world performance.

Fun Fact, the below video was developed by Epic Games, in collaboration with nVIDIA and ILMxLAB.

The video demonstrates what Ray Tracing has under it's sleeves for the gamer's.

Can you imagine, what it took to produce this? Continue reading after the video.

[embed]https://youtu.be/lMSuGoYcT3s[/embed]

To render this marvelous piece of art, nVidia used a $60,000 computer.

You can imagine what configuration such a system would possess and where the consumer grade PC stands today.

Imagine the horse power required for playing an entire game using this technology.

Ray Tracing vs Rasterization

Rasterization can be as close as a painting painted by a painter.

Although  rasterization can be very realistic but won't factor the real world reflections, refraction, caustics, radiosity, shadows and other fancy terms.

A little background

A little background subject knowledge helps in understanding how things are flowing.
If you don't, no worries, we have you covered.
At its most root level, video games or CGI renders graphics with the help of polygons (Triangle is also an Polygon)
Multiple polygons (in fact millions, depending on the scene) combine together to produce a scene/image.
Rasterization also uses the same mechanism and represents a 3D model using these mesh of triangles or polygons.
It can only draws objects, it doesn't track the light itself.
Rasterization can achieve Photo realism in post processing but it's not getting any passes for that eyegasm arena any time soon.
Whereas, Ray tracing models the real world behavior of light in a non-real scene (Movies, Games etc).
For every dot rendered, it tries to scope out the source and color of the light.

It will also take into account if the color of the light changed due to refraction from other object.

That accounts for Ray Tracing rendering an almost accurate representation of mirrors and refracting objects like glass.

That sounds complicated, and it is.

In fact it's tremendously computationally expensive and no consumer grade PC is capable of rendering these in real time.

*Extra Info: Rasterization aka. Painter's Algorithm or Depth Buffering, showcases linear rendering time per the number of triangles.

Rasterization is the current technology powering  today's modern Graphics.

Rasterization also works by rendering polygons (Triangles) which in sufficient quantities form a view able object.

For example, Multi polygons rendered simultaneously gives the illusion of smoke and similar other objects.

Look at the image below for a rough idea, of how polygons can blend for a smoother effect.



Modern day GPU's can draw up to 600 million polygons per second, so speed is not the limiting factor here.

Ray Tracing nVidia

First of all, a big hats off to both nVidia and AMD for even attempting to bring Ray Tracing grace to consumer Grade PC.

Well not the full implementation but a gist of it is enough to give you goosebumps while playing that favorite tile in 4K HDR.
nVidia launched the RTX graphics cards recently, and the term RTX itself touted as Ray Tracing Platform/interface.
Current crop of graphics card consisting of the Ray Tracing technology from nVidia are:
  • RTX 2080 & ti version,
  • RTX 2060,
  • RTX 2070
But its commendable for nVidia to even bring the price to around 600$ ~1500$.

Below video shows Project Sol A Real-Time Ray-Tracing Cinematic Scene Powered by nVidia RTX

[embed]https://www.youtube.com/watch?v=KJRZTkttgLw[/embed]

Ray Tracing AMD

Although AMD is lagging behind the RTX marathon, it's got some promising announcements which has geared the gamer's community with lots of hope.

AMD is working on it's next gen graphics card, the NAVI series.

As per latest report, Navi graphics cards will be unveiled in E3, 2019.

It's believed to provide games with nVidia 2070 (retailing ~700$) like performance at around 330$ which is going to be aweeeeeesome if true.

The speculated list of graphics cards to be launched by AMD (featuring the RTX technology)
  • RX 3080 & XT version,
  • RX 3070,
  • RX 3060

Does Pixar use ray tracing?

Short and simple answer is YES. 

Pixar has used Ray Tracing in the movie CARS to achieve the stunning visuals it has.

They have a proprietary 3D rendering software known as RenderMan (with Ray Tracing abilities).

Pixar uses this software for all their commercial projects (including CARS movie).

The good thing is that the software is commercially available to third parties as well.

Multi resolution geometry and texture caches combined with ray differentials are used to determine the accurate resolution of the scene.

Using the aforementioned technique the scene are ray traced with amazing amount of geometry and texture data.

This provides life like imagery and accurate representation of object in light as if it was a real world object.

Pixar has published a document describing all the intricate details which can be found here for our avid readers.

Ray Tracing Games

Large players have launched multiple titles targeting stunning visuals using Ray Tracing.

Although full ray tracing support is a distant dream due to huge computational cost.

But partial support has seen tremendous boost in the visual arena.

What games will have ray tracing?

Even though nVidia has launched a RTX based graphics card and AMD will follow join the league, it's the game developers who will have to unleash the real power of the cards.

They will have to program the games utilizing the cards features.

There are few titles which takes advantage of the new RTX cards by nVidia.

These titles mentioned below will give you a glimpse of what Ray Tracing has up its sleeves.

Assetto Corsa



Assetto Corsa is a racing simulation game.

It supports TrackIR head tracking and VR head-mounted displays as well as Nvidia 3D Vision and professional motion systems.

Multiple teasers were showcased and is available for download since 2013.

As a demo, it's available for both PC and consoles.

A newly announced release called the Ultimate Edition is due in February, 2018 for consoles.

It will contain all previously released downloadable content and will be available on April 20, 2018.


Electronics Arts in conjugation with EA DICE developed and published the much awaited series in the franchise.

It is a first person shooter video game and is the Sixteenth installment in the whole series.

It released worldwide for Microsoft Windows, PlayStation 4, and Xbox One on 20th Nov, 2018.

There is an extra focus on realism, taking advantage of Ray Tracing.

Players will be able to create multiple characters with various cosmetic and weapon options.

Shadow of the Tomb Raider



Developed by Eidos Montréal in conjunction with Crystal Dynamics and published by Square Enix.

Shadow of the Tomb Raider is an action-adventure video game.

Released on 14th September, 2018, it's the twelfth part of the Raider series.

Metro Exodus



Metro Exodus

A first-person shooter game developed by 4A Games and published by Deep Silver in 2019.

It's very closely based on Dmitry Glukhovsky's novels and it has gained a lot of popularity already.

Ruined by a nuclear war, Metro Exodus sets off on the post-apocalyptic Earth.

The player mimics Artyom, who kicks off on a world wide journey with his allies on a locomotive called the "Aurora".

It's screams of awesome game play with stunning visuals.

Elements combined with survival horror and stealth elements at the players disposal for an exceptional immersive game play.

Conclusion

Ray Tracing has immense future prospects and is definitely going to take the gaming community by storm.

nVidia and AMD both are trying their best to bring the best of the technology to the common mans table.

While real time Ray Tracing was a distant dream few years ago, it certainly isn't now.

Few games have already released which demonstrated what nVidia and AMD have up it's sleeves.

More powerful games are yet to launch and we will see some astonishingly graphic intensive titles launching soon.

Hope this article was useful to you, if it did help then please drop a comment. It helps writing more topics like these for you.



Comments

Popular posts from this blog

The only Samsung Galaxy A50 Review you will need

New camera update for Samsung Galaxy A50

Create SubDomain in GoDaddy without hosting - link with Blogger