gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > March of the Minis blending/antialiasing

#118958 - Touchstone - Sun Feb 18, 2007 4:51 pm

I have just seen March of the Minis on the DS and it looks amazing! I'm really curious to know how they have done all the blending. They have three parallax scrolled layers that are blended against each other, and on top of that every sprite is anti-aliased against the three blended bg's. I really doubt they can do it all in software so it must use hardware, and to my knowledge that can't be done with sprites and background layers.

Soo..

Would it be possible to do all that blending with polygons? I was under the impression that there can't be different levels of transparency on one single texture, so does that mean they have a bunch of textures, one for each transparency level, thus using loads of texture memory, or do they use the polygon edge antialiasing in the hardware somehow? Any thoughts?
_________________
You can't beat our meat

#118959 - Lick - Sun Feb 18, 2007 4:57 pm

The 3D hardware has a weird anti-aliasing system that works with polygon-IDs. If the minis are ID0, and the background is ID1, then the parts where the minis and background collide will be anti-aliased.
Textures with multiple alpha-bits are available.
_________________
http://licklick.wordpress.com

#118961 - silent_code - Sun Feb 18, 2007 5:33 pm

check if overlapping sprites get antialiased.
normally the results of the ds' hw aa is very good and it comes virtually for free. it uses the blending hw to blend different poly ids agains each other when doing aa.
i haven't tried aa with transparency, though.

#118986 - Touchstone - Sun Feb 18, 2007 10:18 pm

Lick wrote:
The 3D hardware has a weird anti-aliasing system that works with polygon-IDs. If the minis are ID0, and the background is ID1, then the parts where the minis and background collide will be anti-aliased.
Textures with multiple alpha-bits are available.

This is only done on polygon edges I assume, because the DS wouldn't know the subpixel precision of a texture. The sprites are so smoothly rounded though. http://www.pokewhat.com/temp/march_minis.png

But the multiple alpha bits in a texture sounds interesting. So you can actually have different levels of alpha blending in one texture? I did not now that, I thought you had one blend level for the entire polygon. If that's possible then that must be how they do it. If they can fit all the animation frames in VRAM at once. There is a ton of frames!

silent_code wrote:
check if overlapping sprites get antialiased.
normally the results of the ds' hw aa is very good and it comes virtually for free.

Overlapping sprites do get antialiased. But I guess they have different polygon ID's. And even if they have more sprites than available poly ID's on screen at the same time they only have to give unique ID's to the polygons that are overlapping.
_________________
You can't beat our meat

#119166 - silent_code - Tue Feb 20, 2007 12:08 pm

yes, you can have multiple alpha levels in a single texture - if you sacrifice color depth. e.g. there's a texture fromat that supports a4 bit alpha channel. but as all textures must be max. 16bit (afaik) you then have only 4bit per color channel left.

#119195 - Touchstone - Tue Feb 20, 2007 6:26 pm

silent_code wrote:
...supports a4 bit alpha channel. but as all textures must be max. 16bit (afaik) you then have only 4bit per color channel left.

Hmm, I doubt they only use 16 colours, or even 32 colours, for the Mario sprites, but I guess one character can be built out of a bunch of polygons, making it seem like they have more than 16 colours per texture. Hmm. I quite like this idea. I'm gonna make an amazing looking game now! :D
_________________
You can't beat our meat

#119197 - Firon - Tue Feb 20, 2007 6:53 pm

4 bits per color channel, not 4 bits total. You'd have a 12-bit color image with 4 bits of alpha.

#119204 - tepples - Tue Feb 20, 2007 7:54 pm

You'd be surprised what you can do with 15 colors if you take five basic colors and use dark, medium, and bright versions of those colors.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#119222 - Sausage Boy - Tue Feb 20, 2007 10:19 pm

There are two semi transparent texture modes, and they're both indexed, and they both use 8 bits per pixel. One is 8 levels (3bits) of alpha and 32 colors (5bits), and the other one is other way around.
_________________
"no offense, but this is the gayest game ever"

#119280 - silent_code - Wed Feb 21, 2007 2:03 pm

usually, for sprites, you get away with less than 16 colors and it looks very nice. for mario you'd need some red, blue, b/w and some skin tone. then take three variations of red/blue/skin and you're fine (with 11 colors, so there's still more room for other variations / "manual color smoothing").

and yes, you can use multiple sprites. like on the gbc, where each sprite could only have like 1 reference to a sub palette with each sub palette entry having 4 colors or something.