15 ms·
Hallucinations re: the rendering of Cyberpunk 2077
- ganoushoreilly 6y agoAwesome technical analysis. I dig it, going to have to follow this blog.
- LordDragonfang 6y agoInteresting write-up, but I feel like it would be helpful to put an image of the final render up front so the reader has a better point of reference for what the intended effect of all the steps is. https://1.bp.blogspot.com/-gO2R-e5TmHs/X9umb0DXKFI/AAAAAAAACOk/1h6cMKV0PJcwb1Msz7rd_l-Z-pJoh8XgACLcBGAsYHQ/s0/Capture6.PNG=s0?imgmax=0 https://1.bp.blogspot.com/-gO2R-e5TmHs/X9umb0DXKFI/AAAAAAAAC...
- Angostura 6y agoThankyou. Was driving me mad
- iooi 6y agoIt looks like the person is floating rather than standing. I'm not an expert, but it seems like there's shadows missing.
- est31 6y agoYes the blog post explains that this is how the game works. Some lights do make shadows, but they are expensive so artists may only place a few per sceen. There seem to be none which could make him cast any. Also note how his face is all red even though that red is way further behind in the periphery.
- read_if_gay_ 6y agoIt was mentioned that RTX is off so maybe that’s why.
- arifmeticus 6y agoSeems strange that there is nothing instead. Even a round shadow blob beneath, like the games from ps2 used, would make the character look much more grounded in picture.
- fxtentacle 6y agoThat image was taken before post-processing, e.g. screen-space ambient occlusion and bloom, both of which can visually glue things together. Especially the SSAO would likely add some smooth darkness around the person's feet.
- c0de517e 6y agoIt's not about post-processing, it's that most lights do not cast shadows. So yes, there can be a bit of "floating" in certain scenes.
- deleted 6y ago[deleted]
- aspaceman 6y agoThere’s an example frame right dead center in the article. Legit have no clue what you’re talking about. This place is dumb.
- papa_bear 6y agoThe image linked is at the very end of the article, and the comment simply mentioned that it would be nice if it was at the beginning...
- c0de517e 6y agoAdded to the post, thanks for the comment.
- speedgoose 6y agoVery interesting analysis. Now I understand why the current hardware struggles so much to compute graphics that looks similar to what could be done using Unreal Engine 3 years ago on smaller worlds: no light maps and probably no pre-baking at all.
- CyberDildonics 6y agoCurrent games look much better than what was ever done on the unreal 3 engine. It doesn't have much to do with smaller worlds and lightmaps are still used all the time. Look at the most recent doom and compare it to anything done with unreal 3.
- deleted 6y ago[deleted]
- IdiocyInAction 6y agoCyberpunk looks way better than anything I've ever played. Now way UE3 games could match that with baked lighting.
- didibus 6y agoI think OP meant, when run on a base PS4 or Xbox maybe?
- speedgoose 6y agoYou are right, looking back at screenshots of these old UE3 games they don't look as good as I remembered. However Cyberpunk (without raytracing) is not the most beautiful game I played. It has a few nice scenes, the one discussed in the article looks good, but you also have a lot of areas that are nothing special and have very bad performances.
- Exuma 6y agoWhat is a G-Buffer for non game developers?
- diskzero 6y agoIt is a component of a deferred shading rendering pipeline. "A screen space representation of geometry and material information, generated by an intermediate rendering pass in deferred shading rendering pipelines." https://en.wikipedia.org/wiki/Deferred_shading https://en.wikipedia.org/wiki/Deferred_shading As an aside, I worked in visual effects for film for years and never heard the term g-buffer. I am sure we had some other term that we thought was common, but was only used inside our studio.
- Keyframe 6y agoAOVs, render passes, whatever. What they're doing in the final pass in games is fancy comp with all of that. We've played with re-lighting in comp as well. You ought to be familiar with that.
- corysama 6y ago3D objects are drawn using 3D triangles projected and interpolated on to the 2D screen (2D array of colors). Classically, you draw the whole triangle, start to finish in one go. Interpolate the triangle, look up any colors from textures, do the lighting math, write it all out. Simple and straightforward. For complicated reasons, it often actually works out better for current games on current hardware (games/hardware of the past decade) to defer the lighting math and do it in a separate pass. So, interpolate the triangle, look up the textures, write all of the inputs to the lighting math (other than the lights themselves) to a multi-layer 2D array of parameters (surface color, normal, roughness, etc...). Then later determine which lights affect which pixels and accumulate the lighting using only the 2D parameter arrays --without needing the triangle information. The multi-layer 2D arrays of material parameters is called the "G-Buffer". I think it originally stood for "Geometry Buffer". But, the name has taken on a life of it's own.
- modeless 6y agoThere are two types of rendering now in common use for games. In forward rendering you allocate one RGB color buffer for the screen, then rasterize triangles to this buffer, directly producing final RGB color values at each pixel. In deferred rendering instead of one RGB color buffer you allocate a set of screen-sized buffers to hold various attributes of your choosing for each pixel, which can include colors but also things like the surface normal, material type, roughness, velocity, etc. These buffers are collectively referred to as the G-buffer. When you rasterize triangles you fill in all the attributes for each pixel instead of just a final color. Then in a second full screen pass, for each pixel you read all the surface attributes you wrote earlier and combine them with other data such as the positions of nearby lights, do some calculations and output the final color. By deferring lighting calculations and separating them from the geometry rasterization, deferred rendering can offer more flexibility and performance in some cases. However it is tough to use with MSAA and/or transparent objects, and can be a memory bandwidth hog. Modern rendering is all about tradeoffs.
- corysama 6y agoIf you find graphics breakdowns like this one interesting, you can find several more in https://www.reddit.com/r/TheMakingOfGames/search?q=frame&restrict_sr=on&sort=relevance&t=all https://www.reddit.com/r/TheMakingOfGames/search?q=frame&res... and https://www.reddit.com/r/TheMakingOfGames/search?q=graphics&restrict_sr=on&sort=relevance&t=all https://www.reddit.com/r/TheMakingOfGames/search?q=graphics&...
- atum47 6y agoI've been meaning to get in deeper in 3D rendering. I always thought it is fascinating. I took a shot at creating my own 3D engine in the browser from scratch using webgl and it's kinda hard. Back then I was between jobs so I had a lot of free time. How do you got into CG? Do you fiddle with other areas, like AI, ML...? I'm asking cause I think you really have to concentrate in one field to get to the level of the guys behind cyberpunk. They probably never had to learn react / redux in order to get a job.
- corysama 6y agoThe rendering engineers on Cyberpunk are definitely career experts. But, hobbyists can get impressive results in their spare time. IMHO, a good target to shoot for is to write your own https://www.khronos.org/gltf/ https://www.khronos.org/gltf/ viewer. It's a scalable goal that you can take as far as you like. Start with https://github.com/jkuhlmann/cgltf https://github.com/jkuhlmann/cgltf to handle loading the data. Check the sidebar of https://www.reddit.com/r/opengl/ https://www.reddit.com/r/opengl/ for tutorials.
- atum47 6y agothanks. I was able to get the basics stuff out of the way: https://victorribeiro.com/3Dsphere/ https://victorribeiro.com/3Dsphere/ https://www.youtube.com/watch?v=w13Q_KL1I9A https://www.youtube.com/watch?v=w13Q_KL1I9A I just need to focus a little bit more in order to get more complex stuff done. for instance: I don't know jack about animations / bones / skin deformation. =(
- ilays 6y agohttps://www.amazon.com/Real-Time-Rendering-Fourth-Tomas-Akenine-M%C3%B6ller/dp/1138627003 https://www.amazon.com/Real-Time-Rendering-Fourth-Tomas-Aken... try this if you have time
- corysama 6y agoThat book is a highly-recommended intro. The site for the book https://www.realtimerendering.com/ https://www.realtimerendering.com/ also list tons more great material.
- shmerl 6y agoI wish they'd add their Vulkan renderer from Stadia to the Windows version and make a desktop Linux version too.
- mhh__ 6y agoI suspect they've got bigger problems right now. (If they don't they're kidding themselves)
- BearOso 6y agoFrom what I hear, the Stadia version is actually really good. The solution to their problem might be porting that version around.
- est31 6y agoBut it's a homogenous platform instead of the mad set of different driver versions/-implementations, desktop environments, windowing protocols, audio protocols, etc. that is colloquially referred to as the GNU/Linux desktop. If Google brought out a stadia console with one consistent OS image, hardware, and driver, it might become easier for devs to support it.
- arcturus17 6y agoI hear the PC version is also OK and it’s only the consoles that are atrocious. And they are rather homogeneous targets...
- est31 6y agoIndeed, good point. I too heard that the consoles are buggy. I think it's mainly a problem of the team not having spent time on fixing them. Note that consoles also are a much larger share of the market than GNU/Linux, so they are more likely to put focus on fixing the bugs in the future. For GNU/Linux though, such a task is insurmountable.
- EugeneOZ 6y agoSo that's how games are being seen by the gamedevs :) It was interesting - would be interesting to read something like this also about the RTX-parts, their description sounds so great - I hope they will some day show us the new horizon in rendering. Hope it's not just marketing cheap trash like it was with DLSS. I have RTX card and I see (pretty noticeable) difference when I turn on RTX reflections and shadows in Cyberpunk, but I can't see what is the difference in RTX-lightning.
- ramidarigaz 6y agoDisagree about DLSS being cheap marketing trash. Especially on the quality or balanced settings, it produces a significant framerate improvement in Cyberpunk without any noticeable quality loss.
- EugeneOZ 6y agoOk, let's disagree. Quality loss is non-acceptable, image is blurry as hell. DLSS is just stupid upscale.
- knowaveragejoe 6y agoI'm going to have to side with the other poster here as well. Enabling "DLSS" on auto significantly improved framerate without noticeable quality loss(to me). I'm on a 2070 Super running "high"ish settings @ 1440p.
- EugeneOZ 6y agoOk, people are different, demands to image quality are different. I'm playing on RTX 3090, 1440, 27''. All max settings except DLSS.
- takeda 6y agoLinus talked about it and other settings: https://www.youtube.com/watch?v=kK45BxjSLCs https://www.youtube.com/watch?v=kK45BxjSLCs
- boyadjian 6y agoI always like very much those analysis, they are so valuable, to understand how the rendering of these video games works, and maybe do the same
- medlyyy 6y agoVery interesting article. Some humble thoughts: The discussion on the SSAO suggests that the game's system uses GTAO - lots of features suggest at the least heavy inspiration from the technique (see "Practical Realtime Strategies for Accurate Indirect Occlusion" - relatively accessible paper). The way the game's rendering is set up seems very carefully thought out. Namely, the relative lack of pre-baking and lighting "tricks." This accomplishes several things at once: It simplifies development of locations and assets - hugely important in a game with a scope this large, it makes the lighting/visuals of the game more robust and consistent in quality, and it also allows the integration of ray tracing effects without changing the artists' and designers' process. Since even without ray tracing the game uses PBR and broadly physically plausible (though carefully designed) lighting, adding ray-tracing doesn't require a massive amount of extra work. All the information is already there, and it'll be much easier to make it look good. All in all, reading this article has done just as much to convince me that the game is "next-gen" (at least in terms of graphics) as actually playing it has :) As a comparison, the ENB mod for Skyrim allows dynamic lighting in that game, but to actually use physically plausible light locations rather than the base game's prebaked light maps essentially requires redoing the lighting for all the locations in the entire game (there are several mods that do indeed do this.) Before CP2077 I still hadn't seen a game that definitely beat what you could accomplish with modded Skyrim for visuals - even in very recent games it was all still fundamentally done the same way. Good to see that essentially a decade of near stagnation has ended. It's a little vexing that the state of PC gaming is so dependent on the release of new consoles, though. Edits: for minor fixes
- hutzlibu 6y ago"It's a little vexing that the state of PC gaming is so dependent on the release of new consoles, though" Thats apparently where the big money is. Also, there are lots of folks like me, who play only occasionally and therefore not needing to spend so much for a state of the art gaming PC, and get by with their 5+years old one. But yes, if the high end PC gamer hardware would be standard ... that would allow for some serious graphical (and other) improvements. I am finally back into game developement (as a side project) - and I am surprised again, how much hardware constraints limit game developement, too. Many things I want to do, are just not possible on the average machine (but thats the bonus from developing on average hardware, you find out about that early on). I still dream of a voxel sandbox gameengine with integrated chemistry and physics. There are quite some projects promised that years ago, but apparently it is not yet possible with todays hardware. Maybe soon?
- ehnto 6y agoThat was a really fun read, I would like to know more about the RTX/DLSS influence on the game and how much of it just layers on top versus being fundamentally different ways of building a game. One thing I feel it does in Cyberpunk is adds a layer of lighting correctness that really sells the environment. Sometimes it doesn't look perfect but it always feels correct and closer to true to life. I have long held that lighting more than textures was the missing realism in games, and if you have ever played retraced minecraft I think you get what I mean. Even the pixelated textures and block world of minecraft feel like a real world when rendered with correct lighting.
- NolF 6y agoGamer's Nexus did a video of DLSS on this game and gives some insights into how it works.
- hypertexthero 6y agoI have a question for video game graphics experts: Assuming a game has stealth mechanics, why do some games let you shoot out almost every light (Ghost Recon Wildlands, GTA 5), while others don’t (Far Cry 5, Cyberpunk)? Is it a technical decision that needs to be made early on in the game process? Perhaps being able to shoot any light out involves more work for world and mission designers?
- vorpalhex 6y agoI'm an amateur but I'd have to guess it's the difference between static lights (often baked into the level itself) and dynamic lights (flashlights, moving lights, etc) that are computed at play time.
- tomc1985 6y agoAs the other comment alluded, lighting is traditionally static. This is because all the lighting would be calculated during development and be "baked in" to the level. Up until dynamic lighting became feasible (doing it real-time is very expensive computationally) the games that had shootable lights had to resort to clever programming, at the very least, to get it working And in any case it takes additional logic to make a light be destroyable, in addition to needing the proper flags to be set in the level design process. I can't think of very many games where all lighting is truly dynamic like you are thinking, and up until recently a lot of graphics cards could not handle more than a few dynamic lights at a time When DOOM 3 released, part of its technical wow factor was how it was able to get dynamic lighting working using early 2000's graphics tech. I remember being blown away watching the light change as an overhead lamp was being affected by physics
- hypertexthero 6y agoThank you, this makes it clearer. I think Ghost Recon Wildlands and GTA 5 do it well in the sense that lights that would clearly be destroyable by a bullet are indeed destroyable, from lamp-posts to car headlamps to light bulbs. If a light needs to be fixed, at least it helps for the source to be designed to look like it has metal grating around it or something. I remember DOOM 3 blew me away, too. Those zombies you could only see with the flashlight in the first level. Scary! I played it to the end with lights off with my brother and we both got jump-scares regularly!
- person_of_color 6y agoA waste of engineering talent
- randartie 6y agoDo you mean game development in general? Or the author of the blog?
- person_of_color 6y agoBoth!
- c0de517e 6y agoA waste of a comment :)
- deleted 6y ago[deleted]
- slg 6y agoMeanwhile Sony just announced they will be refunding purchases for this game and taking it off their virtual store due to it being extremely buggy and seemingly unfinished on consoles. This is an unprecedented move for a game of this stature and is a monumental failure from CDPR. https://www.playstation.com/en-us/cyberpunk-2077-refunds/ https://www.playstation.com/en-us/cyberpunk-2077-refunds/
- mwill 6y agoI suspect the Sony decision came on the tail of CDPR asking upset fans to request a refund from Sony. For the last few days people have been posting screenshots of Sony denying refunds, making Sony look bad. I feel like this is Sony saying to CDPR "If its broken enough you're sending people to us for refunds, it's too broken to sell"
- acoard 6y agoYou're right this is about avoiding bad press on Sony (or the need for Sony to revise their return policy), but it's also about Sony as a publisher enforcing their relationship with studios. Sony's return policy for digital isn't consumer-friendly and something I want to defend, many call it a "no refunds" policy, as if you start the game even once you can't get a refund. But as publisher it's their right, and within their interest, to enforce it. It's not up to studios to unilaterally change it. On Dec 13th, CPDR issued the tweet/statement, "For copies purchased digitally, please use the refund system of PSN or Xbox respectively."[0] The next day at an investor call, investors asked them if they had a special refund agreement with Sony and Microsoft. They said they didn't. [1] Then the next public statement from either was Sony saying it's removed. The next statement from CPDR was to investors but was leaked, essentially saying they met with Sony and Sony told them it was being removed.[2] Oh, to be a fly on the wall for that meeting. Microsoft has also said full refunds for anyone who requests, matching Sony.[3] [0] https://twitter.com/CyberpunkGame/status/1338390123373801472/photo/1 https://twitter.com/CyberpunkGame/status/1338390123373801472... [1] https://www.cdprojekt.com/en/wp-content/uploads-en/2020/12/call-transcript_en.pdf https://www.cdprojekt.com/en/wp-content/uploads-en/2020/12/c... [2] https://www.bankier.pl/wiadomosc/CD-PROJEKT-SA-Czasowe-wstrzymanie-dostepnosci-gry-Cyberpunk-2077-w-PlayStation-Store-8023177.html https://www.bankier.pl/wiadomosc/CD-PROJEKT-SA-Czasowe-wstrz... [3]https://twitter.com/XboxSupport/status/1339983452255498240 https://twitter.com/XboxSupport/status/1339983452255498240
- dusted 6y agoI've logged about 20 hours in it so far, I've seen just as many bugs of the same severity when I played GTA5, and that was multiple years after launch. Maybe does not run on some potato console, and the real failure of CDPR here is launchig on console at all, that extra effort could have gone to squishing some more bugs and getting the PC version more polished before launch. Just like people buy consoles to play a certain game, they buy PCs to play a certain game, and Cyberstalker is definitely a good reason to upgrade if you're behind the curve.
- Hypergraphe 6y agoThanks for the read, very interesting.