Jump to content
IGNORED

So, Direct Colour . . .


Recommended Posts

9 minutes ago, KulorXL said:

Not trying to be rude or anything, but when I read this I kinda think it sounds like a "junior engineer mindset". I think when people are telling you something is a "waste of time", it's probably usually in the context that what you're looking into doesn't really matter in the grander scheme of trying to learn SNES coding, which is certainly where I'd categorize things like NTSC timings. Something you learn as you become a more experienced programmer in general is that you don't really need or even want to know every little detail on what something is doing, because a lot of it isn't really that important on the layer that you have to deal with in everyday coding. Ask me about exact SNES chip timings or the NTSC signal's color subcarrier or why they used a resistor with *exactly* that value in that spot on the board, and I don't know shit...but I'd never need to care about that stuff when making a game, it's just not useful information to burden myself with. I think people are telling you certain things are a "waste of time" in an effort to steer you more towards things that could help you learn coding more effectively, that's all.

But I'm interested in NTSC timings - people call video games a waste of time too.

  • Like 1
Link to comment
Share on other sites

1 hour ago, jeffythedragonslayer said:

But I'm interested in NTSC timings - people call video games a waste of time too.

I was confused as to why you posted that as well. As someone with quite a few scopes and has looked a lot of NTSC timings and signals for various systems, etc... I don't see how the NTSC line diagram helps you here at all (or this discussion/thread, or this forum, for coding for SNES in general). I mean, outside of using scanlines as method of performance indication and metric ("hmm.. my subroutine took 5 scanlines to complete"),.. there's nothing special or noteworthy here. I guess I'm not understanding what you're looking for, but more important why you're posting here in this thread. If you're neurotic and need to know every detail.. I get that, sure - but don't know why that was posted haha. A random post about a value that is common to NTSC system (the line length), and prefixed with a statement about expensive operations on the PPU... but they're no context to connect those two ideas (at least you didn't post whatever you were thinking). The only thing that would be interesting is it if wasn't bog standard line length.. like 70us or such. Just weird and confusing post haha.

Edited by turboxray
Link to comment
Share on other sites

25 minutes ago, turboxray said:

there's nothing special or noteworthy here

You can look at it as if nothing about the SNES is a miracle, or you can look at it as everything about the SNES is a miracle.  That's why I posted the picture of Near and Commander Rester at the christmas tree in the sim city thread.

Edited by jeffythedragonslayer
Link to comment
Share on other sites

8 hours ago, jeffythedragonslayer said:

Yeah, because although that is better for preservation, it's a sure-fire way to get a lot of criticism from people who don't appreciate that people have different priorities and different learning styles.  If I had a dollar for every time I've already been accused of wasting my time trying to figure out some tiny detail...

 There's a lot to unpack here. While I can relate to this, there's also the understanding people don't have an infinite amount of time and if they don't see value in the questions you're asking, then they're going to be dismissive/shut you down. Part of the problem could be, and often is when you're asking obscure questions, is that the questioner doesn't explicitly explain why they are asking for odd details and such. If it comes off as "I'm just curious" type of pestering, then what's the "return on investment" for the person(s) being asked? Context, as in communicated motivation, is important. If you're an emulator author, then people are going to take you more seriously and respond because it's understood that you're potentially trying to work out some obscure behavior, etc - with an added benefit to the community or whatever. Or maybe you're in the demoscene and are trying to pull off a specific trick or hack.. or maybe you're an experienced <whatever>. The point is, context is important if your "credibility" isn't working as a substitute. If someone asks me, "hey, wants the exact timing on this latching behavior".. and they're some rando, probably not going to be as much inclined to help out... just because they're "curious" isn't motivational enough for me (the royal me, btw). Now, if they provided context that they are documenting behavior and trying to capture all of this, people are more inclined to help out. If you're known for documenting such behavior.. then your credibility speaks for itself, and people are more incline to help out. But in the end, if you're relying on whatever community for whatever info/questions/support, the burden of proving you're not just wasting people's time... still relies on you.. is my point.

 

 As friendly as any community might be, there is always going to be a pecking order. There's always going to be some work on your side, for what you're asking of said community. That's just the way of things. And if you're conscious that you're interactions are often seen as tedious or inconvenient or "annoying", then it's up to you to develop the right strategy to win them over. How you talk and how you ask things goes a long way. If you make a post with a short pointed question like, "How long is the active line on the snes?".. maybe expanded it and give more context, "Hey, I noticed some systems have a slightly shorter active line for the display and compensate by x/y/z. What is the SNES length? It's it standard?". The first gives the implication that you just want the information and get out. The second suggests you want the information, but also have a conversation... you know, silly human related behavioral stuffs. The first comes off as cold, the second comes off as warm. If you look at Kirk, he takes the second approach. He might have pissed off the people that helped him, eventually haha, but in the beginning he got a LOT support for all his questions (even when he was annoying people). A lot of people chimed in and there were definitely discussions. Gotta build up those people hacking social skills haha.

Edited by turboxray
  • Like 3
Link to comment
Share on other sites

1 hour ago, Cris1997XX said:

Meanwhile, I'd argue Kirk's fake mockups ARE a waste of time 😂

 

1 hour ago, jeffythedragonslayer said:

that says a lot about how much your time is worth

I'd argue to your argument that you're right, it does how little his time is worth given the person it relates to, but also says how even much less his efforts are worth if Cris's time is basically worth jack shit in this matter. :)

  • Like 2
Link to comment
Share on other sites

25 minutes ago, jeffythedragonslayer said:

You can look at it as if nothing about the SNES is a miracle, or you can look at it as everything about the SNES is a miracle.  That's why I posted the picture of Near and Commander Rester at the christmas tree in the sim city thread.

Dude, I'm sorry but that doesn't make any sense. It's manifest nonsense. Why would everything about the SNES be a miracle if some parts are just standard stuff? Sometimes you say the weirdest things.

Edited by turboxray
  • Like 2
Link to comment
Share on other sites

2 hours ago, jeffythedragonslayer said:

But I'm interested in NTSC timings - people call video games a waste of time too.

And that's fine, but it's not gonna help you code SNES games...which I think is what a lot of people (myself included) assumed your end goal was? What are you trying to do anyway?

  • Like 1
Link to comment
Share on other sites

6 minutes ago, KulorXL said:

And that's fine, but it's not gonna help you code SNES games...which I think is what a lot of people (myself included) assumed your end goal was? What are you trying to do anyway?

I occasionally see people who have a SNES that won't produce video, and every console we resurrect makes our community that much bigger.

  • Like 1
Link to comment
Share on other sites

30 minutes ago, jeffythedragonslayer said:

I occasionally see people who have a SNES that won't produce video, and every console we resurrect makes our community that much bigger.

If I was more of a hardware guy, to that end I'd think about trying to make an FPGA-based drop-in replacement, since apparently a lot of the time when that happens it's either dying CPU or PPU chips. FL4SK in the snesdev discord would be the one to talk to about that sort of thing.

  • Like 1
Link to comment
Share on other sites

2 minutes ago, KulorXL said:

If I was more of a hardware guy, to that end I'd think about trying to make an FPGA-based drop-in replacement, since apparently a lot of the time when that happens it's either dying CPU or PPU chips. FL4SK in the snesdev discord would be the one to talk to about that sort of thing.

that's one way.  It's nice to be able to keep the original hardware running too, but it's difficult.

  • Like 1
Link to comment
Share on other sites

Just now, jeffythedragonslayer said:

that's one way.  It's nice to be able to keep the original hardware running too, but it's difficult.

Yeah, I mean if the chips themselves are dying, there's not a whole lot else you can do...and the SNES was a pretty bomb console, so a lot of people put a ton of hours on theirs, which means you're likely to run into failing chips 30+ years on, so drop-in replacement chips are inevitably gonna be needed at some point. Sure it wouldn't be 100% the exact same (unless someone like decapped a PPU and rebuilt it from that I guess?) but we gotta make concessions somewhere when we're essentially playing on antiques.

  • Like 2
Link to comment
Share on other sites

Well, I just used up 107 colours making this lovely 4bpp scrolling cloud background layer that almost entirely uses only pastel shades of pink and lilac (this is possible mostly because the SNES' 32,768 master palette allows for using a whole lot of shades of the same colour):

PastelClouds4bpp.png.514a306c148e0ef3646e515672196c4f.png

 

But now I have think of way to get something like this high-saturation and high-contrast floating island to fit into the remaining 13 colours available for the backgrounds on SNES and still look half decent:

1000_F_561670521_ESoGv9JtlnpB0jfCUgVkRBqO7Ev1aqsm.thumb.jpg.6b5e1062fcdf2ae02e4b09f0f5e9411a.jpg

 

Note: In case it wasn't obvious, the floating island would maybe be closer to this relative resolution and size in reality:

Island.png.ed2cd79e27333d83599d107eb5fed136.png

 

And I don't really want to use Mode 3 or 4 in the standard setting where one layer can use a single 8bpp palette of 255 visible colours here, even though that cloud layer could look even more lovely with all those colours and shades, because those colours then have to be shared with both the other background and sprites, and I already know that pretty much 107 of those colours will be used for the lovely pastel pink and lilac cloud layer and are not going to be useful at all for that other floating island foreground layer and probably not for the sprites either (which will both be high-saturation and high-contrast either way, because that's one way I'd like to show they are in the foreground).

 

Is there a way I could get that floating island foreground layer to use a whole bunch of high-saturation and high-contrast colours of its own, say maybe 255 colours and possibly more, and also still have another entirely separate set of [possibly even higher] high-saturation and high-contrast colours to use for the foreground sprites too (I might also want to use up a big chunk of those sprites colours/palettes to do some cool transparency there as well, maybe for some semi-transparent angelic apparitions or semi-transparent shadows or whatever)?

 

Note: There's no need to fret over the VRAM just yet, as I will get to asking about that when/if necessary. :)

Link to comment
Share on other sites

Maybe I could have something like a bunch of differently coloured dragons flying around, which can use a couple sprite variations there but actually the multiple different palettes to have much more visual variety without stressing the unique sprite tile VRAM limits:

Dragons24bpp128colours.png.c1a5513dc5ca43854dacda89a32aef6b.png

 

I would not literally use these exact dragons mind you--and that's true of any of the art above too--because this is all copyrighted [by someone else] placeholder art for the purpose of gathering my initial thoughts and doing some early tests and such around this idea. In fact, as you may have read in other places, "none of this is final and is all subject to change", just in case that wasn't obvious. :)

Edited by Kirk_Johnston
Link to comment
Share on other sites

54 minutes ago, Kirk_Johnston said:

Maybe I could have something like a bunch of differently coloured dragons flying around, which can use a couple sprite variations there but actually the multiple different palettes to have much more visual variety without stressing the unique sprite tile VRAM limits:

Dragons24bpp128colours.png.c1a5513dc5ca43854dacda89a32aef6b.png

 

I would not literally use these exact dragons mind you--and that's true of any of the art above too--because this is all copyrighted [by someone else] placeholder art for the purpose of gathering my initial thoughts and doing some early tests and such around this idea. In fact, as you may have read in other places, "none of this is final and is all subject to change", just in case that wasn't obvious. :)

those dragons look mean and nasty... maybe I'll slay them and turn them into spyro gyros

Link to comment
Share on other sites

3 hours ago, Kirk_Johnston said:

Is there a way I could get that floating island foreground layer to use a whole bunch of high-saturation and high-contrast colours of its own, say maybe 255 colours and possibly more, and also still have another entirely separate set of [possibly even higher] high-saturation and high-contrast colours to use for the foreground sprites too (I might also want to use up a big chunk of those sprites colours/palettes to do some cool transparency there as well, maybe for some semi-transparent angelic apparitions or semi-transparent shadows or whatever)?

Sounds like you're pretty convinced this is a good use case for direct color mode. Let's see it, then. What does that island look like when converted to direct color specs? Also, did you really need 8 palettes for that sky? What does the scene look like if the sky used only 4 palettes, and the island used either 64+8+3 indexed colors in 8bpp, or just the 4 other palettes on a 4bpp layer instead? Direct color has to look noticeably better than either of those options, which shouldn't be a problem, right?

  • Like 4
Link to comment
Share on other sites

5 hours ago, KulorXL said:

Direct color has to look noticeably better than either of those options, which shouldn't be a problem, right?

Guess I gotta do it my damn self, alright...

Here's Kirk's sky BG using 8 palettes:

image.thumb.png.cfd400b7c60527a652417ff88d4d6e66.png

Here, I've crunched it down to using only 4 palettes instead of 8:

image.thumb.png.caa285b079f068593583afefc12b0e28.png

I don't have the original asset, so I'm basically taking Kirk's 8 palette one and crunching it down even further, which means the dithering is double-stacked; it'd look better if I had converted from the original truecolor source. Still, you could have an artist touch it up and it would look pretty much the same quality as the 8 palette version, and especially if you cut out the sky gradient in the BG and just did that with HDMA instead -- a lot of color entries are wasted trying to dither the gradient, which isn't a great use of them.

Here's the sky island, crunched down to a direct color palette:

image.png.3b9c89b16dd385a578673d6500a9bf99.png

This one actually doesn't convert too terribly, and you get a nice color count of 169. Nice! Still though, the shaded parts in particular don't look great, because there's not a lot of subtle hues to go in there when you're working with the direct color palette.

Here's what it looks like with 75 colors in indexed 8bpp:

image.png.d4e76a80ebf8a0ae4c796feff6c84fbd.png

The rest looks pretty much the same, but the shaded parts fare a whole lot better.

And here's a 4bpp layer using 4 palettes:

image.png.911df105f3705c5fe764658927c778d4.png

The shaded parts look worse than 8bpp, but better than direct color still, and nothing else is appreciably worse.

Here's Kirk's 8 palette 4bpp BG with the direct color island superimposed:

image.thumb.png.e99665f49a654d6d696239c3fffcd1c3.png

Here's my 4 palette 4bpp BG with the 75 color 8bpp indexed island superimposed:

image.thumb.png.3f2508a7768c3cdc6d999bd7621095fe.png

And, the real kicker, here's my 4 palette 4bpp BG with the 4 palette 4bpp island superimposed:

image.thumb.png.80101f3ca522fda6ade598860bf0c60a.png

...and that one uses *half* the VRAM for the island portion.

So this basically lines up with what I observed when I was playing with direct color mode some number of years ago: it doesn't really win against the other options you have. Doing the same graphics in 4bpp halves the VRAM usage and often looks at least as good, if not outright better; doing the same graphics in 8bpp indexed also looks at least as good, while opening the door to do cool color cycling tricks as well (which are not possible in direct color mode). So once again, I don't think you've made a compelling case for using direct color here, you're gonna have to come up with something better if you want to convince me.

  • Like 3
Link to comment
Share on other sites

8 hours ago, Kirk_Johnston said:

Well, I just used up 107 colours making this lovely 4bpp scrolling cloud background layer that almost entirely uses only pastel shades of pink and lilac (this is possible mostly because the SNES' 32,768 master palette allows for using a whole lot of shades of the same colour):

PastelClouds4bpp.png.514a306c148e0ef3646e515672196c4f.png

Heh...

8 hours ago, Kirk_Johnston said:

But now I have think of way to get something like this high-saturation and high-contrast floating island to fit into the remaining 13 colours available for the backgrounds on SNES and still look half decent:

I see you still can't do math. It would be 20 colors. See, every first color of a sub palette is transparent except the single one used for the back drop. So 7 of those 8 subpalettes for the BG.. has an unused color. That's 7 free colors right there. 13+7 = 20. Same goes for sprites, except you get 8 total colors that can't be used for sprites. So now you have 28 colors. With 8bpp indexed mode, you can use any free color slot anywhere in all of CGRAM. I guarantee you that in the pic you posted, the 4bpp cloud layer, statistically has some number of colors are only used in a few tiles for a few pixels. I wrote an app that gives you information, so you can further tweak images for palettes! And you can easily prune such colors without any visual impact, and give them back to 8bpp mode. I was also able to find the source image you used, gave it a better dither pattern and only used 6 palettes instead of 8:

cVsreJJwEqRn.png

Given the image above is using 6 palettes, I now have 32+5+8=45 available colors. That assumes ALL sprite palette colors are used. You can do more with 45 indexed colors than you can with almost all direct colors. Dither is courtesy of my own conversion app. That larger Bayar pattern in rilden's tool is kinda ugly.. unless you're trying to mimic that PC-98 look. I rather provide my own options for dither.

 

8 hours ago, Kirk_Johnston said:

1000_F_561670521_ESoGv9JtlnpB0jfCUgVkRBqO7Ev1aqsm.thumb.jpg.6b5e1062fcdf2ae02e4b09f0f5e9411a.jpg

 

Note: In case it wasn't obvious, the floating island would maybe be closer to this relative resolution and size in reality:

Island.png.ed2cd79e27333d83599d107eb5fed136.png

 

 High contrast, huh? No coincidence that direct-color mode is high contrast-y with its limited palette. No way that you're leading this thread into some contrived example. Nope, totally a coincidence. Funny thing is, worked even better for indexed color mode. Oh, you did a dirty job on pixel edges on the cut-out so I had to clean them up.

Here's the pic converted to 3:3:2 direct color:

EXGpFCKilmDL.png

It's 160 colors.

 

And here it is in indexed color mode:

w3SNME65JbpG.png

45 colors (plus 1 transparent color for see-through). 45 colors in indexed color mode is almost overkill for this island. But yeah, not only does it fit your scenario, you can do more with indexed mode images. Remember when you talked up palette effects? How it was soo amazing the SNES could do it? Well, you can't do that in direct color mode. There are no palettes. That means effects like fade to "black and white image", or fade to black or fade to white.. or tinting.. or anything palette related, you can't do in direct color but you CAN do in indexed color mode. You can do all sorts of transition effects with indexed color mode. You could use sprites, along with some color math mode, to do a lens flare and use the palette colors of the indexed layer to washout or whatever as the sun "blinds the viewer". All sorts of things... that you cannot do with direct color mode. Let me repeat that, you can't fade direct color images like you can with palettized pixels - you would have to write to every single pixel to affect that layer, and even if you managed that, 256 fixed colors for that is gonna be really rough haha.. I can easily customize just how "contrast-y" or faded I want the island image to be in indexed color mode.

 

 On top of that, this island can also be easily converted into 2 BG palettes for a 4bpp... no need for 8bpp mode. Still get the exact same capabilities that I mentioned for indexed mode because these are palette colors (not direct colors)... and being 4bpp layer now means you can use mode 1.. an extra layer for translucency effects.

 

 

8 hours ago, Kirk_Johnston said:

Is there a way I could get that floating island foreground layer to use a whole bunch of high-saturation and high-contrast colours of its own, say maybe 255 colours and possibly more, and also still have another entirely separate set of [possibly even higher] high-saturation and high-contrast colours to use for the foreground sprites too (I might also want to use up a big chunk of those sprites colours/palettes to do some cool transparency there as well, maybe for some semi-transparent angelic apparitions or semi-transparent shadows or whatever)?

 You need to stop thinking small potatoes. Start thinking outside the box. You're so focused on finding a reason to use direct color mode, that you're willing to leave all these other abilities on the table.. just from going to indexed mode alone over direct mode, you gain so much more.

 

  • Like 3
Link to comment
Share on other sites

Now, here's a question following on from my last post, does anyone know of a SNES image conversion tool that will let me use Direct Colour plus all eight of the available 256-colour palette variations on a single image, maybe something similar to Rilden's Tiled Palette Quantization tool?

 

Because, when using the Direct Colour mode, having access to all eight 8-bit 256-colour palettes on a single image/layer would in many cases be more effective than only using a single 8-bit 256-colour palette, and I certainly think it would be great to have a simple SNES tool that can do this kind of conversion in a few clicks for such use cases.

Edited by Kirk_Johnston
Link to comment
Share on other sites

5 minutes ago, Kirk_Johnston said:

Now, here's a question following on from my last post, does anyone know of a SNES image conversion tool that will let me use Direct Colour plus all eight 256-colour palette variations on a single image, maybe something similar to Rilden's Tiled Palette Quantization tool?

 

Because, it should be clear to most people that [when using the Direct Colour mode] having access to all eight 8-bit 256-colour palettes in a single image would in many cases be more effective than only using just a single 8-bit 256-colour palette. And I certainly think it would be great to have a simple SNES tool that can do this in a few clicks for such a use case.

No.  I think making tools for pseudo-hires mode would be easier, to be honest.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...