Problem with borrowed (opensource) graphics, can't edit them

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

User avatar
NeoTorpor
Posts: 23
Joined: Sat Oct 06, 2018 3:03 pm

Problem with borrowed (opensource) graphics, can't edit them

Post by NeoTorpor » Tue May 14, 2019 2:12 pm

Hello, first i want to apologize for my spelling mistakes (english is not my native language). Second, after months of lurking i finally found the guts to try assembly and since my art skills are far from good (mostly skilled with clay) i found a nice solution for my problem with the art, i went to pages with open game art and tried to edit the image (a chicken) to try my first demo but i can't figure out which tools to use since i found plenty of tools to convert the image to bin, nes, chr but the image is still way too big and ends eating the whole 8 KB for graphics (i am trying to use a nrom).

I can use gimp (very basic), what i want to do is edit the 80 KB chicken image to a 4 blocks nes style, but i have no idea how to do it.

Any thoughts?

Thank you all.
Attachments
chick_24x24_0.png
chick_24x24_0.png (359 Bytes) Viewed 6676 times
Harvest moon with swords is a terrific idea.

User avatar
NOOPr
Posts: 64
Joined: Tue Feb 27, 2018 10:41 am
Location: Brazil
Contact:

Re: Problem with borrowed (opensource) graphics, can't edit

Post by NOOPr » Tue May 14, 2019 3:04 pm

Take a look if it helps:

0 Setup the image
0.1 Open the GIMP
0.2 Open the desired image for editing

1 Resize the image
1.1 "Image" > "Scale Image..."
1.2 Change the Width to 16 and Height to 16 with the combo box selected as "px"
1.3 Choose an interpolation algorithm
1.4 Click "Scale"

2 Set it to 4 colors
2.1 Manually paint the image to an arbitrary 4 colors (including the background)
2.2 "Image" > "Mode" > "Indexed..."
2.3 Set the "Maximum number of colors" to 4
2.4 Click "Convert"

3 Export as Bitmap
3.1 "File" > "Export As..."
3.2 Do not check anything and click "Export"

4 Get the CHR
4.1 Open the NES Screen Tool (get it here)
4.2 "Import" > "BMP file as Tileset"
4.3 "Patterns" > "Save CHR"
4.4 Choose a size

You can do this method to make a whole CHR of 4KiB by just making an 128x128 image on GIMP with all tiles for a bank of this size.

User avatar
NeoTorpor
Posts: 23
Joined: Sat Oct 06, 2018 3:03 pm

Re: Problem with borrowed (opensource) graphics, can't edit

Post by NeoTorpor » Tue May 14, 2019 3:25 pm

Thank you! It works like a charm, now the chicken image is 4 colors and 16x16, but at first Gimp didn't allowed me 16x16 for some reason, it moved to 17 or 15 (i found that i can use the padlock icon).

Anyway, thank you, you saved me from tons of hours lurking for tutorials, now i can focus on the assembly part.

I am trying to make a dungeon crawler and maybe if get enough knowledge, a Harvest Moon/Rune Factory for the NES.
Harvest moon with swords is a terrific idea.

User avatar
dougeff
Posts: 2614
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: Problem with borrowed (opensource) graphics, can't edit

Post by dougeff » Tue May 14, 2019 3:29 pm

I use YY-CHR. If you have the image open in GIMP or Photoshop, converted to indexed 4 color, you can just cut and paste into YY-CHR.

Save as a CHR file. incbin into project.
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
NeoTorpor
Posts: 23
Joined: Sat Oct 06, 2018 3:03 pm

Re: Problem with borrowed (opensource) graphics, can't edit

Post by NeoTorpor » Tue May 14, 2019 3:46 pm

@dougeff:

Thank you too, i just did it and now i have the chr file. I will post the chicken demo (mostly movement only), as soon as i get the code done.

You guys saved me tons of time. Thanks.
Harvest moon with swords is a terrific idea.

User avatar
NeoTorpor
Posts: 23
Joined: Sat Oct 06, 2018 3:03 pm

Re: Problem with borrowed (opensource) graphics, can't edit

Post by NeoTorpor » Wed May 15, 2019 5:04 pm

Hi!, after doing both techniques, some images lost tons of quality and when i move the 16x16 to yy-chr there is a weird color background and the chr file loses (again), more quality. The only image i could do with no problems is the chicken. Any suggestions?

Thanks.
Harvest moon with swords is a terrific idea.

User avatar
koitsu
Posts: 4215
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Problem with borrowed (opensource) graphics, can't edit

Post by koitsu » Wed May 15, 2019 5:11 pm

There should not be any "quality loss" in something of this sort, especially if it's 4-colour. Can you provide details of what you're seeing? Screen shots? Anything?

As for the wrong background colour: CHR files do not contain a palette. YY-CHR requires you save the RGB palette for the associated image separately. Likewise, these palette are not "NES-compatible" (i.e. not for use natively on the NES). This is made further complicated by the NES attribute table, etc..

lidnariq
Posts: 8780
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Problem with borrowed (opensource) graphics, can't edit

Post by lidnariq » Wed May 15, 2019 5:13 pm

When you say "lost quality" what exactly do you mean? (Examples?)

The NES has very few pixels, in comparison to a modern computer, and also has very few options of colors, and very limited ability to display multiple colors at the same time, so some loss of quality may be unavoidable.

User avatar
NeoTorpor
Posts: 23
Joined: Sat Oct 06, 2018 3:03 pm

Re: Problem with borrowed (opensource) graphics, can't edit

Post by NeoTorpor » Wed May 15, 2019 5:35 pm

Ah yes sorry, here are some examples, the chick image i got from open game art gets "pixelated" a lot. And when i convert the image to 4 colors, yy shows a grey color (5), instead of 4, black (background) and 3. Sorry again if i am making spelling mistakes.
Attachments
chick2.png
chick2.png (1.86 KiB) Viewed 6570 times
chick1.png
chick1.png (307 Bytes) Viewed 6570 times
Harvest moon with swords is a terrific idea.

nocash
Posts: 1090
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Problem with borrowed (opensource) graphics, can't edit

Post by nocash » Wed May 15, 2019 6:24 pm

What are those attachments showing? You said that you had a 80kbyte source image with whatever color depth, and wanted to display a 4-color nes image? The attachments appear to be showing neither one of that. So why did you attach those files? What are they good for? The 25x24pixel image is most mysterious, especially as the contained image looks more like 12x12pixels.

Counting colors: White body, Transparent background (also white, but transparent counts as a separate color), grayish outlines, blue eye, and two oranges. That are six colors, not four. There are ways two show more than 4 colors (different colors in each 8x8pixel section, or overlappjng tiles), but that requires that you are using such special methods - are you doing that? Those tricks do also reduce the number of free palette entries and available sprites per line, so one single super colorful sprite might leave little room for other sprites.

For the transparent color, it may help if you assign an unused color to it, eg. magenta.
If you want to, you can use the full 16pix height, currently you have transparent pixels at top and bottom, and use only 14pix height. Of course, there may be several good reasons for that. I just noticed that it looks smaller than neccessary.

User avatar
NeoTorpor
Posts: 23
Joined: Sat Oct 06, 2018 3:03 pm

Re: Problem with borrowed (opensource) graphics, can't edit

Post by NeoTorpor » Wed May 15, 2019 6:41 pm

@nocash The images show the conversion i did with gimp, the chick image1 is before, chick2 is after and as you can see, the second image has lost quality.

I haven't uploaded the bmp image.
Harvest moon with swords is a terrific idea.

User avatar
NeoTorpor
Posts: 23
Joined: Sat Oct 06, 2018 3:03 pm

Re: Problem with borrowed (opensource) graphics, can't edit

Post by NeoTorpor » Wed May 15, 2019 6:44 pm

@nocash

Here is another image i borrowed from harvest moon (for an experiment) and it lost severe quality and color data. (yy)
Attachments
sceenshot.PNG
sceenshot.PNG (8.05 KiB) Viewed 6550 times
Harvest moon with swords is a terrific idea.

nocash
Posts: 1090
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Problem with borrowed (opensource) graphics, can't edit

Post by nocash » Wed May 15, 2019 8:46 pm

Black brown white red gray. That are 5 colors. Try to use only 4 colors. If you don't need white, replace the white background by black, for example.
I am not familar with that tools, and don't know if less colors will help, but that should be the first thing to try.

User avatar
NeoTorpor
Posts: 23
Joined: Sat Oct 06, 2018 3:03 pm

Re: Problem with borrowed (opensource) graphics, can't edit

Post by NeoTorpor » Wed May 15, 2019 9:32 pm

@nocash

Thank you. Which tools you use?
Harvest moon with swords is a terrific idea.

nocash
Posts: 1090
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Problem with borrowed (opensource) graphics, can't edit

Post by nocash » Wed May 15, 2019 10:38 pm

Me? None. I am not doing much graphics. Or well, once or then, I am using ms paint for drawing, or iview for resizing/resampling/color depth changes, or I am just editing pixels in a text editor.
Did you get the 4 color limit working? If not, maybe try something simple, like getting started with using only 2 colors : )

Post Reply