Tuesday, June 21, 2022

Ray tracing is not only a gimmick, it's bad for the environment too

I've recently been scolded by one of my tech junkie friends for having the audacity to care about things like power consumption and practicality when it comes to gaming, as I ended up opting for a rather meek RTX 3060 this generation over a comparatively more beefy card like the 3070 or 3080, and a big part of what went into that decision came down to the fact that power consumption in NVIDIA cards has dramatically increased since my previous PC build.

So being the petty nerd that I am, I decided to do some research in an effort to validate my criticisms that current generation cards are spiraling out of control with power usage, and for unjustified reasons. Sure enough, it took no time at all to pin down a culprit, as my immediate suspicion fell on NVIDIA's latest highly-touted feature, ray tracing. This ended up leading me down a rabbit hole to some surprising conclusions. And the verdict is: ray tracing most definitely is a gas guzzler, on top of the fact that it's largely impractical in most use cases.

For some context, I've never been a ray tracing hater from the beginning. I've been on the fence about it for a long time, as I've seen some impressive examples of it in action, but on the other hand I knew it was incredibly taxing on hardware in order to render. I could see the trade-offs being justified though if it really does give games that much of a makeover with its improvements. The clearest example of this I can think of is Microsoft's demonstration of RTX with Minecraft. It is pretty impressive how much it adds character to the worlds just by throwing in some realistic lighting while changing nothing else about the game. Even with its still-highly-pixelated textures, it practically looks like a whole new game.

But there's a reason why Microsoft chose this game to demonstrate the power of RTX, and that's because the vanilla game uses an incredibly basic lighting engine to begin with, so it's much easier to see the stark differences when you throw in something fancier. Traditional rasterization techniques for lighting have come a very long way though, and programmers have gotten exceedingly adept at simulating realistic lighting without actually using realistic calculations for light sources. This allows games to look very pretty without massively tanking your frame rates. The truth is that classic Minecraft simply doesn't take advantage of all these little visual tricks, so it creates an unfair advantage for RTX to make it look better than it actually is.

Take a look at these three comparison shots of Minecraft for a moment:



Now you'll likely notice that the first one obviously is your basic baby boy vanilla Minecraft with no lighting mods applied, while the other two are ray traced with more advanced dynamic lighting.

...Or are they?

One of them is an imposter. Can you spot the difference with which one is ray traced and which one is just using traditional lighting tricks to simulate ray tracing? Don't actually answer that by the way, because any answer other than "I'm not sure" means you might be guilty of being an elitist turbo-nerd and nobody cares. Congratulations. As for most normal people who don't spend all day staring at reflections and shadows so they can adjust their glasses and smugly point out the fakes, chances are you can't spot any meaningful difference, but the correct answer is in fact that the second screenshot is ray tracing while the third is the faker using traditional shader techniques.

No joke, the second sample is using Sonic Ether's SEUS PTGI shader pack, which stands for Path-Traced Global Illumination, and it utilizes real ray traced reflections, while the third is SEUS Renewed, which is a shader pack designed to dramatically improve Minecraft's lighting using only traditional rasterization methods; giving a much more balanced ratio to performance versus visual improvement.

Nope, still not ray traced.

In fact, when I first started using SEUS Renewed, I was already under the impression that I was looking at real ray tracing because it looked so good, only to later discover that it was Sonic Ether's other shader pack that was the real deal. Yet even after comparing the two hands-on, I've found that I still prefer Renewed over the real ray tracing solution. Not only because Renewed doesn't crash my FPS down to 30 as it does in PTGI, but because I actually think in most cases visually it looks better anyway. I always expected my findings to show that ray tracing would look really pretty at the cost of heavy hits to performance, but I never expected to find that traditional shader techniques were already so advanced that they can still compete pretty handily with actual ray tracing.

Now there are a few caveats to this. Certainly when it comes to underwater environments, PTGI has a fairly substantial edge over Renewed. God rays shine through the surface of the water which creates a beautiful visual effect that Renewed fails to replicate, and it's possible if I used Microsoft and NVIDIA's official ray tracing implementation, some of these types of details might look even better.

A demonstration of PTGI god rays.

However, the fact that traditional shaders can already look good enough to compete this closely with ray tracing (while not sapping away as much as 40 frames per second or more) has thoroughly convinced me that there's just no good reason to use ray tracing in most circumstances, and I'm sure if a skilled programmer really wanted to, there's plenty of cheaper visual tricks you could use to simulate god rays too.

In a test experiment with Linus' employees back in May of 2021, they set up several examples of game environments running with ray tracing either turned on or off. They would ask if employees could spot the differences. While some of the more tech-savvy in the bunch were able to guess everything right, they still had to frequently pause and squint around very closely before they could determine it, and even then they weren't always 100% sure of themselves. The biggest giveaway in Shadow of the Tomb Raider for example, was only that the ray traced shadows looked a little smoother than the rasterized ones. Wow. What a difference. Definitely worth obliterating my frame rate for.

Are you really feeling it yet, Shulk?

But it gets worse people. In one test performed by a redditor who posted their results online, power draw on their system rose by an additional 180 watts simply by turning the RTX setting on and nothing else, representing a 70% increase in power draw with their RTX 3080 build. For some perspective, my RTX 3060 card's peak power consumption is supposed to cap out at 170 watts. In other words, literally flipping on this one setting for the RTX 3080 adds more power consumption than my own card is even capable of generating, and that's on top of whatever else the 3080 was already drawing beforehand.

A study conducted at the University of Utah titled A Detailed Study of Ray Tracing Performance: Render Time and Energy Cost similarly reached the same conclusions that I have: that ray tracing is both extremely taxing on hardware performance and energy consumption, and while developers tend to focus on minimizing render time, they should be considering the energy cost as well.

Needless to say, if I was a congressman right now, I'd be writing legislation to limit the power consumption on consumer-grade PC parts just as we enforce miles per gallon standards on vehicles. In a time when climate change is really beginning to bare its fangs and bitcoin mining is consuming multiple nations' worth of electricity, it seems extra irresponsible to me that NVIDIA would push such a gratuitous feature like this and let their power draws run wild over it.

In ray tracing's defense, there are at least a few semi-practical use cases I could see for it. When it comes to older games that use far outdated lighting methods for example, ray tracing definitely could serve as a nice quick and dirty solution to juice them up and make them look prettier with minimal effort on the part of the modder, since the dynamic lighting could be easily adapted to most environments without needing to carefully hand-place and tweak light sources on everything.

Linus seems to be more optimistic about the future of ray tracing than I am, but personally from the experience I've had with it so far, I remain skeptical. The massive performance hits are just too hard to justify for some marginally prettier lighting. Unless the energy and rendering costs can be reined in through more efficient calculation methods, or maybe in the far-flung future when video cards have 100 teraflops of headroom to flex their muscles with and ray tracing has become child's play, it could be rationalized.

But current-gen games mostly shouldn't be bothering with this as far as I'm concerned. In almost every circumstance I could think of, you could probably provide a good lighting substitute for less than half the performance cost of ray tracing, and instead use that extra rendering overhead to put towards higher resolution textures, more polygons, higher frame rates, and further draw distances. For the time being, it's hard to see ray tracing as anything more than a gimmick when you can see how closely traditional rasterization can compete with it, and without the need of the starship Enterprise's warp core in order to power it either.

Early rumors and unconfirmed leaks of the RTX 40 series cards only add to my concerns. The RTX 4060 for example, is estimated to have a peak power draw of anywhere between 290 to 350 watts, which puts it in a similar ballpark to the RTX 3070 TI and 3080 currently. Mind you, this is supposed to be a mid-range card though, not an enthusiast unit like the latter cards. We could be seeing as much as 700 watt power supplies being required for only a mid-tier PC build in the not-too-distant future. The power splurging issues only seem to be getting worse.

So make no mistake, the power consumption of these new cards is excessive, and it is largely impractical. When the biggest source of your gas guzzling comes from an extremely taxing feature that doesn't even offer substantial improvement over more traditional methods, you're not exactly in a position to lecture me about irrational purchasing considerations. Now if you're OK with that anyway because you just want to be able to bask in your god rays and wipe your butt with $100 bills, fine, but let's not kid ourselves that this is anything other than vanity and Chad Warden memes. In the meantime, I'll continue to stick to my practical, more environmentally responsible builds, thank you very much. This is Petty McSmugerson, signing off.

No comments:

Post a Comment