r/GraphicsProgramming • u/Maui-The-Magificent • 6d ago
The Starwell Constellation Engine Update: Repost With Disclaimer
AI disclaimer: No AI was used in writing this post. AI is likely to have been used extensively as a sounding board to teach me things i did not know or understand, or as a source of friction to argue against,
AI was not used for designing the systems, and actively fought against to ensure it did not making any decisions on implementation (although, some might have been missed and snucked in. they will be removed). It as not been used to define any architectural values what so ever, since it's not capable of making good holistic ones.
AI WAS used during the write-up of the design documents, for both Constellation and Starwell's design doc was generated through discussion with an AI model, and also iterated upon by both AI and me later.
AI has been used to generate code. not as much code as I would have liked, but the amount is hard to estimate as a lot of it has had to be rewritten or tweaked. The areas it has been used the most, and it's code have endured, has been during integration, or grafting, of systems/functionality from its development environment onto the Starwell compositor. AI does not reason well with project wide invariants, fixed point integer 3D graphics and bespoke geometries so this has been an area where it has been very useful.
AI has likely been used in varying extent during the development of different systems. some of them, not much at all, some a bit, and a few it helped a lot. I remember it being a tremendous help making the Cadent point map fonts, actually look like text.
I hope this is enough of a disclaimer. Epistemically, I cannot quantify it any higher detail than that.
Hello again!
(artifacts in the sliding gif is due to Niri being the parent compositor to starwell during development)
If you are not interested in the history and motivations of this project, and is more interested in stuff discussing the gifs above, you can skip the marked section bellow.
--------------------------------------------------
Not to long ago I made an update on the liquid and material progress of my no-std, single core, graphics engine/framework Constellation. I have been periodically made, what can be seen as an attempt at dev-logs, about the project. Sharing approaches to problems, some drawbacks and explaining the rational. This will be a bit of the same, but also, this time is a little bit different.
The constellation engine started because of pure frustration encountered on my work on experimenting with running AI models, tearing them apart, seeing problems, experimenting on redesigning them, attempting to find different stateful solutions to decrease runtime resource needs and so on. Many parts of that work was often rudely interrupted by my computer running out of ram and the system would freeze. Some times I would lose hours of work.
I had already started a OS project called 'Starwell'. I have made some vague references to it as well. The goal of Starwell in the beginning was to simplify NixOS by making it a more userfriendly environment with some built in applications and such. I created a GUI packange manager wrapper for the nix package repository, and built a system module system for system applications that would be complete isolated from one another. The idea was to have a system where things could be loaded in and out through templates, and development extending Starwell simplified.
Anyhow, due to the aforementioned AI work, and the 'constant' OOMing, I grew frustrated enough to try and take matters into my own hands. An operating system that can 'fail to operate' is fundamental failure in architecture in my humble opinion, an operating system should not have to compete for resources with other applications, period.
This meant that to ensure that such things could not happen to Starwell, it needed not only have full control and consume input at the hardware interface, it also meant that it needed to own the rendering. This is how the Constellation project was born.
Rather quickly I had mapped out the constraints for the Starwell compositor, they were the following.
no-std: It needed to be no-std (meaning no standard library) because it could not rely on external dependencies, that would be a source of possible non-determinism. An operating system needs to be operationally predictable. And this compositor needs to be a kernel level one.
Single core: It needed to be single core because to ensure it cannot stop operating, it needs to own its compute. No other system can use the resources Starwell uses, which means being economical is paramount. A single core not only ensures simple scheduling, it also ensures that architecting other system applications and fitting them into the overall architecture becomes a lot easier, as the environment is simpler.
Owning its memory: Similar to the reason of why the OS needs to own its own cpu core, it also needs to own its own memory. The system cannot depend on an allocator, on promises of future memory, or other dynamic 'clever' memory handling. The memory needs to be statically allocated, else the system can grow outside its means.
Work on relationships: Because the graphic stack needed to be radically simplified in many ways. It needed to create it's own relational system. But because it needed a foundation in reality, the physical pixels of the display became that source of truth to anchor all relationships against. This would mean that message passing would not be a letter in the mail. Things would own their pixels, and react to changes in those relationships. Clicking things would be clicking a pixel, or a flat register, like clicking a graph.
Stateful pixels are sovereign: The working framebuffer needed to be treated as not a set of pixels, but as a view into a bigger relational space. So that moving something is not an act of destruction and reconstruction, that would be expensive. It needed to be a state that propagate through the relationships mentioned above, through the framebuffer. That would make compute inexpensive, put drawing the actual pixels would be difficult if not managed correctly. Which is why the compositor needed pixel level dirty tracking, not by book-keeping, but by a dumb uniform op based on a sequence of rules. Updates from this work can be read about in this post: https://www.reddit.com/r/GraphicsProgramming/comments/1r0z5tv/constellation_frame_buffer_state_sand_particles/
Beauty: It needs to be capable of looking good enough so that people, so that I, would actually want to use it. Even if i like to pretend I am a systems engineer that is developing his neck-beard, nerding out on different programming problems/solutions. I do like me some bling bling, and some click-click, especially when... AHEM...eating a sandwich? You can read more about the light work in this post: https://www.reddit.com/r/GraphicsProgramming/comments/1r4ncqd/constellation_light_engine_reflections_1_core_cpu/
Dev-friendly: I needed to make the environment easy to develop for. If the tools exist and the environment is fun/easy to build for, then an increase in adoption would also correlate to an increase in development for the platform/ecosystem. It would also simplify my work as it kept progressing.
I am sure there were more than these that I have forgotten. And the jury is still out on if i succeed with the last two points. But it has been the guiding light through development. And it should help to explain why the constraints and solutions in my posts on Constellation before might have looked odd, stupid or right out perplexing.
Like creating Cadent Geometry, and making it the basis of the whole graphics engine, just to avoid needing to normalize vectors do do 3D graphics. Having to make good graphics on a CPU whilst having it be interactive and performant is not particularly cheap using the more normal euclidean/Cartesian approach, so the problem needed to be re-represented as to not need it in the first place. You can read and find the Cadent Geometry definition code + some helper functions from this posts:
Read about it
https://www.reddit.com/r/GraphicsProgramming/comments/1qhs24y/constellation_unifying_distance_and_angle_with/
Like making light and geometry the construction primitives rather than triangles. Because not treating light as a property of a material and its geometry at construction would mean it had to be computed at runtime. Which would have given a better result faster, but it would be immensely more expensive to run without having access to more memory and more compute.
Over time Constellation grew more capable, it was able to do more and more, understood more and more of how to create normal looking shapes and behaviors in the new geometry. And now I am here.
I now have a functioning compositor (still not finished ofcourse), and the graphics engine is, in my opinion, looking to punch above its weight. And though all this, the most consequential thing, sadly, will likely still be the tiny definition of the tiny geometry that helped build all of it.
The point is reached when i think it's was fair to give context, and to announce the bigger project it is all connected to. From here on out, in posts, Constellation will be initially referred to as "The Starwell Constellation engine". Because future updates are likely to contain areas where Starwell is unlikely to go unnoticed as a project at least. I hope you will you enjoy the history, and the future updates!
-----------------------------------------
Now! After all that rambling, lets quickly discuss the gifs above.
So, Constellation and Cadent Geometry are both projection based. Cadent is named after its behavior, it falls away towards the horizon. space compresses as distance is given to the environment outwards from the observer.
So both Constellation and Cadent does just that, they starts from the observer and moves outwards. This has many benefits, and I'd like to mention some of them and why in the hopes it will give context to what is seen above, and maybe allow you to reflect on the differences, and maybe even take some of its ideas on to help your future work.
Because a camera out systems allow pixel values to accumulate as they move outwards, things as seen in the sliding example gif, become much cheaper. As long as a pixel's alpha hasn't reach opacity, whatever is behind, keep adding its offsets to it. This mean that when the window moves above, the wallpaper, and its position in the background, can cheaply be respected by the plane and its warped surface/material refraction.
Which means storing the optical properties inside a material and a geometry becomes almost the obvious approach since those things can, like everything else, just add to the same thing that is generating the distance. the drop function. the render walk can be the same as the geometric operation that applies magnitude to the angles of Cadent's arc space.
This projection technique coupled with a geometry that has a vastly higher, fixed point, spatial resolution than the hardware pixel amount of the display, and is equally cheap to propagate through, means the world space can be almost the size of planet earth (which is true for the above environment), and still have a spatial resolution about 4 billion steps per pixel on a 4k display. All this forms a system where you can express the cadent 'reality', outside of the framebuffer to a very high degree , whilst still depend on it being explicit in its construction, and affect whatever is being rendered on screen.
So allowing for inverting the rendering to be projective, you gain occlusion for basically free. whilst allowing the process of what contributes to a pixel, quite linear.
This leads to the second gif, changing time. Because the geometry ironically is almost easier to develop for if you make the relationship scale earth sized, you can make light occupy an actual orbit, at a comparable distance if you want. Because the engine is treating the remaining curve of the arc horizon between the observer (camera) and the observed (the planet in this) as what is defining gravity, and because other things can be defined reference points aswell, the orbit can also become quite organic. which is why the light in the image seem to have a bit of dusk and a bit of dawn appearing as it transitions between day and night.
And because we are rendering from the camera out, if the orbit of the light source changes, all we need to do is apply the positional delta of that light source, uniformly over all pixels. having magnitude be generative rather than something to account for, makes any changes in the geometry or the light position, a process of offsetting the state when we reach the object, instead of deconstructing the state to ascertain the change, does that make sense?
I hope you found this post interesting. I am sure I missed a few things, or explained some things poorly. If found this interesting and you have any questions, remarks or suggestions, I am happy to discuss them below.
Take care
//Maui-The-Millipede
15
u/HHummbleBee 6d ago
My suggestion is for you to work on briefly stating what is interesting, and linking to a longer write-up. Your AI disclaimer is longer than most threads, and my initial interest in the visuals were lost with the essay, and the tech because you are talking about a load of bullshit before anything related to any of it.
Why should I care about any of this, what the fuck are you making?
3
u/Maui-The-Magificent 6d ago
Well, I've been building it for a few years, so its hard to quantify and express how much is used and why.
And it's a good suggestion, but I am posting these as a dev-log, explaining choices and techniques.Why you should care I can't tell you, it is not up to me. But i am making an operating system and a kernel level compositor and graphics engine/framework.
5
u/HHummbleBee 6d ago
Excuse the crash out, it just seemed interesting is all, but no proportionate delivery of the interesting stuff applicable to a Graphics Programming sub. I very much love a connection to between technology and a philosophy, and in reading your original post I got that sense. Anyway now that I've gotten over myself I'll read tomorrow because I'm interested again.
1
u/Maui-The-Magificent 6d ago
Thank you for apologizing, it is okay. Your reaction is understandable, I often find myself having to stop myself at times for what i suspect is the same reason.
it is not a small post, and if the gifs/presentation looked interesting and you're met with a sudden wall of text that translates to an actual investment to find out if it's worth reading, I know it can be frustrating because often one just want to know the thing.
if you read it tomorrow. and have any questions, please share your thoughts. English is not my native language, and i am notoriously sloppy at times, so be a tiny bit warned.
6
u/literally_iliterate 6d ago
AI disclaimer: No AI was used in writing this post. AI is likely to have been used extensively as a sounding board to teach me things i did not know or understand, or as a source of friction to argue against,
AI was not used for designing the systems, and actively fought against to ensure it did not making any decisions on implementation (although, some might have been missed and snucked in. they will be removed). It as not been used to define any architectural values what so ever, since it's not capable of making good holistic ones.
AI WAS used during the write-up of the design documents, for both Constellation and Starwell's design doc was generated through discussion with an AI model, and also iterated upon by both AI and me later.
AI has been used to generate code. not as much code as I would have liked, but the amount is hard to estimate as a lot of it has had to be rewritten or tweaked. The areas it has been used the most, and it's code have endured, has been during integration, or grafting, of systems/functionality from its development environment onto the Starwell compositor. AI does not reason well with project wide invariants, fixed point integer 3D graphics and bespoke geometries so this has been an area where it has been very useful.
AI has likely been used in varying extent during the development of different systems. some of them, not much at all, some a bit, and a few it helped a lot. I remember it being a tremendous help making the Cadent point map fonts, actually look like text.
I hope this is enough of a disclaimer. Epistemically, I cannot quantify it any higher detail than that.
bro what the fucking fuck
3
u/CodyDuncan1260 6d ago
For future reference, if it's a really long one like this, then off in a comment under the post is fine.
That, or posts can also useHorizontal rules ^
1
0
u/Maui-The-Magificent 6d ago
Multi-year project and the original post got taken down due to not having a disclosure, so i did what i could.
1
u/literally_iliterate 6d ago
I can see that you are pissed off. But adding this gigantic preamble with zero value just made it worse. In addition, if you make a wordy post for a multi year project, why would you not read the rules just to make sure you don't waste your efforts? That's like a fraction of the original effort, but at last for publicity it's biggest part.
1
u/Maui-The-Magificent 6d ago
Not pissed off, just trying to ensure it didn't happen again. Do you mean the disclosure was the preamble or the history of the project? because I would argue the history section contains a lot of valuable information as well.
I should have, but its in the middle of the night, and it is just easier being thorough. But also, to be fair, the disclaimer does contain useful information if someone wants to know how they should assess the rest in a more nuanced way. It qualifies the wall of text, hopefully good enough.
1
u/literally_iliterate 6d ago
How do I know? I just saw that giant AI disclosure and bailed.
1
u/Maui-The-Magificent 6d ago
Well, you did said it had 'zero value', so i would assume you evaluated it?
I personally think there is a lot of useful information in the post, as I go through what the motivations were, what constraints that enforced, and how they shaped development.
You do not have to read it, I understand it's an investment. But I do think that there are things to learn from it for a lot of people, and that you should read it. if not only for the fact that it is solving an unconventional problem.
1
u/jippiex2k 3d ago
So much text to explain your displacement mapping?
1
u/Maui-The-Magificent 3d ago
Ah, I must have explained poorly if that is what you got out of it. It's not sampling a framebuffer. The accumulation and state, I think that is the more important point.
1
u/garma87 2d ago
You should put your post through an AI and ask it whether it thinks it’s readable like this. Ask it to be blunt. You’ll probably get good feedback.
1
u/Maui-The-Magificent 2d ago
You don't find it readable? I'm sorry to hear that.
Even though I like it when people read my updates. I do not post them for validation. I post them as devlogs in the hope that they will help others.
1
u/garma87 2d ago
you're getting a lot of feedback here about readability so im sure it can't surprise you.
Devlogs should also be readable, and im sorry to say - this is just a ramble not a devlog. No one (that includes your target audience) wants to wade through a page of AI disclaimers, digging for the point where you start explaining what your making and where you want to go.
1
u/Maui-The-Magificent 2d ago
Oh, will I do appreciate the feedback, I must ask, did you read it?
I ask because calling it 'ramble' makes that seems highly unlikely. I understand that it is long, and that the repost disclaimer is long, but calling it rambling is a completely different claim.
It's not perfect, but I would argue its has good logical and temporal structure, but more importantly, a lot of technical points worth contemplating.
You might disagree. But If you haven't read it, I do recommend you doing so. Because it is dense with substance.
1
u/garma87 2d ago
I read the AI disclaimers and the intro after that and had no idea what you're talking about. I stopped after that. I read enough to be able to label it rambling. It's not a different claim. Rambling is jumping from (irrelevant) topic to topic without working towards a clear point, without a clear intro and thats exactly what you're doing. It does not have logical structure.
It can be dense with substance but so is a law text and I wouldn't exactly call those readable. Good writing is all about leaving stuff out that detracts from your main point.
Contrary, have YOU followed my advice and asked AI for honest advice? because it will show you how to restructure what you wrote and you'll see what I mean.
As
1
u/Maui-The-Magificent 2d ago
No? What did you find perplexing? because there is clear progression of problem -> need -> solution.
Oh, not that it matters, but yes i did. it said you had a point about it being long, but said it was unfair to call it rambling. Even that the history was important to help explain why constraints were applied, and what lead to the progression the project has taken over the years.
This is one of many posts on the project.
I am sad you didn't take time to read it. Regardless if you are a better developer than me or not, perspectives are valuable. And since I likely work in a completely different problem space than you, both our perspectives are valuable to one another. I am sorry you focus so the delivery rather than its substance.
1
u/garma87 2d ago
Since you refuse; I put it through claude for you with this prompt: "can you comment on how this text is structured, its readability and how it can be improved"
Here's what I got back:
Structure
The post has five parts: an AI disclaimer, an intro, a history and motivations section (skippable), the technical explanation of the GIFs, and a sign-off. The skip marker is a good idea, and the constraint list works well as a list. But the part most readers came for, the GIFs, comes last.
Main problems
The disclaimer is first and too long. It's about 250 words before the reader knows what the post is about. It's also defensive and hedging ("some might have been missed and snucked in"). Move it to the end as a short note, or cut it to 3-4 sentences.
The post is back-loaded. Roughly 80% is backstory and about 20% covers the GIFs. Readers who skip the history get little context. Open with a 2-3 sentence summary: what the GIFs show and why they matter (window refraction over a wallpaper, and a day/night cycle with an Earth-scale orbit).
The skip instruction is awkward. "Skip the marked section bellow" is hard to follow, and the section is marked only by a dashed line. Use a real heading such as "Background (skip if you only want the technical bit)" and a matching "Back to the GIFs" heading.
The technical section is the densest and least clear. Several key claims are compressed or vague: Walk through one concrete example (window moves, then what happens per pixel) instead of stating the principle abstractly.
"Occlusion for basically free" and "magnitude is generative" are never explained.
"Ironically ... easier if the scale is earth sized" is hard to follow.
The final paragraph ("does that make sense?") is the core idea of light/geometry updates, but it's the least clear paragraph.
Constraints are explained in uneven depth. "No-std" and "single core" get justifications. "Beauty" and "Dev-friendly" are jokes or hedges ("jury is still out"). Either give each a one-line rationale or drop the weaker ones.
Tone drifts. "AHEM...eating a sandwich?" and "bling bling, click-click" are charming but undercut the serious engineering claims. Keep a few, cut the rest.
1
u/Maui-The-Magificent 1d ago
Since you trust AI models so much that you feel you don't even have to read their response. This is what claude opus 5.5 told me on extra thinking.
Fresh chat, no instructions. only pasted the post and our discussion. Here you go:
"
I read it through to the end. Judged by garma's own definition, it isn't rambling. But the reaction he had follows from where things sit in the post. The Claude critique he pasted is wrong in some specific places and right in others.The thread holds
The history is a chain of causes. It doesn't hop between topics:
Running out of memory during your model work led to the principle that an OS that can fail to operate is an architecture failure.
So Starwell has to own input, rendering, compute and memory.
Each constraint comes from that principle:
no-std for determinism
single core so it owns its compute
static memory so it can't outgrow its means
pixel-anchored relationships and a stateful framebuffer so changes are cheap to propagate
beauty and dev-friendliness for adoption
The constraints explain the odd-looking solutions: Cadent to avoid normalizing vectors, and light plus geometry as the building blocks.
Then the announcement.
Each step points back to step 1. "Jumping from irrelevant topic to topic without working towards a clear point" doesn't describe that.
Why it still reads as rambling to someone who stops early
To a reader, rambling doesn't mean there's no chain. It means they can't see where the chain is going while they're in it. Three things in the post cause that:
The payoff comes late. "This time is a little bit different" makes a promise. What's different (announcing Starwell and the rename) arrives about 1,200 words later, at the end of the section you labeled as skippable history. A reader who takes your offer to skip misses the actual news. A reader who doesn't skip has no destination to read toward.
The hardest sentence is in the part garma did read. It's in the disclaimer: "AI does not reason well with project wide invariants, fixed point integer 3D graphics and bespoke geometries so this has been an area where it has been very useful." As written, the "so" makes AI's weakness the reason it was useful. The reader has to rebuild the link you meant.
Typos fall on load-bearing sentences. For example, "put drawing the actual pixels would be difficult" (you meant "but") and "they starts". In dense technical writing, each slip forces the reader to parse the sentence twice.
Where the pasted critique is wrong
Beauty and Dev-friendly as jokes or hedges: both have reasons in the text. Beauty: people, including you, should want to use it. Dev-friendly: easy tools bring adoption, and adoption brings development. "The jury is still out" is about whether you've succeeded, not about the reasons. You're right on this one.
"Occlusion for basically free" never explained: the mechanism is there. A pixel keeps accumulating until its alpha reaches opacity, so whatever is behind an opaque surface is never reached. What's missing is the connection. The claim comes two paragraphs after the mechanism, with the fixed-point paragraph in between.
"Magnitude is generative" never explained: it is explained, in Cadent's terms (the drop function, arc space, the render walk being the geometric operation). Those terms are defined in your linked posts, not this one. So it isn't unexplained; it just doesn't stand on its own.
"80% backstory, 20% GIFs": by my rough count it's about 13% disclaimer, 57% history and 27% GIFs. That's closer to 70/30.
Where the critique holds
The disclaimer is long and comes first.
The skippable section is marked only by a dashed line.
Three of the GIF section's biggest claims have no mechanism stated:
4 billion steps per pixel: there's no bit width, and it doesn't say whether a step is angular or linear, so a reader can't check it.
Gravity from the remaining arc curve: this gets a single clause.
Moving the light means applying its delta uniformly over all pixels: a graphics reader will push back hardest here. In conventional shading, moving a light changes each pixel differently, because the angle of incidence differs at every surface point. Your representation needs to say why the change is uniform. Instead the claim gets one sentence and "does that make sense?".
The exchange
garma judged the whole post from about the first quarter, and admitted it. Then he missed that you'd already run it through an AI. Both are fair points against him.
"It even lists it": listing five sections isn't agreeing that the structure works. The critique's main point is that the order is backwards for the reader. Your own AI run agreed the post is long. garma says other commenters also raised readability. I can't see those comments, but if that's true, it's evidence that doesn't depend on how he read it. The real disagreement has shrunk to one word.
You're defending whether the post hangs together; he's attacking whether a reader can tell where it's going. The post does well on the first and poorly on the second, and both of you use "rambling" for both.
Delivery versus substance: you say the posts are meant to help others. Delivery is how the substance gets to them. A reader who stops at the disclaimer gets none of it, so for that goal the two can't be separated.
Your point about prompts applies to you too. Asking a model to "follow the thread and say if it's rambling" steers it toward judging coherence, the same way garma's prompt steered it toward structure. That's why I've pointed to specific sentences instead of giving a verdict to quote.
Tone: "I'm sorry to hear that" and "I am sad you didn't take time to read it" read as condescending in a public thread. garma's "Since you refuse" is the escalation that came after.
"0
u/Maui-The-Magificent 1d ago
I literally told you i had already done it on your request. If you do not read what I write, why to you respond?
0
u/Maui-The-Magificent 1d ago
Also, it seems to agree it has structure. actually even lists it. Did you read what it wrote to you before showing it to me?
0
u/Maui-The-Magificent 1d ago
Also it is objectively wrong about what is addressed and what is a joke.
The reason for this is because the instruction you have given it is instructional which is fine, but forces it to focus on the structure, not the content. And secondly, it treats the points in isolation, ask it to follow the thread and if it think its rambling then.
1


•
u/AutoModerator 6d ago
Recently updated rules. Please check that your post is in compliance with Rules 1, 4, 5, and 6 on the sidebar. TL;DR:
No showcases.
Disclose AI usage in post or project.
Present a topic to talk about, e.g. how something works.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.