I have to say, when the rendered passes the acceptable minimum for their graphics, by the given deadline, then it ships.
I don't believe graphic developers want their games to look sh*t, but sometimes the amount of effort to fix these problems don't pay up. Plus, studios/publishers will happily spend more in content than graphical fixes because it thrives sales.
https://www.youtube.com/watch?v=_IB2E03loAk
#Videogames #Gaming #Games #Graphics #Technology #TAA #Antialiasing #TemporalAntiAliasing #Video
Ieri sera, una roba che davvero mi ha fatto perdere la pazienza e ogni speranza, maledetto web development, avevo iniziato a scrivere questo post ma ho poi deciso di a mimire… in pratica, il Canvas HTML5 è inconsistente, tra diverse funzioni, diversi browser, e a tratti è proprio buggato mi sa. In breve: non si può tracciare linee o contorni puliti lì dentro, viene tutto sfocato, mannaggia!!! 😶🌫️️
Beh, non è la prima volta che scopriamo che la roba nei browser gira a furia di hack, quindi non so perché proprio questa volta sono così spiazzata, però questo è. Ho scoperto questa magagna dopo aver notato che, i bordi di rettangoli nel programma che sto facendo, che sono puliti su Firefox, appaiono tutti blurrati in Chromium. Ho fatto qualche test al volo, e notato che cambiare lo spessore dei tratti sistemava il problema su un browser e lo faceva apparire sull’altro. “Sarà colpa di p5.js“, ho pensato, “ti pare che nei due browser web più grandi al mondo ci sono gli spacc?“… e quindi ho cercato. Big oopsie, perché una issue l’ho trovata, ma da lì ho scoperto che p5.js in realtà non centra. E… ecco, facendo dei test con la API Canvas liscia, senza la libreria esterna di mezzo, persiste il problema. 👹️
Ho fatto un piccolo file con vari test: jsbin.com/dadobugiye/ (caricato su JSBin, così potete verificare anche voi). In foto c’è a sinistra come ha renderizzato Firefox, e a destra Chromium (entrambi chiaramente sul mio desktop Linux). Tra le quattro linee spesse da 1 a 4 pixel, e i tre rettangoli con bordo da 1 a 3 pixel, notate come a spessore alternato si alternano anche la presenza e l’assenza di sfumatura. Quello che cambia tra la copia superiore e quella inferiore è che sulla seconda è applicato uno shift di 0.5 pixel sia per X che Y (la seconda soluzione più brutta tra le consigliate)… appunto, fare questa cagata pulisce ciò che prima era sporco e sporca ciò che era pulito. 🚬️La schifezza è dovuta al fatto che il browser fa anti-aliasing di ciò che disegna lui, e non c’è modo di disattivare la cosa; c’è una proprietà imageSmoothingEnabled
che vale però solo per i dati immagine raw (forse è per questo che non ho mai notato problemi con, ad esempio, gli emulatori web di console). Quindi, in teoria si potrebbero implementare da zero funzioni per disegnare linee e roba varia, che scrivono direttamente i pixel sulla tela… ma non sembra qualcuno abbia voglia di implementarlo in librerie grafiche general-purpose e che non deviano troppo dalla API. (Io certamente no.) Shiftare ogni azione di disegno di 0.5 pixel in base al browser può sembrare una soluzione (dato che il problema è causato dall’allineamento subpixel, e ci sarebbe il metodo .translate(x,y)
per farlo senza ogni volta sommare alle coordinate), ma non lo è affatto, perché lo vedete come le linee e i rettangoli appaiono tra loro diversi (e, curiosamente, le linee sono uguali tra i due browser)… 💱️
Computer potentissimi e piattaforme software di complessità estrema e potenzialità infinite, ma poi non riescono a fare delle fottutissime linee non sburrate, stiamo tornando indietro. E falliscono appunto in modo pure inconsistente!!! Non sembra proprio esserci soluzione, se non creare delle mie astrazioni sulle funzioni di disegno di linee e rettangoli (che fanno in autonomia gli shift necessari ogni volta). Veramente sto male, è possibile che se il mio numero arbitrario di spessore in pixel è pari o dispari, a seconda del gusto del browser e dell’allineamento .0 o .5 a subpixel, deve venire tutto: o grigino anziché nero, o spesso di 2 pixel anziché 1 (o la qualsiasi), o coi bordi sciolti in lava? Per ora continuo a usare p5.js e quindi il disegno a forme sul Canvas per questa applicazione, perché è comodo, ma per i prossimi progetti chissà che dovrei usare… nulla si avvicina neanche lontanamente all’efficienza di scrivere del JavaScript vanilla e averlo immediatamente prendere vita. 🤢️
Ho provato anche un’altra soluzione di tizi, un po’ brutta ma che avrei accettato se avesse funzionato: applicare un dato filtro SVG… che dire. Vero, non si vede più alcuna sbleurratura, ma gli angoli dei tratti sono più arrotondati (non chiesi), e lo spessore è comunque sbagliato. E una cosa stramba bonus: i lati delle linee superiori (ma non di quelle shiftate?!) sono tipo corrotti, hanno dei pixel che appaiono un po’ a sinistra come delle spine. Ma come cazzo è possibile?!?!?! 🌋️https://octospacc.altervista.org/2024/06/07/tela-spaccata/
#antialiasing #blur #broken #browser #bug #Canvas #demo #disegno #HTML5 #inconsistente #JavaScript #JSBin #Mannaggia #pixel #problema #prova #sfocatura #subpixel #test #web #webdev
I wrote a blog post about how to efficiently render polygons on slow microcontrollers while still looking reasonably nice!
It contains an intuitive explanation (with lots of images!) how it works, and an explanation of the algorithm itself in pseudocode.
https://aykevl.nl/2024/02/tinygl-polygon/
You can see the result below, which is an analog clock that's part of my smartwatch project.
Est-ce avéré? Pour une application simple de dessin sur Mac OS qui fasse de l'anticrénelage (antialiasing) mon seul choix (tout de même excellent) est Lorien?
https://github.com/mbrlabs/Lorien
y'a un lag conséquent par contre: plus de 0.5s sur mon vieux macmini 2014. Le zoom in/out infini est pas mal cool par contre. Fait avec le "Godot Game Engine".
I've figured it out! The new algorithm I wrote is partially based on the classic A-buffer algorithm from 1984 and partly on the "Scanline Edge-flag Algorithm for Antialiasing" paper from 2007. It looks pretty nice, even though it's not perfect (and slower than my previous attempt). Now I just need to clean up the code, write tests, and optimize the code some more.
I plan on writing a blog post describing the algorithm in more detail.
Still working on my #Vulkan engine.
Have a very basic #raymarching scene running now :D
Next up will be adding #antialiasing
Caros #cibercamaradas tenho experienciado um #bug que nunca me surgiu em #gimp.
Ao renderizar o texto, o #antialiasing é exageradamente óbivo, ficando delineado em todos os steps de zoom incluindo a 50%, 100% (conforme o exemplo).
Já dei voltas à configuração, alterei os níveis de hinting e também não houve updates recentes...
Estou em #debiansid com a versão 2.10.34 instalada através dos repositórios oficiais.
Real life #antialiasing handrail effect in my neighborhood
OLED & subpixel fonts: Very detailed tech description of adapting a text rendering algorithm to newer types of displays
https://github.com/microsoft/PowerToys/issues/25595
#antialiasing #typography #rendering #cleartype #fonts #oled #+
@gsuberland as a graphics dev, I believe it suggests the existence of singlestition and multistition. #antiAliasing
@minzmade Ein Bekannter möchte Fledermausgeräusche visualisieren. Dazu habe ich ihm Baudline empfohlen und freue mich über deinen Tipp mit #audioprism. Jetzt muss noch ein 192kHz USB Soundgerät gefunden werden, bei dem ich den #Antialiasing Tiefpass ausbauen kann.
approach is better than the old one. Or you're needing something extra in your lines (#antialiasing, different widths, #gradients, etc). There's just no "get-out-of-ridiculously-low-level-optimization free" card. You do it or you underperform.
Today in #graphics you still need to optimize, but at far higher levels; the vast majority of people are totally divorced from the #hardware and the drawing of low-level primitives. But "Back In My Day...", that just wasn't an option!
La technologie d'antialiasing TAA pose problème pour les textes !
Exemple ici dans le jeu Pinball FX (en accès anticipé) et avec FXAA pour comparer.
TAA a son lot de critiques et, dans un cas comme celui-ci, je peux les comprendre.
Il y a même un subreddit anti-TAA, c'est dire : https://www.reddit.com/r/FuckTAA/
I wrote exrmean because I found a way to emulate Fragmentarium-style multiple #subframe #antialiasing with #KF: render a zoom out sequence with the zoom size set to 1 (so each image shows the same location).
With jitter enabled, the pseudorandom seed for subpixel offsets is incremented each frame, so the images will be slightly different.
Averaging them all (in linear light, as used in EXR) will give a final image with higher quality than any individual frame, without having needed to render a huge image and downscale it (the previous option).
Enable "reuse reference" to avoid calculating it each subframe (unfortunately the series approximation is recalculated, which is not optimal).
Probably better than using vast amounts of temporary space for EXR files in this method would be to extend KF to do the subframe rendering itself. That'd be much more work than this quick hack though.
Canon Patents IBIS-Powered AA Simulation Tech, Similar to Pentax

Canon has applied for a patent that would allow a camera to use its in-body-image-stabilization (IBIS) to approximate the effects of an anti-aliasing filter. The idea is similar to how sensor-shift multi-shot works, but in reverse.
The application -- which was found by Northlight Images and shared by Canon Rumors -- notes that Canon is proposing a way for the sensor to shift during image capture in such a way that it approximates how an anti-aliasing filter works.
As Northlight Images writes, the idea "uses fine movement of the sensor stabilization system to perform one of the jobs of the anti-alias filter for the AF system and address problems of sampling and spatial aliasing. A version for DPAF and contrast AF is discussed… The fine control of sensor positioning is also part of a multishot super-resolution solution, where a traditional AA filter might also get in the way."
If this idea sounds familiar, it is because it is a technology that Pentax has been using in its cameras for several years, including the most recently announced K-3 Mark III. The video below shows how the technology works:
Basically, unlike sensor-shift high-resolution photo modes that use a camera's image stabilizer to capture more data and compile a high-resolution image in-camera, this feature would quite literally do the opposite and move the sensor to effectively blur the image slightly and give the appearance of an anti-aliasing filter.
As Ricoh explains:
Based on original ideas and innovative technology, Pentax has developed the world’s first AA filter simulator, which reproduces the effects created by an optical AA filter. By applying microscopic vibrations to the CMOS sensor during exposure, the K-3 minimizes false color and moiré. You have a choice of three settings to obtain the desired effect: “TYPE 1” to attain the optimum balance between image resolution and moiré; “TYPE 2” to prioritize moiré compensation, and “OFF” to prioritize image resolution. Thanks to this innovative feature, the K-3 offers the benefits of two completely different cameras — the high-resolution images assured by an AA-filter-free model, and minimized false color and moiré assured by an AA-filter-equipped one. You can switch the AA filter effect on and off as you wish.
This feature is not magic, however, and has limitations. Using a camera's image stabilizer on a pixel-level like this while shooting has some tradeoffs. For example, Ricoh states that the AA-filter effect is "more evident" when a shutter speed of 1/1000 second or slower is used, which dramatically reduces the feature's usability in anything other than brightly lit conditions.
For those unfamiliar, anti-aliasing filters -- also known as optical low-pass filters -- were designed to deal with a situation where the spatial frequency of what a digital camera is trying to photograph was smaller than the pixel spacing on a sensor. This is most commonly found when taking photos and videos of tight patterns on fabrics or wide-angle shots of buildings where windows are particularly close together. The resulting visual discrepancy is referred to as moire, which is a French term that means "watered textile" and accurately describes what the visual effect looks like: wavy water. An optical low-pass filter was placed in front of the image sensor in a majority of digital cameras up until the last several years and would make the moire less noticeable or have it disappear entirely. The side effect, however, was a drop in perceived sharpness.
Chart from Canon's patent.
Pentax and now Canon are not the only companies that have tried to come up with ways to give photographers a way to turn the idea of an anti-aliasing filter on and off. Sony pioneered a digital low-pass filter technology into its RX1R Mark II camera.
"Splitting of incident light flux is controlled by varying voltage to the liquid crystal between low-pass filter one and low-pass filter two in order to activate, deactivate, and modify low-pass filter effect. LPF bracketing simplifies comparison of LPF effects," the company writes.
Because it was electrically controlled and responded nearly instantaneously, photographers could configure how it would work and even apply an "auto" mode to it. It's unclear as to why this feature is only in a fixed lens camera and not found in any of Sony's Alpha cameras, and that may be related to the fixed-lens nature of the RX1R Mark II.
Another reason it might not be in other cameras is the need for an optical low-pass filter is disappearing.
It used to be that anti-aliasing filters were quite common, but in the most recent releases by most manufacturers, it is not a feature that even makes it onto the public-facing specifications sheet. This is because as cameras grow in resolution and have smaller and smaller pixels, the incidence of moire even without an anti-aliasing filter has fallen dramatically. Basically, it has become less likely that the subjects photographers are taking pictures of have a spatial frequency that is smaller than the distance between pixels on modern sensors.
As a result, some may find it a bit odd to see Canon attempt to patent a technology to address a problem that has been shrinking in importance over the last few years. Additionally, since Pentax clearly already uses a similar technology, Canon's patent has to obviously do something different in order to get around the fact a competitor has been using a similar idea in the market for almost a decade. You can read the full patent application here.
#equipment #news #technology #antialiasing #canon #canonpatent #ibis #inbodyimagestabilization #opticallowpassfilter #patent #pentax #ricoh #sensorshift #sony
@adnan360
Oh we see in your screenshot what you mean now. That is interesting. The font 'Arial' or 'Helvetica' might be different or rendered differently on your system/browser?
By the way Klaus that font family is generally covered by simply 'sans-serif', no need to mention the other fonts.
We remember reading that you can turn off #subpixelRendering effects (like #antiAliasing) using CSS, but that's not happening here.
@jasper close, but not quite: I would want to disable #antialiasing for those shapes, rather than enable it.
To make things worse, this image contains text shapes next to the box shapes. For those, I actually do want anti-aliasing.
After some more research, I found out this is actually possible! For the 'boxy' shapes, I can set the 'shape-rendering' to 'crispEdges' which has exactly the effect I was looking for.
https://graphicdesign.stackexchange.com/a/99054/160951
https://dev.w3.org/SVG/profiles/1.2T/publish/single-page.html#painting-ShapeRenderingProperty
Do you like my #antialiasing method?
Check this out. Once you click the image you get the feeling!
It's not a #honeypot. Don't be scared to click it.
It just serves education purposes for students to easily understand what antialising and aliasing is.
Here is my Hayabusa. Like a glove! :scremcat: