Pictoric (was: New conversion algorithm)

The Oric video chip is not an easy beast to master, so any trick or method that allows to achieve nice visual results is welcome. Don't hesitate to comment (nicely) other people tricks and pictures :)
User avatar
kenneth
Flight Lieutenant
Posts: 318
Joined: Fri Nov 26, 2010 9:11 pm
Location: France PdD
Contact:

Re: Pictoric (was: New conversion algorithm)

Post by kenneth »

Nice result !

User avatar
Chema
Game master
Posts: 2666
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Pictoric (was: New conversion algorithm)

Post by Chema »

8bit-Dude wrote:
Tue May 19, 2020 5:15 am
AH AH!!!! I found the ultimate trick!!!!

If I apply my AIC palette to the input image (21 colors that represent all possible combinations between AIC rows), then the result through Pictoric is much more vivid and colorful! I am really happy with the look of this! :D :D :D
:shock: This looks really very good... So what exactly did you do here? I am interested. I wonder how some automatic conversion such as this would really work in an actual game (when you have to plot a masked sprite on top of it and inverted scans start to get modified) and the loss of detail started to make objects hardly recognizable. I ended up using much less combinations for my pictures in Blake's 7 due to this (and my lack of ability with graphics, that is), but maybe....

I wonder how such an automatic conversion would work in my room editing program, maybe with some adjustments :)

User avatar
ibisum
Wing Commander
Posts: 1297
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: Pictoric (was: New conversion algorithm)

Post by ibisum »

Wow.

The question that pops up in my mind is how to animate things on top of this with a bit of clarity.

I guess one solution would be to do cell animations in the game pipeline, then use PictOric to generate fast assembly that will blit the diffs between frames, and also possibly smooth the diffs attributes to make things sparkle...

sam
Officer Cadet
Posts: 53
Joined: Sun Jul 09, 2017 3:28 pm
Location: Brest (France)
Contact:

Re: Pictoric (was: New conversion algorithm)

Post by sam »

Chema wrote:
Tue May 19, 2020 11:17 am
:shock: This looks really very good... So what exactly did you do here?
If I can guess: he made a palette mixing 2 colors for the oric: 1+2, 1+3, 1+4, 1+5, 1+6, 1+7; 2+3, 2+4, 2+5, 2+6, 2+7; 3+4, 3+5, 3+6, 3+7; 4+5, 4+6, 4+7; 5+6, 5+7; 6+7 = 21 entries. He then map the original image to this palette by color proximity. He then converted the final picture which can be dithered via a simple pattern over 2 consecutive lines.

Notice that:
* This palette is a 50% mix of basic colors. Each (R,G,B) entry is mapped according to this rule: 0..1/3-->no intens, 1/3..2/3-->half intens, 2/3..1-->full intens. How about having 25/75% mix as well ? I think this is close to what a basic 2x2 dither produces.
* this palette doesn't not have "pure" colors. This mean the middle image doesn't have full red, or full green or full basic color.
* This palette has similar colors: 1+6, 2+5, 3+4 both represents a 50% gray created by mixing complementary colors.

User avatar
8bit-Dude
Pilot Officer
Posts: 98
Joined: Tue Mar 14, 2017 1:33 pm
Location: Japan

Re: Pictoric (was: New conversion algorithm)

Post by 8bit-Dude »

As a thank you for the technical help, I am posting the Tech-Demo disk here first! :D

It is not much, just a few actions around the game's first screen (and a few bugs here and there). More than anything, it is just meant as a learning tool for people interested in programming games. 8)

The changes I made, and the sources+assets of this tech demo, will be available in a few days time when I release 8bit-Unity 0.3.4.
Attachments
goblin-oric.dsk
(131.5 KiB) Downloaded 27 times

User avatar
ibisum
Wing Commander
Posts: 1297
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: Pictoric (was: New conversion algorithm)

Post by ibisum »

Doen't seem like this .dsk file works for me .. tried on Oricutron (Dev release), Clock Signal emulators, and as well on a real Atmos with Cumana Reborn drive (.DSK converted to .HFE) .. all seem to hang, alas.

User avatar
peacer
Flight Lieutenant
Posts: 416
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: Pictoric (was: New conversion algorithm)

Post by peacer »

ibisum wrote:
Tue May 19, 2020 6:45 pm
Doen't seem like this .dsk file works for me .. tried on Oricutron (Dev release), Clock Signal emulators, and as well on a real Atmos with Cumana Reborn drive (.DSK converted to .HFE) .. all seem to hang, alas.
Strange.. It worked on my Oricutron v. 1.2

Image

User avatar
Dbug
Site Admin
Posts: 3351
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Pictoric (was: New conversion algorithm)

Post by Dbug »

Working here as well (Oricutron 1.2 from the OSDK)

User avatar
iss
Wing Commander
Posts: 1082
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Pictoric (was: New conversion algorithm)

Post by iss »

Screenshot_20200519_213202.png
Screenshot_20200519_213202.png (104.49 KiB) Viewed 813 times
No problem with the DSK in latest Oricutron. Tested in Oric-1 & Atmos modes.
@sam: Great work for pictoric with AIC + ordered dithering!

User avatar
8bit-Dude
Pilot Officer
Posts: 98
Joined: Tue Mar 14, 2017 1:33 pm
Location: Japan

Re: Pictoric (was: New conversion algorithm)

Post by 8bit-Dude »

sam wrote:
Tue May 19, 2020 2:05 pm
If I can guess: he made a palette mixing 2 colors for the oric: 1+2, 1+3, 1+4, 1+5, 1+6, 1+7; 2+3, 2+4, 2+5, 2+6, 2+7; 3+4, 3+5, 3+6, 3+7; 4+5, 4+6, 4+7; 5+6, 5+7; 6+7 = 21 entries. He then map the original image to this palette by color proximity. He then converted the final picture which can be dithered via a simple pattern over 2 consecutive lines.
I have attached a screenshot of the patterns used to generate the palette.
They are the various unique combinations on 2x2 pixel blocks when using 3+6 AIC with/without invert attribute.

(Please note that I deliberately did not include patterns of 1 full line followed by dotted line. Those don't look nice)
Attachments
palette.PNG
palette.PNG (5.09 KiB) Viewed 797 times

User avatar
Dbug
Site Admin
Posts: 3351
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Pictoric (was: New conversion algorithm)

Post by Dbug »

Question: Now that you have AIC running, do you still need to have your big bands of artefacts on the left and right of the character and mouse cursor, should it not be possible to just have a proper masking out that would allow moving the character and cursor without any visual glitch?

User avatar
8bit-Dude
Pilot Officer
Posts: 98
Joined: Tue Mar 14, 2017 1:33 pm
Location: Japan

Re: Pictoric (was: New conversion algorithm)

Post by 8bit-Dude »

Dbug wrote:
Wed May 20, 2020 6:53 am
Question: Now that you have AIC running, do you still need to have your big bands of artefacts on the left and right of the character and mouse cursor, should it not be possible to just have a proper masking out that would allow moving the character and cursor without any visual glitch?
In the case of the mouse cursor, I use AIC 3+6 attributes. So there is no band, just a contrast between pixels that are ON and OFF.
For the character, I only insert attributes every other line, to reduce artifacting.

There is no way of showing sprites without artifacting, because paper color will always be either black or white.

One more note: I use 12 pixels to display a "left-shifted" and "right-shifted" version of a 9 pixel sprite. This gives smoother animation than moving in blocks of 6.

User avatar
Dbug
Site Admin
Posts: 3351
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Pictoric (was: New conversion algorithm)

Post by Dbug »

8bit-Dude wrote:
Wed May 20, 2020 7:31 am
There is no way of showing sprites without artifacting, because paper color will always be either black or white.
What would you have WHITE paper in AIC mode?
Generally WHITE in AIC mode is just inverted BLACK paper so you still have full control on what PAPER and INK is on each line, or did I miss something?

User avatar
ibisum
Wing Commander
Posts: 1297
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: Pictoric (was: New conversion algorithm)

Post by ibisum »

(I re-downloaded the .dsk file and it worked...)

This is looking really, really good I have to say.

8-bit Dude - I hope you've got some plans to add MacOS/Linux support in the future - if so this is something I'd be happy to help with. I haven't used a Windows system in years and would much rather avoid Wine/VM's if possible .. but that said, I'm happy to help get things working on MacOS/Linux.

And then, the inevitable question: what would it take to add Z80 support and turn this into a true unity situation, where C64 and ZX Spectrum and CPC6128 and Atmos devs can just use the One True Toolkit to Rule Them All .. I guess I can answer that question myself with a bit of code-reading, so off I go ..

User avatar
8bit-Dude
Pilot Officer
Posts: 98
Joined: Tue Mar 14, 2017 1:33 pm
Location: Japan

Re: Pictoric (was: New conversion algorithm)

Post by 8bit-Dude »

Dbug wrote:
Wed May 20, 2020 7:42 am
Generally WHITE in AIC mode is just inverted BLACK paper so you still have full control on what PAPER and INK is on each line, or did I miss something?
Firstly, in AIC the paper is always BLACK (or WHITE when inverted). So when drawing the sprite, background will be either BLACK or WHITE . It cannot be any other color. Therefore, it will stand out (what you call artifacting).

Secondly, the I cannot control what the INK is because the entire image was computed for a specific ink1, ink2 combo.

Thirdly, the sprites will all have the same green'ish color unless the attribute is changed on at least some lines. To reduce clashing, I am changing the attributes on the YELLOW/BLUE lines as they stand out less than the CYAN/RED lines.

Post Reply