|
Post by elmer on May 31, 2018 21:39:14 GMT
ProMotion works great, and I highly recommend anyone with some modern development art workflows to check it out. ProMotion has a lot of features that people gravitate towards PhotoShop for, but handles colors and palettes exponentially easier (and better IMO.) ... I believe Rover setup the tutorial, and so he would have more insight on how the .PCX files were generated for the tutorials, but if you open the bonk.pcx in gimp and convert the color mode to rgb then back to indexed, save as, it will open in ProMotion fine. It looks like Rover's tutorials all use 16-color PCX files, and ProMotion will only read 256-color PCX files ... it gives an error "The Image Data cannot be processed because it does not contain 256 colors!". You can easily use IrfanView to increase the color depth of images from 16-colors to 256-colors without messing up the palette. Irfanview is a lovely little tool to have around, BTW. It is probably time to teach PCEAS to read PNG files, and just let people avoid the old PCX format altogether if they want to. There is really no particular advantage in using it for modern homebrew, nor is there any reason to use a 16-color image storage format instead of 256-color image storage format.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 1, 2018 21:02:02 GMT
I still don't get why PCEAS doesn't read windows bitmaps, the format is not really that difficult to figure out imo, and it's quite easy to work with.
Aside from that I wish there was an app that wrote native PCE BG/Sprite binaries too. Bypassing PCEAS altogether is a good idea, just an export option with palette editor, VRAM address and BAT size would be nice to have. I looked into Mappy but unfortunately the PCEAS import is weird and doesn't get the tile data out of the file, just the BG nametable (why? The mappy format is even explained inside the PCEAS source code...). I'm looking into making a LUA script for giving Mappy the options I was talking about, hopefully the scripting functionality is flexible enough because it's a fine program overall. Maybe even a custom format for a metatile-based map could be done with it.
|
|
|
Post by elmer on Jun 2, 2018 20:32:45 GMT
I still don't get why PCEAS doesn't read windows bitmaps, the format is not really that difficult to figure out imo, and it's quite easy to work with. You'd have to ask the original authors that question. PCX is a nice and simple format, with compression, and most tools support it, so I can see why they chose to use it. Is there some reason that you'd want to use BMP files instead of PCX files? They are both useful, but thoroughly out-of-date file formats. Supporting PNG files would seem like a good opportunity to add a modern and well-supported image format, and give the excuse to make sure that the palette conversion works properly with images that have both steps-of-32 and steps-of-36 palettes (it is really trivial to support both).
<EDIT>
PCEAS already seems to support steps-of-36 palettes ... I don't see anything to "fix" there. Aside from that I wish there was an app that wrote native PCE BG/Sprite binaries too. Bypassing PCEAS altogether is a good idea, just an export option with palette editor, VRAM address and BAT size would be nice to have. I looked into Mappy but unfortunately the PCEAS import is weird and doesn't get the tile data out of the file, just the BG nametable (why? The mappy format is even explained inside the PCEAS source code...). I'm looking into making a LUA script for giving Mappy the options I was talking about, hopefully the scripting functionality is flexible enough because it's a fine program overall. Maybe even a custom format for a metatile-based map could be done with it. Using external custom tools, and custom (assembly) map handling code would be a good the next step in the process of becoming an accomplished PCE game developer ... but it seems like the current homebrew community is pretty content with accomplishing just-about-as-much as it wants to with the existing tools.
|
|
touko
Punkic Cyborg
Posts: 106
|
Post by touko on Jun 3, 2018 14:02:40 GMT
Aside from that I wish there was an app that wrote native PCE BG/Sprite binaries too. Bypassing PCEAS altogether is a good idea, just an export option with palette editor, VRAM address and BAT size would be nice to have. You have the tools Orion made : onorisoft.free.fr/retro.htm?pce/pce.htmThey are really usefull and easy to use and the source code is included, you can also modify them to improve or adapt them to your needs.
|
|
|
Post by elmer on Jun 3, 2018 18:41:50 GMT
I don't agree, because Huc import your palette from a .pcx file, with a step of 32 for converting colors, and it's not good, the good one is with a step of 36. Do you have any example images that I can take a look at where PCEAS gets the palette wrong? From what I see in the the HuC source code, it should be able to handle both step-of-32 palettes and step-of-36 palettes ... the math is using a simple "value & 0xE0" calculation which should (IMHO) work with both styles of palettes.
|
|
touko
Punkic Cyborg
Posts: 106
|
Post by touko on Jun 3, 2018 20:37:41 GMT
I don't agree, because Huc import your palette from a .pcx file, with a step of 32 for converting colors, and it's not good, the good one is with a step of 36. Do you have any example images that I can take a look at where PCEAS gets the palette wrong? From what I see in the the HuC source code, it should be able to handle both step-of-32 palettes and step-of-36 palettes ... the math is using a simple "value & 0xE0" calculation which should (IMHO) work with both styles of palettes. No because i don't use huc since a while, but huc convert each color with a /32 and i'am not sure at all for /36, i remember having problems with colors when they have to be divided by 36 . How huc can choose if colors must be /32 or /36 ??
|
|
|
Post by elmer on Jun 3, 2018 20:59:33 GMT
No because i don't use huc since a while, but huc convert each color with a /32 and i'am not sure at all for /36, i remember having problems with colors when they have to be divided by 36 . How huc can choose if colors must be /32 or /36 ?? It doesn't need to. It uses simple bitmasks and shifts, and the math works out the same within the range 0..255. Think of it as only the integer portion of n / 32. So, the largest value in the step-by-36 palette is 252. 252/32 = 7.875. But the integer part of that is 7, and we're only doing integer math. It all works out.
|
|
|
Post by theoldman on Jun 3, 2018 22:00:26 GMT
What about a colorvalue of 129?
|
|
|
Post by elmer on Jun 4, 2018 0:19:01 GMT
What about a colorvalue of 129? That's a great question, and it really bugged the purist in me, too, until I realized that it likely didn't actually matter in practical terms. If I understand you correctly, you're pointing out the mathematical difference between ... 129 / 32 = 4.03125 ... which has an integer value of 4. vs 129 / 36 = 3.58333 ... which has an integer value of 3. IMHO, that is only an issue in the real world if we're trying to quantize a 24-bit color range down to a 9-bit color range; and even then, we might not want to use a simple integer clamp in the math, but rather use rounding to select the closest-color ... which actually would give the same value of 4. Either way, that's not (IMHO) what we're actually talking about in the practical usage of art tools to create or view PCE backgrounds or sprites, and then to have HuC/PCEAS convert them. For that purpose, we take the PCE's values of 0..7 and export them by multiplying them by either 32 or 36 (depending upon our preference). When creating art for the PCE, the artists should be using those same values. Those values are ... PCE step 32 step 36 --------------------- 0 0 0 1 32 36 2 64 72 3 96 108 4 128 144 5 160 180 6 192 216 7 224 252 If you use those values, then the math that PCEAS already uses, pce_val = (rgb_val & $E0) >> 5works out to correctly for all of those values. IMHO, if your artist tells you that they're creating art in step-by-36, and they hand you something with an rgb value of 129, then you should probably have a talk with them, because they're using gradiations of color that don't exist on the PCE. Sure, it would be easy to add a flag to do a /32 or /36, or just have PCEAS automatically read PNG files using a /36 ... but, at the moment, I don't really see it as necessary. I'd be happy to reconsider that position, if that's not how people are actually using the tools in practice.
|
|
touko
Punkic Cyborg
Posts: 106
|
Post by touko on Jun 4, 2018 17:16:36 GMT
Are you sure of that ?? I thought it was doing a simple >> 5 ,and really it does the things badly when colors need to be divided by 36 .
The problem is mainly when you convert a 24 bit image, try with the value 230, the integer part is 7 with a step of 32 (even with your bitmask) and 6 with a divide by 36 . Of course if your pixel artist take care of colors with a step of 32 at the start,there will be not problems .
|
|
|
Post by spenoza on Jun 4, 2018 19:10:23 GMT
Are you guys even talking about the same versions of PCEAS? Just making sure... Are there multiple versions?
|
|
|
Post by elmer on Jun 4, 2018 20:27:38 GMT
Are you guys even talking about the same versions of PCEAS? Just making sure... Are there multiple versions? How far down the rabbit hole do you want to go? There are at least 5 versions ... Zeograd/David Shadoff/David Michel's last old HuC v3.21 version from 2005, Bonknuts' fixes and improvements to v3.22 in 2012, Uli's improvements to v3.98 in 2014, Artemio's improvements in 2015, and my improvements over the last couple of years. But in this particular feature, they're all identical. huc/src/mkit/as/pce.c, line 640 ... temp = ((r & 0xE0) >> 2) | ((g & 0xE0) << 1) | ((b & 0xE0) >> 5);
|
|
touko
Punkic Cyborg
Posts: 106
|
Post by touko on Jun 5, 2018 16:58:45 GMT
Ok ;-)
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 5, 2018 23:51:23 GMT
Touko: Thanks for the links, I'll check it out when I have time to work on PCE again (which is not likely to be soon hah), and it's good to see you here buddy.
|
|
TheOldRover
Deep Blooper
They see me codin', they hatin'
Posts: 26
Fave PCE Shooter: Lords Of Thunder
Fave PCE Platformer: FX-Unit Yuki
Fave PCE Game Overall: One that isn't out yet ;)
Fave PCE RPG: Cosmic Fantasy 2
|
Post by TheOldRover on Jun 6, 2018 8:00:16 GMT
I used 16 color PCX files for the tutorial since... well, we're on a system that uses 16 color palettes. Some graphics editing programs are just too hastily-coded to fully support some image formats.
|
|