04-12-2020, 04:53 PM
Wow! A lot of replies happened during my break! How is everybody doing?
When I looking on Pearl sprite data, I find it strange that the sparkle ring palette is on 11th. Checking with other sprites confirm the palette is normally used for effects. So when I make all 11th palette to become alpha mask, this sprite appears:
[attachment=10482]
It is the same sprite with semi-transparent on my last post! Amazing!
Guess it is an example of the data DO exists. I just don't know what am I looking for, but "The truth is out there". Somewhere.
I also figured out the mean of value 3. For 1, it is PIXEL = FG + BG , and for 3, it is just PIXEL = (FG / 5) + BG . They are both additive blending, and is used multiple time on top of each other. Roa/Lumine on world map is using alpha mask like this to create lighting effect.
...Interesting. So that's how Playstation do alpha-blending, huh?
As for my question about translating RGB into RGBA, I managed to figured out the answer on my own.
Since additive blending is PIXEL = FG + BG , so by using an example:
rgb(136,136,136) + rgb(96,96,64) = rgb(232,232,200)
BUT once you converted rgb(136,136,136) into rgba(255,255,255,136) and assembled into sprite, the formula also changed to PIXEL = (FG.R * FG.A) + (BG * (1 - FG.A)) . It will prevent any part that do not require blending to be blend. Therefore, it will become
rgba(255,255,255,136) + rgb(96,96,64) = rgb(180,180,165)
The result is not the same anymore. It is less brighter than it should be.
For comparison:
[attachment=10483] [attachment=10484]
So even I able to keep (FG.R * FG.A) part correct, I am still screwed by (BG.R * (1 - FG.A)) part.
That sucks. I was hoping for a 100% faithful rip. Guess that's not going to happen.
What do you guys think? Can this problem be solve? Or do you guys consider it is good enough to be acceptable? Let me know.
Take care,
- Rufas
When I looking on Pearl sprite data, I find it strange that the sparkle ring palette is on 11th. Checking with other sprites confirm the palette is normally used for effects. So when I make all 11th palette to become alpha mask, this sprite appears:
[attachment=10482]
It is the same sprite with semi-transparent on my last post! Amazing!
Guess it is an example of the data DO exists. I just don't know what am I looking for, but "The truth is out there". Somewhere.
I also figured out the mean of value 3. For 1, it is PIXEL = FG + BG , and for 3, it is just PIXEL = (FG / 5) + BG . They are both additive blending, and is used multiple time on top of each other. Roa/Lumine on world map is using alpha mask like this to create lighting effect.
...Interesting. So that's how Playstation do alpha-blending, huh?
As for my question about translating RGB into RGBA, I managed to figured out the answer on my own.
Since additive blending is PIXEL = FG + BG , so by using an example:
rgb(136,136,136) + rgb(96,96,64) = rgb(232,232,200)
BUT once you converted rgb(136,136,136) into rgba(255,255,255,136) and assembled into sprite, the formula also changed to PIXEL = (FG.R * FG.A) + (BG * (1 - FG.A)) . It will prevent any part that do not require blending to be blend. Therefore, it will become
rgba(255,255,255,136) + rgb(96,96,64) = rgb(180,180,165)
The result is not the same anymore. It is less brighter than it should be.
For comparison:
[attachment=10483] [attachment=10484]
So even I able to keep (FG.R * FG.A) part correct, I am still screwed by (BG.R * (1 - FG.A)) part.
That sucks. I was hoping for a 100% faithful rip. Guess that's not going to happen.
What do you guys think? Can this problem be solve? Or do you guys consider it is good enough to be acceptable? Let me know.
Take care,
- Rufas