HNHacker News
TopNewBestAskShowJobs

elengyel

273 karma · joined January 25, 2020

submissionscomments
elengyel··on SDF vs. MSDF vs. Slug: GPU Text Rendering
* The provisional patent application for the Slug algorithm was filed on March 27, 2017, and this is incorporated into the final patent at the beginning of the Description section. A provisional patent establishes a priority date for everything it discloses (which was the whole algorithm), and it gives the inventor one year to complete the application process.

* The JCGT paper was published a few months later on June 14, 2017, after the priority date.

* The final patent application was submitted on February 1, 2018, before the one-year deadline.

* The patent was granted about 1.5 years later by the USPTO on August 6, 2019.

elengyel··on A Decade of Slug
> All modern vector renderers I know of avoid triangle rasterization entirely.

Well, now you know of a modern renderer that does use triangle rasterization. The reason is simple -- Slug was designed to render text and vector graphics inside a 3D scene. It needs to be able to render with different states for things like blending mode and depth function without having to switch shaders. It also needs to be able to take advantage of hardware optimizations like hierarchical Z culling. And sometimes, you need to clip glyphs against some surface that the text has been applied to. Using the conventional vertex/pixel pipeline makes implementation easier because it works like most other objects in the scene. Having this overall design is one of many reasons why a huge swath of the games industry has licensed Slug.

elengyel··on A Decade of Slug
You don't seem to have grokked the main feature that makes Slug interesting. The algorithm handles every single possible case uniformly through the use of a very fast classification and root eligibility determination technique. On some GPUs (including all NV from the last 10+ years), handling the full set of cases shown on the poster reduces to a single instruction (LOP3). The algorithm also eliminates all numerical precision issues -- provably -- making it the most robust of all time. There are no valid inputs for which the algorithm fails, so to say Loop-Blinn is somehow more robust is incorrect.
elengyel··on A Decade of Slug
Thanks -- nice to hear from you!
elengyel··on A Decade of Slug
The Slug Library can convert each cubic curve into a small set of quadratic curves that approximate extremely well.
elengyel··on A Decade of Slug
Vello is intended more for general vector graphics and would probably perform better with pictures containing lots of large paths. Slug is designed specifically for rendering glyph-like objects and would perform better with lots of text and icons.
elengyel··on A Decade of Slug
Glyph complexity has no effect on the calculations done in the pixel shader and does not change how glyphs are preprocessed. There are no edge cases. If you'd like to see some ridiculously complex fonts get rendered with Slug, check out the 8th page in the demo at sluglibrary.com. Some of those individual glyphs are composed of over 1000 Bézier curves!
elengyel··on A Decade of Slug
The plaque was a personal order from one of the many companies that make them. What you actually get from the USPTO looks like this: https://x.com/EricLengyel/status/1159917092331642880/photo/1
elengyel··on A Decade of Slug
I took care of the whole thing myself without lawyers, so I ended up paying something like $950 in various filing fees.
elengyel··on The Transwedge Product
I don't think you're missing anything. One of the goals of this article is to demonstrate how geometric algebra is really just another part of exterior algebra anyway. However, performing transformations in spacetime with the geometric product might make some things easier to understand, but I'm not making any strong claims about that. This article contains a small glimpse of what I'm talking about: https://terathon.com/blog/relativistic-quaternions.html
elengyel··on Poor Foundations in Geometric Algebra
My position is that the geometric product and antiproduct are good for one thing, performing transformations with sandwich products q ⟑ p ⟑ q̃ or q ⟇ p ⟇ q̰ and composing those transformations. Literally everything else (join, meet, contraction, expansion, projection, inner product, norm, ...) can and should be done in the exterior algebra without any geometric products.
elengyel··on Poor Foundations in Geometric Algebra
Hi Alex -- In PGA, every operation comes in pairs. There are two exterior products, two inner products, and two geometric products (and the list goes on). If points are represented by vectors, then the quaternion-like sandwich qpq* with the geometric product, where q is now a more general operator in the algebra, always fixes the origin. Thus, it cannot perform Euclidean isometries in regular space because those (in general) move the origin. However, a fixed origin in regular space means that the horizon is fixed in antispace, so if you were to reinterpret vectors as planes instead, then you do get the set of Euclidean isometries that you want. If you had no knowledge of the geometric antiproduct, then you would just say "vectors are planes" and call it a day. That's where plane-based GA comes from. Just use the geometric product and interpret all geometries in antispace instead of regular space. But this throws out the geometric intuition shown in Figures 2.4, 2.5, and 2.7, where vectors, bivectors, and trivectors are simply projected into the w=1 subspace to de-homogenize points, lines, and planes. Furthermore, we need the general notion of product-antiproduct pairs to get things like norms working, anyway, so we might as well use them to avoid dualizing all the geometries.

The space/antispace duality is discussed in Section 2.6, and the fact that the geometric product fixes the origin is discussed in Section 3.5.1. (In case anyone else is wondering, I know ajkjk has a copy of my book.)

elengyel··on Poor Foundations in Geometric Algebra
I think Macdonald's book is very concise and clean compared to others, but it does have some of the same issues that I wrote about in my post. In particular, Definition 6.15 gives one of the problematic definitions of the inner product, and Definition 6.23 gives the same broken definition of dual that has an inconsistent orientation and fails to extend to the degenerate metrics of projective algebras. Has also says, at the bottom of page 111, that the Hodge dual can't be defined directly in the exterior algebra, which is not correct.
elengyel··on Poor Foundations in Geometric Algebra
Unfortunately, the Lundholm and Svensson text you've cited suffers from the same problems I wrote about in my post. Definition 2.7 connects the interior products to the scalar product, not the inner product. Definition 2.8 gives the same broken definition of dual that has an inconsistent orientation and fails to extend to the degenerate metrics of projective algebras.
elengyel··on Back in 1993, I was taking a number theory class
I don't remember the exact details, but I did try the G command, and it didn't work out. The problem was something like the program had nowhere to return to, so just ending with RTS would crash, and ending with a call to ExitToShell() would just restart At Ease and put you right back in the secure environment. I had to trick the computer into executing the program as a subroutine from inside another running program, which is accomplished by using the drag hook.
elengyel··on Back in 1993, I was taking a number theory class
I'd very much like to revive my old code (which I still have) at some point and see how well it runs on modern computers. My guess is that a typical 64-bit ~3 GHz quad-core machine could accomplish the same task in a few minutes today.
elengyel··on Back in 1993, I was taking a number theory class
I'd like to clarify that my code was running only on machines that were otherwise idle. Not many people were in the lab late in the evenings. MPQS processing nodes could be added and removed dynamically, so if somebody needed a computer that was part of my cluster, they could just quit my program and everything would go back to normal.

Also, once the number theory professor learned of what I had implemented, he worked out an agreement with the lab manager to give me legitimate access to the machines. :)

elengyel··on Projective Geometric Algebra Done Right
Right, the post was not intended to be any kind of introduction or tutorial, but rather more of an announcement to those already familiar with the subject that there exists another way of doing the math that doesn't require inverting the dimensionality of points and planes. I will be writing some much longer that introduces the material properly and goes into much more detail with plenty of figures.

Here's an excerpt from pages 153-154 in FGED1 (https://www.amazon.com/dp/0985811749/?tag=terathon-20) that explains my reasoning about "anti" and "pseudo" with regard to vectors, but it also applies to everything else:

In the n-dimensional Grassmann algebra, a 1-vector and its complement, which is an (n - 1)-vector, both have n components. We give the complement of a vector the special name antivector because it corresponds to all of the directions in space that are perpendicular to the vector, excluding only the one direction to which the vector corresponds. An antivector is everything that a vector is not, and vice versa. T hey are opposites of each other and stand on equal ground with perfect symmetry. Since vectors and antivectors have the same numbers of components, a clear distinction is not always made between the two in much of the existing literature, and an antivector is often called a pseudovector because its transformation properties are different from an ordinary vector. However, the prefix "pseudo" tends to induce a characterization of lower status through its meaning of "false" without adding any descriptive value to the term, whereas the prefix "anti" accurately depicts an antivector as something that "opposes" its complementary vector.

elengyel··on Projective Geometric Algebra Done Right
Doing rotations about arbitrary points in geometric algebra requires the use of dual quaternions, but I agree that virtually every presentation of that material is awful. I'm trying to change that.
elengyel··on Projective Geometric Algebra Done Right
I think you might like Foundations of Game Engine Development, Volume 1. (http://foundationsofgameenginedev.com/) It focuses on practical uses of Grassmann algebra and doesn't avoid doing real-world calculations with actual coordinates. It also doesn't dwell on extraneous theoretical material that isn't directly necessary for getting your work done. Source code is included for all the operations.