Painting 1990s anime scenes in Python

(fofr.ai)

21 points | by magoghm 21 hours ago ago

12 comments

  • andai 19 hours ago ago

    That's insane. I remember a few months ago being amazed they could make a SVG of a stickman.

    I'd love to see if it works with other models too.

    I'm curious how they arrived at this, e.g. did Gemini come up with the whole workflow on its own?

    Edit: Found the author's x account. Lots of cool art experiments there along similar lines, including animated ones!

    https://x.com/fofrAI

    ---

    Edit: Gave it a try myself!

    Gemini 4 Hydrogen (high, 119kb): https://files.catbox.moe/jygbpb.jpg

    That one used up all my free agy usage for the week.

    GPT-6-Luna (medium, 5kb): https://files.catbox.moe/uwytgw.jpg

    GPT-6-Luna (extrahigh, 32kb): https://files.catbox.moe/ji6ngy.jpg

    GPT-5.6-Terra (medium, 10kb): https://files.catbox.moe/159eus.jpg

    Can anyone try with Claude, or newer/bigger GPT models?

    • vunderba 18 hours ago ago

      Yes, there have been many attempts at doing this [1] - saw a recent one where it modeled physical brushes to simulate impressionism.

      In my testing, while the results can come out okay, one of the biggest issues is that unlike a more conventional generative model, LLMs can take half an hour to an hour just to generate a single image and as you said absolutely destroy your token usage.

      [1] - https://github.com/cloveric/claude-drawing-skill

      • andai 18 hours ago ago

        It does give you a Python file you can run for free to generate more art. Here's the code for the treehouse (Gemini 4 Hydrogen):

        https://pastebin.com/be0ga75B

        > Stage 2 — Unified 3D Sun Visibility Solver (6-step Height Refinement) & Water

        lol

        I'm kind of mind blown by what it's doing here, I wonder what they trained this on.

        Although, it generates approximately the same thing every time though. I'm gonna see what happens if I vary the seed.

        Edit: Yeah, the seed controls details (grass, reflections, etc.)

        • vunderba 18 hours ago ago

          Yeah, I think you're right. I've only glanced at it but I imagine you'll get pretty much the same thing if you rerun it. It might come out a little different depending on how much RNG is involved in the python itself, but it'll probably be mostly the same.

          In response to what you said earlier aka will the resulting output change drastically based on the model?

          In my experience, big time. I recently built something similar: a custom drawing language [1] designed to be piloted by LLMs to create scenes in the style of old-school EGA DOS adventure games, with a restricted palette and everything else. It's much faster than this since its obviously a much more constrained domain, but the smaller the model you use, the rougher the images come out.

          Comparisons of a EGA steam locomotive using Deepseek, Kimi, Neon, and Qwen 3. [2]

          [1] - https://kq-styles.specr.net

          [2] - https://imgpb.com/vTZqPpr

          • andai 17 hours ago ago

            Wow that's cool! Fun to watch it get painted in.

            Have you tried running them at different effort levels? I laughed really hard when I saw what Luna generated above[0], but I reran it at higher effort and it went from 2D to 3D. You probably hit diminishing returns at some point, but I probably ran Terra on too low effort as well.

            In fact the main difference between the Gemini run (with objectively best result) and the others was that it spent way longer thinking about it. So for a fair comparison the "effort" would need to be normalized.

            [0] Edited my comment with results from various models:

            https://news.ycombinator.com/item?id=50673568

            • vunderba 17 hours ago ago

              I kind of like the GPT-6 Luna extra high one!

              https://files.catbox.moe/ji6ngy.jpg

              Visually yeah it's kind of a mess but it gives it off that sort of Paper Mario 3D vibe, with a 3D plane and the 2d paper-cutout tree house. I kind of dig it.

              I haven't actually tried experimenting different effort/reasoning levels yet, but I'm sure it would make a huge difference.

              If I had some time, it would be super fun to go through every major open-weight model from the last three or four years that I could run locally, starting with llama and then working my way up to something like the recently released inkling 2 mini to see how they handle the PicScript.

    • orbital-decay 17 hours ago ago

      > https://x.com/fofrAI

      > Here's a pelican riding a bike, using fourier epicycles.

      Facing right again!

  • LegitShady 18 hours ago ago

    no painting was involved

  • PostOnce 19 hours ago ago

    A post written by no-one to tell me nothing.

    You can ask Gemini to do stuff for you? You don't say.

    > Work by fofr's agents

    > This post was written by an agent using Gemini 4 Neon. It was reviewed and published by fofr.

    • andai 19 hours ago ago

      (Not the author) I was struggling to make sense of it, so I asked GPT to decipher the post for me.

      Basically, the LLM writes a Python program which paints a picture, then it looks at the picture, and adjusts the program. Repeat until it looks good. The process involves textures, lighting, measurements, perspective projection, etc.

      There's a prompt at the bottom you can use to try it yourself. I think it works with any LLM, though the results would probably be quite different.

      • PostOnce 11 hours ago ago

        Yes, you can ask Gemini to write a program to draw a picture... who cares? It's spam.

        • andai 5 hours ago ago

          I thought the results were quite beautiful.

          Not as beautiful as the hand painted 90s anime backgrounds of course. But if you squint a little...

          It's amazing to me the level of art skills they have. The perspective, the composition, the color, shading, texturing. There's a difference between the models (not very nice colors on GPT's part, for starters) but Gemini's ones actually look pretty good. I really wasn't expecting that.

          You know a few months ago I was amazed Claude could make a stickman drawing of a guy with a mustache. Now I'm here nitpicking over the fine details of full blown anime background paintings.

          The goalposts are in fucking orbit.