BeastyBaiter Posted August 11, 2014 Posted August 11, 2014 So here's something I've been wondering for a long time but never asked, why does every game ever made use polygons to render a circle instead of simply rendering a circle? It strikes me as very odd that BoS and everything else uses this polygon nonsense. Sure it's higher detail than the polygon models in older games, but honestly, wtf is so hard about x2 + y2 = r2 and why do we still use a 20+ sided polygon instead? Obviously this issue extends to other types of curves such as curved wingtips, engine cowlings and all sorts of other things that could easily be represented by an ellipse. I assume there is a reason, but I have no clue as to what it could be. I wrote calculator type programs in C++ all the time in college that could handle these types of calculations. It's basic stuff. Why can't a graphics engine able to handle countless polygons be able to run a few ellipses, spheres and other such simple objects instead?
39bn_pavig Posted August 12, 2014 Posted August 12, 2014 It is because graphics cards are optimized to produce tessellated surfaces (triangles). True curves are used in various cad modelling systems, but they present problems with texturing. It is difficult to translate two dimensional bitmaps onto true three dimensional curved surfaces, but by dividing the surface into triangles (easily translated into 2D) the math involved in producing textured surfaces is much simpler, and can be handled by integer math once the correct transform mapping has been produced. This greatly increases the ability to parallel process texturing and shading over many simple graphic cores. 3
BeastyBaiter Posted August 12, 2014 Author Posted August 12, 2014 (edited) Obvious next question is why use a 2d bitmap to texture a 3d object instead of a simple fill function or a 3d bitmap (if this doesn't exist, can I patent the idea? ). I just don't see how having a piecewise function with thousands of individual parts is easier to process than the same object represented by a few dozen curved pieces. It's several orders of magnitude simpler. Edited August 12, 2014 by =LD=King_Hrothgar
LLv34_Flanker Posted August 12, 2014 Posted August 12, 2014 S! Easier to make what is now "industry standard" than create something new, maybe? I had a lenghty discussion with a friend of mine who has been coding now for over 30 years, professionally. He said the code is not "tight" these days as computing time is not expensive as it was back then when he started. Everything had to be squeezed in those cycles as efficiently as possible, but now with all the computing power stuff has become "bloatware" so to say. Now the tables have turned that it is more expensive to create tight code rather than use existing code. Yes, there are even "code modules" programmers can use. Blame the bean counters for the bloated expenses The shareholders must get their MOOLAH! 1
39bn_pavig Posted August 12, 2014 Posted August 12, 2014 There are entirely 3D systems in use (using procedurally generated 3d textures etc) or 3D pixel based systems such as voxels, but they are generally very calculation intensive. As you are only producing a 2D image on screen it makes sense to break gaming graphics down into 2D for rendering. This reduces the issue of figuring out what to render when only simple surfaces need to be painted. A triangle, no matter how you twist and turn it remains a triangle, so it is very mathematically simple and gpu light to paint it on a 2d screen. Complex curved surfaces however present problems, because they look different from different directions, there is no obvious point where the angle of the curve meets the angle of view, so requires a complex solver to figure out where the edges of viewed objects are. Problems such as this are why triangles are used. Usually triangles simplify more than they complicate things. There are certain effects though (such as volumetric lighting, smoke, etc) which are difficult to solve using such systems. In the case of 3D games which use them, they are either baked in by the developer when the level is built, or rendered off screen before they are needed... or faked. Very few games use truly 3D effects because of the high computational weight compared to lighter weight triangle based systems. For instance; true ambient occlusion (self shadowing objects) takes seconds to render a single frame in a 3D application. Instead in games ambient occlusion is either baked into the textures during development, or screen spaced ambient occlusion is used (which renders fake ambient occlusion as a layer on the 2D screen.) 3
LLv34_Flanker Posted August 12, 2014 Posted August 12, 2014 S! So is this "baked SSAO" what makes BoS look horrible in certain situations? I can see "glow" around the stick, banded shadows and effects popping in and out. Like a smeary layer on top of the graphics It was much better when you could turn this useless feature OFF from the configuration file.
taleks Posted August 12, 2014 Posted August 12, 2014 Mathematics operates with abstract points, which is an entity that has a location in space, but has no extent. You can't build an image of 3d model in finite time if it consists of infinite quantity of points. Thus, mentioned by topic starter (x - x0)2 + (y - y0)2 = r2 is not such simple for calculations as it seems, although is really easy for drawing by compasses. Polygonal models are simply a way to avoid this technical limitation barrier, or - if you prefer - reduce complexity of geometrical model. Other than this there are a lot of problems with hidden surfaces/self-shadowing/etc when using arbitrary curves. Polygonal models have their issues, but you know that proverb for democracy? It is the same for CG: polygonal models are not the best, but we have nothing better for CG in games now. 5
J2_Trupobaw Posted August 12, 2014 Posted August 12, 2014 (edited) Planes of pixels are discrete, you can represent triangles on them using only rational coefficients, or relations of integers, which can be represented on computer without lose of precision. Points on the circle have mostly irrational coefficients which can be only approximated by computer, which requires more computatuions . x^2+y^2 = r^2 formula gives a very blocky circle if applied straight - for given X, you must find square root of X^2-r^2 to get corresponding ys, and this root is unlikely to be rational so the ys may randomly end up pixel to high or to low; apply it along length of circle and watch shape deteriorate. There are better formulas that draw circle-shaped circles, but they still need a lot of approximation. Now that you have your circle, start moving it around the rendered space, or rotate the plane the circle lies on in 3d space, and either make the approximations again for each frame (do things form the scratch), or watch how small errors in your original approximations make the circle lose shape with each frame. The great thing about triangle is, if you move point that has rational coefficients along a vector of integer coefficients, or rotate it at pre-chosen angles, the destination has rational coefficients as well. So you never need to approximate the figure you are drawing, even if it moves. As far as computers are concerned, polygons with discrete cornerpoints are real beings while circles, elypses, spheres and curves are imaginary beings that need to be represented by drawing "real" being of similar shape. Designing a polygon that represents a circle well enough and can be understood straight by computer is better then trying to explain to computer an abstract idea of circle and expect it to understand - it will understand by making up a polygon that "best" fits your idea of circle. Better go straight to designing a polygon. Edited August 12, 2014 by Trupobaw 1
39bn_pavig Posted August 12, 2014 Posted August 12, 2014 I can see "glow" around the stick, banded shadows and effects popping in and out. it sounds like you may be having problems with post-process effects. These happen (mostly) after the 3D processing and texturing is done. Think of classical 2D film or photoshop effects such as high dynamic range lighting, color correction, fog, depth of field, motion blur, bloom (ie. glow around bright objects or reflections) etc. Try looking at your camera settings and turning off motion blur and cinematic camera effect. (If I remember correctly.) The way these effects appear is also dependent on both the resolution you run the game, and any tweaks you may make to your graphics driver. Eg. if you change the color processing or other settings in the nvidia or radeon control panel from their default settings, or if you run in an extremely high or extremely low resolution compared to the one targeted by the developers. I would particularly look at any default color corrections you may have set for your system if you are getting banding problems with graphics. If you have exceptional graphic problems I would suggest taking it up in the troubleshooting forum. 3D graphics is a game of compromise. For every technique developers use there are benefits and problems to be overcome. In balancing these issues, if we are lucky, they manage to make an entire world get painted on our screen sixty times a second. Like artists they compromise between those techniques which are "right" and those which are practical, and must make aesthetic decisions about how to cheat in order to get the work finished at all. In the case of computer graphics it has been found that many of the most practical techniques are also not the most elegant we can imagine, but they are fast and cheap and good enough. 1
LLv34_Flanker Posted August 12, 2014 Posted August 12, 2014 S! I run default settings on my AMD R290X as usually it does more harm to force settings than use the driver/game defaults. I do not use Motion Blur at all, hate this gimmicky effect to the guts. So it was disabled on day one and stays that way. Here is an example of the horrendous effect and I suppose it is the SSAO. Screenshots below.
FuriousMeow Posted August 12, 2014 Posted August 12, 2014 I see zero difference. Converting to jpeg or gif or anything else won't help either. You need to provide straight png or bmp to tell the difference. jpg and gif compress and show zero difference.
LLv34_Flanker Posted August 12, 2014 Posted August 12, 2014 (edited) S! There is no difference between the pics, the areas with the damned striping or whatever are circled. I can see them very clearly on my screen, even it is a JGP picture. And when it happens in game it simply looks horrendous as it is a delayed effect and looks like plastered on top of the image. Edited August 12, 2014 by LLv34_Flanker
39bn_pavig Posted August 12, 2014 Posted August 12, 2014 S! I run default settings on my AMD R290X as usually it does more harm to force settings than use the driver/game defaults. I do not use Motion Blur at all, hate this gimmicky effect to the guts. So it was disabled on day one and stays that way. Here is an example of the horrendous effect and I suppose it is the SSAO. Screenshots below. As it is very difficult to see any graphical glitching in the screenshots you posted it seems likely that there is a color calibration or gamma issue either with your monitor, graphics drivers or somewhere else in your system. It wasn't until I pumped up the gamma on your screenshot that I could see the problem you were talking about. As you can see from the screenie attached, there is a lot of information compressed into the shadow detail, which when boosted produces colour artefacts. I have a strong suspicion that this is what you are seeing. I would look at gamma or brightness/contrast on your monitor or color calibration elsewhere in your system to see if you can find a more natural curve. You may have gamma boosted in IL2 also, which would produce these issues. The reason that banding occurs is because, by the time it hits the screen shadow areas have been through various rounds of processing, which produces some digital glitches. Usually these are not a problem as these shaded areas aren't re-boosted back into the visual range. if they are however, it is as if you have streched that chunk of values down the left of the graph to cover a wider area of light value, and so the cracks of digital processing will show. It is not just SSAO but HDR and many other effects in combination which produce the glitches, but if the color calibration is in the average range they are usually invisible. It is usually only possible to see banding artifacts in extreme circumstances - eg. when flying at night with lighting boosted some graphics cards will show banding on the sky due to the large difference between actual brightness and the corrected (HDR) display brightness. 3
johncage Posted August 13, 2014 Posted August 13, 2014 normal map negates the need for curves, plain defecates on the concept of it and produces first glance identical results since all simulation, artistic representation and even photography can never capture the whole reality anyway. no need for curves. now or ever.
LLv34_Flanker Posted August 13, 2014 Posted August 13, 2014 S! Pavig is right, that is the banding I see. Not so apparent in the sky though. In game I have gamma dropped to 0.9 from 1.0 as the visuals were too bright for me. In Display color settings in CCC-panel I use the EDID data from the monitor to determine color temperature control and it seems to be at 6500K now. What is striking in this banding effect is that when you look at any direction it takes a second or two to "settle", kind of darkens to it's value. My monitor itself is on default settings, haven't touched them since plugged it in. I have a ViewSonic V3D241wm 121Hz monitor. Thanks for the input, very much appreciated and will look into this issue. Other games do not suffer from this though, only BoS.
LLv34_Flanker Posted August 13, 2014 Posted August 13, 2014 (edited) S! Here after calibrated my monitor. In game Gamma at Default 1.0, Ultra settings, FSAA at 2x. Could maybe add a bit contrast? Edited August 13, 2014 by LLv34_Flanker
LLv34_Flanker Posted August 13, 2014 Posted August 13, 2014 S! Well, the effect can be seen "settling" when I look around, but the banding is not visible. So clearly helped. Just a question, should I use the sRGB option and then calibrate my monitor? Here a pic from cockpit..
LLv34_Flanker Posted August 13, 2014 Posted August 13, 2014 (edited) S! Well at least got rid of most of the banding I wish we had more control over the settings than these stupid presets. I would disable SSAO, Bloom and HDR right away. Edited August 13, 2014 by LLv34_Flanker
LLv34_Flanker Posted August 13, 2014 Posted August 13, 2014 S! I disabled them in RoF too. Bloom looked artificial, especially when these planes were canvas covered and not metal. HDR was a bit should I disable or not, but every FPS helps in a flight sim. Eye candy is not that important. I prefer practical graphics over too much eye candy and useless gimmicks
FuriousMeow Posted August 14, 2014 Posted August 14, 2014 (edited) In RoF I disabled bloom, I felt the same way you do about the canvas and wood. If it could have only applied to the metal cowlings, I probably would have kept it. I use HDR -Mono Med in RoF, that one provided the most realistic colors/shading for me - even compared to no HDR. Running Ultra, I really don't notice the SSAO at all in BoS. I would still like to be able to disable it, at least to compare and see if I do want to keep it on. I can't see it being disabled giving anyone an advantage over those who keep it enabled. Edited August 14, 2014 by FuriousMeow 1
LLv34_Flanker Posted August 14, 2014 Posted August 14, 2014 S! Agreed FM. HDR was a bit of keep or not, it had it's good sides as you mentioned. I can see SSAO in BoS, not even hard to spot it Like a film plastered on your screen. When you could disable it the image was a lot crisper. I wish we could do that in release version.
Matt Posted August 14, 2014 Posted August 14, 2014 I don't think Bloom and HDR are featured in this game are they? Both bloom and HDR are featured and i think they are only off when using the lowest graphic preset. I'm happy that the textures and drawing distance on balanced are the same as on the higher settings, so i'm sticking to balanced now.
LLv34_Flanker Posted August 14, 2014 Posted August 14, 2014 S! Tested Balanced. Minimal to no loss in IQ and a nice jump in FPS
Matt Posted August 14, 2014 Posted August 14, 2014 Clouds and shadows look a little bit worse on balanced, but other than that, it's basically the same as the higher presets (minus SSAO of course).
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now