Comments (5)
You know what? There are enough people who'd like this, that it's worth taking into serious consideration. Just gonna blue-sky brainstorm it.
So, first, there's some setup work to draw a texture containing an arbitrary string:
- extract the array of strings from the URL
- load Chicago.woff
- Wait till the font is loaded (FontFaceSet.check())
- Create a 2D canvas, style it with the loaded font and fallbacks, and render each unique character in the strings.
- Spoof an SDF by blurring them or something, this could look awful to be honest
- Assemble the texture
Then, the strings would need to be drawn in the grid somehow so that they're legible, but also look like they belong in the existing effect. The current rain pass uses mathematical functions to make waves of brightness roll down the cells in a column; the problem with this is, there is no actual relationship between any two cells, even if they're neighbors. They cycle their glyphs, but not in any way that guarantees any two characters appear next to one another, let alone for long enough and with other glyphs to be readable.
Maybe there could be a second compute shader that "overrides" the brightness and glyphs in a column, storing the result in a separate buffer of cells. This shader could basically scroll the strings down every column, either one after the other or on separate columns, with some gap between them. The open question would then be, what brightness would they be? Maybe they'd be the maximum of whatever brightness is specified in the rain pass, and some minimum brightness, to guarantee the whole thing is readable.
At the moment I'm tied up expanding the default glyph set to include the additions in The Matrix Resurrections, which adds about a hundred new symbols. So support for custom strings probably won't be possible until sometime in 2022. But as long as folks with strings that aren't in the Chicago typeface aren't bothered with some inconsistencies, and even though the existing project isn't optimized for displaying specific text, it's not an unreasonable request. Other projects might be able to more easily accommodate it in the meantime.
from matrix.
emojis would be great.
from matrix.
That was quite a write up.
Your code is much more complex than the ones I had tinkered with on this before. But none of them included the waves of lighting that would cause the rain to be altered. (or font atlases, learned all about them from reading your code)
from matrix.
I think what we're seeing is a classic technical tradeoff. I set a goal to render the glyphs and their cycling as faithfully as I could to what I'd seen in the trilogy, and made a series of decisions in pursuit of that goal which made the project progressively less capable of displaying dynamic information.
Fortunately, while I'll take a while to get around to experimenting with this particular idea, there are plenty of other interpretations of the code rain on Github that may be better suited for the task!
from matrix.
Still, this is a great idea!
from matrix.
Related Issues (20)
- skipOutro HOT 1
- Major Feature: dynamic parameters HOT 2
- Image displays upside-down with effect=image HOT 5
- Colors and intensities of glint and cursor should be separate properties— and colors should stay within their gamuts HOT 2
- Not an issue, congrats for this project HOT 1
- Background color with opacity or transparent HOT 1
- Feature Request: add an appropriate sound effect for falling digital rain HOT 4
- Feature Request: Animate between a "start" width and a "final" width HOT 4
- Request : ability to change every setting HOT 1
- Feature Request: render the effect to a transparent canvas HOT 2
- Improvement: modify the "operator" version to more closely resemble the effect in the original film HOT 2
- Feature Request: support Spout or NDI output HOT 1
- Unexpected behavior: intro with negative fallSpeed fills the screen with cursors HOT 3
- Change default version HOT 2
- Set as Windows Terminal background HOT 1
- Missing "6" character in custom font HOT 1
- Request: Set a custom image via JavaScript as a base64 string HOT 2
- Custom fonts and symbols HOT 1
- Feature request: finer control of the "distance" between raindrops, ie. wobble parameterization HOT 1
- Available to download these animations? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matrix.