Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Taking NUFLI one step further
2024-11-10 22:46
cobbpg

Registered: Jan 2022
Posts: 36
Taking NUFLI one step further

I'm working on a new converter for creating images the C64 can display with as much freedom as possible: NUFLI Studio preview video.

The images are NUFLI with the sprite colour limitations lifted: all sprite colours outside the FLI bug area can potentially change in every row. While this is impossible in general due to CPU time limitations, the solution is to generate the speedcode that updates the registers ahead of time. The code generator can make informed decisions about dropping the least impactful register changes to fit everything into the available budget. In practice, most pictures don't require all the 10 possible colour updates on every scanline, far from it.

Another big innovation compared to Mufflon is the improvement in conversion speed. Lifting the sprite colour change limitations makes it easy to fully parallelise the brute force colour search step for each 48x2 pixel area (or 24x2 pixels over the FLI bug), and this allowed me to implement it as a compute shader. The whole process takes about 0.25 seconds on my three-year-old gaming laptop. Besides, when using the internal editor, only the affected areas are recomputed, and they can be previewed in VICE right away (note that the video shows some lag that's probably introduced by OBS somehow; it doesn't happen outside recording).

My hope is that making the feedback practically instantaneous (even when using an external image editor) opens the door for pixel artists to develop a much better intuition about this image format. Also, removing the limitation of only changing sprite colours every second row should make it a lot less frustrating to work with.

I'm not sure what to call this image format. This is 95% NUFLI, the only real difference is that the speedcode is also generated ahead of time (when run on NTSC, there's a patching step done by the displayer routine to make it work), so the files are 4096 bytes bigger (they load from $1000 instead of $2000, the rest of the structure is almost identical). I'm leaning towards "NUFLI2" to make it somewhat search engine friendly, but I'm open to ideas.

At the moment I'm in the process of writing a manual for the tool and a deep-dive article about the technical details. Hopefully neither of those will take too long!
 
... 76 posts hidden. Click here to view all posts....
 
2024-12-06 13:08
cobbpg

Registered: Jan 2022
Posts: 36
Yeah, those sound reasonable and easy to implement. Added them to my todo list.
2024-12-06 22:57
Oswald

Registered: Apr 2002
Posts: 5095
wow this last example pic is shockingly good, just drop the clouds near the cup, and it will be ok :)
2024-12-07 17:39
cobbpg

Registered: Jan 2022
Posts: 36
One idea I'd like to try is to be able to draw an importance mask in the editor, where you could mark certain pixels such that they would be less likely to change during conversion to layers, for instance by multiplying their error metric with a constant.
2024-12-08 20:17
Cybortech

Registered: Jan 2009
Posts: 16
Please convert this:

https://ibb.co/ZNjf9yW

https://i.ibb.co/vDFc92Z/bonzai-logo.png

Thank you!
2024-12-08 20:43
cobbpg

Registered: Jan 2022
Posts: 36
You should be able to play with the converter yourself: NUFLIX Studio 1.0. I also recommend checking the manual.

If you're not on Windows, you need to make your own build for now. If you're not familiar with Unity, here are the steps to do so:

1. Clone the project from GitHub (you can also download the source as a zip archive from the above link if you don't want to deal with Git).
2. Download and run Unity Hub.
3. Use the Add button and select the NuflixStudio directory.
4. Let the Hub download the correct Unity version (6000.0.3f1). Make sure to include build support for the platforms you need.
5. Open the project.
6. Select File → Build and Run. In case that doesn't work out of the box, check File → Build Profiles.

That said, this Bonzai logo is a pretty good adversarial example, because the X-expanded underlay really cannot reproduce the edges well in the middle section.
2024-12-08 23:24
Digger

Registered: Mar 2005
Posts: 438
@Cyborthech: Ah that part from Lethal Display 4, it would be fun if it worked and suddenly the entire logo gets revealed... https://youtu.be/BHWpX-EB8UY?t=7082
2024-12-09 16:49
Oswald

Registered: Apr 2002
Posts: 5095
@cobbpg

I am on a 1366x768, and the nuflix window tries to resize itself to this, it seems it resizes all elements inside the window and I get horrible artefacts on the preview window, every 32 or 64 pixel sized quare block the pixels are doubled or not doubled.

Somehow you should tell the gui to never resize the preview windows, make it always 320x200 or double, etc.

also when I try to resize the window it always just wants to stay fullscreen.
2024-12-09 19:31
cobbpg

Registered: Jan 2022
Posts: 36
Thanks for the report, I'll look into that too for the next version. I set the default window size to 1600x900, and that might be part of the problem. As for the preview images, I can change the logic to ensure that they are only scaled by integer factors.
2024-12-09 19:51
Cybortech

Registered: Jan 2009
Posts: 16
@Digger: Yes! : )
2024-12-09 19:51
The Sarge

Registered: Aug 2002
Posts: 49
I really appreciate you making the effort coding this! Great work.

But after some testing I dont think I will ever be able to use this though. Its too unpredictable for my liking. Too much trial and error to make it work.

However some advice if you want to upgrade it.

- Zoom with scroll wheel on mouse.
- Pan by holding space key+left click on mouse to drag canvas around. Could also be scroll wheel click and hold to pan.
- Primary and secondary colour on left and right mouse buttons.
- A color picker tool. ALT+ left click on a color to set this colour as your primary color, ALT+right click to set secondary.
- Pixcen or Pepto palette. The one in the tool right now has very weird colours.
- Bucket Fill tool.
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Matt
map/Plush
johny
MWR/Visdom
sln.pixelrat
Knobby/Role
encore
commodore_freak
E$G/HF ⭐ 7
Mason/Unicess
Guests online: 120
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Coma Light 13  (9.6)
4 Edge of Disgrace  (9.6)
5 Mojo  (9.6)
6 Uncensored  (9.6)
7 The Demo Coder  (9.6)
8 Comaland 100%  (9.6)
9 What Is The Matrix 2  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.7)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 Morph  (9.5)
7 Dawnfall V1.1  (9.5)
8 Libertongo  (9.5)
9 Katzen-Video.mp4  (9.5)
10 Onscreen 5k  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Oxyron  (9.3)
3 Performers  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Coders
1 Axis  (9.8)
2 Sailor  (9.8)
3 Graham  (9.8)
4 Crossbow  (9.8)
5 Lft  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.244 sec.