Using colour math with additive blending
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
Re: Using colour math with additive blending
Just to double check, do both backgrounds and sprites have to use the same blending mode [adjustable per scanline], such that I couldn't have say addition+half for my ship's shadow alongside a boss that only uses addition, which would mean I couldn't also say switch the blending mode half way down my boss character without it switching blending mode on the shadow if it were on one of the same scanlines too?
Is it just that you can use one type of blending and/or no blending on a scanline for everything in the game that is on that scanline--and you can change the blending method per scanline if you like--and that's basically it.
Or, can sprites use a different blending mode from the background and freely move around the screen without having to worry about what blending mode I'm using on the background?
Is it just that you can use one type of blending and/or no blending on a scanline for everything in the game that is on that scanline--and you can change the blending method per scanline if you like--and that's basically it.
Or, can sprites use a different blending mode from the background and freely move around the screen without having to worry about what blending mode I'm using on the background?
Re: Using colour math with additive blending
You can only do 1 kind of color math effect at a time.
If you have it set to "addition, divide by half" then every layer affected by color math uses that kind of color math effect.
If you have it set to "addition, divide by half" then every layer affected by color math uses that kind of color math effect.
nesdoug.com -- blog/tutorial on programming for the NES
Re: Using colour math with additive blending
It's only as complicated as you make it.
nesdoug.com -- blog/tutorial on programming for the NES
Re: Using colour math with additive blending
What blending modes and/or setting in Photoshop give me the equivalents of addition, addition+half, subtraction, subtraction+half, as they would basically look on SNES?
And I need to invert the image if I'm going to use subtraction or subtraction+half and still want the colours to look the right way around, correct?
Note: I'm using ancient Photoshop 7, in case that's relevant because the modern version has changed blending or something.
And I need to invert the image if I'm going to use subtraction or subtraction+half and still want the colours to look the right way around, correct?
Note: I'm using ancient Photoshop 7, in case that's relevant because the modern version has changed blending or something.
Last edited by iNCEPTIONAL on Sun Jul 10, 2022 10:33 am, edited 1 time in total.
-
- Posts: 611
- Joined: Mon Jan 23, 2006 7:47 am
- Location: Germany
- Contact:
Re: Using colour math with additive blending
You don't do color math with backgrounds/sprites. You select which layers appear on the Mainscreen and which appear on the Subscreen, then you select if and how the Subscreen is added to or subtracted from which Mainscreen layers. The color math settings can probably only be changed during blanking.iNCEPTIONAL wrote: ↑Sun Jul 10, 2022 4:18 am Just to double check, do both backgrounds and sprites have to use the same blending mode
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
Re: Using colour math with additive blending
I think I did the "half" wrong, so, someone else answer that.
I actually used GIMP which has add and subtract layer options.
I actually used GIMP which has add and subtract layer options.
nesdoug.com -- blog/tutorial on programming for the NES
Re: Using colour math with additive blending
So is this just the background layer with the smoke and the ghost sprites [using palettes 4-7] on the Subscreen using presumably addition+half blending, and it all just works visually and even creates the illusion of different overlapping semi-transparent elements, with the ghosts additionally doing something that makes it look like they are getting brighter and darker at times (changing the colour palette?): https://youtu.be/5WxHLB0Kc10?t=8400creaothceann wrote: ↑Sun Jul 10, 2022 10:31 amYou don't do color math with backgrounds/sprites. You select which layers appear on the Mainscreen and which appear on the Subscreen, then you select if and how the Subscreen is added to or subtracted from which Mainscreen layers. The color math settings can probably only be changed during blanking.iNCEPTIONAL wrote: ↑Sun Jul 10, 2022 4:18 am Just to double check, do both backgrounds and sprites have to use the same blending mode
And is this boss just addition+half (or maybe just addition) with some colour palette changes to affect how transparent he appears at different times: https://youtu.be/R4fVK3egLw4?t=132
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Using colour math with additive blending
Both of those are just addition, no halving.
Addition can do a palette fade like you're seeing.
Add + Half is mostly limited to a 50% blend.
Addition can do a palette fade like you're seeing.
Add + Half is mostly limited to a 50% blend.
Re: Using colour math with additive blending
Ah, okay.rainwarrior wrote: ↑Sun Jul 10, 2022 11:25 am Both of those are just addition, no halving.
Addition can do a palette fade like you're seeing.
Add + Half is mostly limited to a 50% blend.
So, presumably the smoke and ghosts on the Prehistoric Man level must be drawn actually pretty dark then, so they don't end looking too bright/overexposed?
And with the ghost, how come the black areas aren't just completely transparent (or don't appear to be) like when I try to do the same thing in Photoshop using either Lighten or Linear Dodge as suggested? It doesn't look like those black parts on the ghost are using overlapping sprites as they fade in and out of transparency too. Are they doing something there to keep the black lines on the ghost looking relatively black regardless of what part of the background he passes over? Or is that just a wee bit of optical illusion going on?
Re: Using colour math with additive blending
If it's additive, and the color added to the other color is black ( 0/0/0 ), then you've basically added nothing. It becomes complete see through.iNCEPTIONAL wrote: ↑Sun Jul 10, 2022 11:31 amAh, okay.rainwarrior wrote: ↑Sun Jul 10, 2022 11:25 am Both of those are just addition, no halving.
Addition can do a palette fade like you're seeing.
Add + Half is mostly limited to a 50% blend.
So, presumably the smoke and ghosts on the Prehistoric Man level must be drawn actually pretty dark then, so they don't end looking too bright/overexposed?
And with the ghost, how come the black areas aren't just completely transparent (or don't appear to be) like when I try to do the same thing in Photoshop using either Lighten or Linear Dodge as suggested? It doesn't look like those black parts on the ghost are using overlapping sprites as they fade in and out of transparency too. Are they doing something there to keep the black lines on the ghost looking relatively black regardless of what part of the background he passes over? Or is that just a wee bit of optical illusion going on?
Re: Using colour math with additive blending
Yes, that's what happens when I try to do it in Photoshop [using linear dodge as suggested]; the black parts in my image just become totally transparent. So why doesn't the black on that ghost in Mario look like it's just fully transparent rather than always looking somewhat black (at least to my eyes)?turboxray wrote: ↑Sun Jul 10, 2022 12:38 pmIf it's additive, and the color added to the other color is black ( 0/0/0 ), then you've basically added nothing. It becomes complete see through.iNCEPTIONAL wrote: ↑Sun Jul 10, 2022 11:31 amAh, okay.rainwarrior wrote: ↑Sun Jul 10, 2022 11:25 am Both of those are just addition, no halving.
Addition can do a palette fade like you're seeing.
Add + Half is mostly limited to a 50% blend.
So, presumably the smoke and ghosts on the Prehistoric Man level must be drawn actually pretty dark then, so they don't end looking too bright/overexposed?
And with the ghost, how come the black areas aren't just completely transparent (or don't appear to be) like when I try to do the same thing in Photoshop using either Lighten or Linear Dodge as suggested? It doesn't look like those black parts on the ghost are using overlapping sprites as they fade in and out of transparency too. Are they doing something there to keep the black lines on the ghost looking relatively black regardless of what part of the background he passes over? Or is that just a wee bit of optical illusion going on?
Last edited by iNCEPTIONAL on Sun Jul 10, 2022 1:28 pm, edited 1 time in total.
Re: Using colour math with additive blending
Can anyone find some actual examples of art that benefit from *variable* alpha transparency? Not just a fixed level with some opaque parts, but true varying transparency. Not just anti-aliased edges either.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: Using colour math with additive blending
I'm going to presume you mean specifically on SNES.
Isn't that exactly what the glass beakers and test tubes with liquid in them in Pugsley's Scavenger Hunt do, where some parts of the glass are more or less transparent due to the use of white, various shades of grey and various shades of the colour for the liquid, and black sections?
Last edited by iNCEPTIONAL on Sun Jul 10, 2022 1:38 pm, edited 1 time in total.