3 ms·
This is one of those things that feels like a broken/half-assed/oversimplified implementation got completely proliferated into the world a long time ago and it
by hnuser123456 2y ago
This is one of those things that feels like a broken/half-assed/oversimplified implementation got completely proliferated into the world a long time ago and it took several years for the right person to do a full-depth mathematical analysis to reveal what we should've been doing all along. Similar to antialiasing and sharpening, texture filtering, color spaces and gamma correction, etc.
It reminded me of this article specifically: https://bgolus.medium.com/the-best-darn-grid-shader-yet-727f9278b9d8 https://bgolus.medium.com/the-best-darn-grid-shader-yet-727f...
- idbehold 2y agoIt's quite astonishing how complicated it is to draw lines in 3D graphics. As a novice it was a little unbelievable that the primitives for drawing lines was effectively limited to a solid screen-space pixel wide line. Want to draw a 2 pixel wide line? Do it yourself with triangles.
- pixelesque 2y agoIronically, back in the OpenGL 2.0 days, it was a lot easier to do things like this.
- badsectoracula 2y agoWell, technically the API is still available pretty much everywhere (be it directly or via a wrapper library) and most hardware still has support for drawing lines, so it is still easy in current days to do things like this too :-P. I'm using it all the time when i want to draw lines in 3D. (though as far as lines and OpenGL is concerned i remember reading ages ago that not even SGI's implementation had full support for everything OpenGL was supposedly able to do)
- pixelesque 2y agoThe API still exists, but in most implementations things like line styles and thickness are no longer supported.
- badsectoracula 2y agoNot sure about line styles but so far i haven't seen any implementation that doesn't support line thickness (though i only use OpenGL on desktop).
- prideout 2y agoThe fact that triangles have proliferated is not due to half-assery. Hardware can rasterize them very quickly, and a triangle can have only one normal vector. Quads can be non-planar. It's true that quads are nice for humans and artists though! As an aside, Catmull-Clark subdivision has been around since 1978, which, as a first step, breaks an arbitrary polyhedron into a mesh of quadrilaterals.
- spookie 2y agoYeah, I don't think triangles will go away anytime soon. And, sometimes they're even preferred in certain cases by artists (think creases on jeans).
- hnuser123456 2y agoIt's not so much that triangles are the primitive, as much as our logic for combining multiple triangles into a mesh and texturing, lighting, and deforming them in continuous ways clearly has some gaps. It's definitely not an easy problem and it's a fun exercise to see how various silicon innovations unlocked increasingly accurate solutions, and what corners needed to be cut to hit 30fps back in the day.
- AlienRobot 2y agoThis seems to happen really often! I think I remember there was another one being about color blending being done on the wrong gamma space on GPUs?
- meindnoch 2y agoFor most workflows this is a non-issue. When texturing a triangle mesh, the distortions are baked into the texture map, so no seams are visible at the quad diagonals.
- TinkersW 2y agoIt in no way replaces triangles, and very few will use it for good reason. Why? In many cases modern renders use triangles only a few pixels in size, you won't see C1 discontinuity at that size. All the outer edges of quad still have C1 discontinuity between other quads, all it fixes is the internal diagonal It has performance & complexity overhead
- 127 2y agoFor someone who wrote textured triangles on a 386: First rule of computer graphics: lie Second rule of computer graphics: lie Third rule of computer graphics: lie