next gen and alpha

Miscellaneous Forums/General Discussion/next gen and alpha

Its amusing to me that everyone wanting the latest generation of shaders and all the other bells and whistles might want to realise that alpha transparency in next gen is so slow as to make it almost unuseable.
uisng alpha test( 1 bit alpha) is one option (still slow) or unlit alpha blenidng, but is a very poor solution IMHO.
is this a case of one step forward and 3 back I wonder.
I also wonder if this will be a problem in Bmax 3d.

another annoying thing is that for shadow volumes you have to make all your meshes 'air tight' ie no open edges at all, so whereas in the past you could break off faces that the camera would never see, you can't do that now.

What are exactly talking off?

Have not had much problems with alpha stuff as long as I don't have the stupid idea to activate Alpha Anti Alias on my ATI drivers.

And even that is only slow because a 9700 is not meant to use a feature that is only hardware implemented into the X1000 series :-)

Sure they are still slower than non alpha textures, but that has nothing to do with the alpha on the texture, but with the more work in the engine for a correct alpha blend sorting.

I am talking about next gen engines 'Dreamora' and without correct alpha sorting , it will look crap.
you can't just turn off alpha sorting and call that a solution.

If you notice a lot of xbox 360 games either have 1 bit alpha for hair or the hair is modelled clay like as volumes, which looks appaling
apparently for each level of sorting , the scene gets completely redrawn. i don't know the full technical ins and outs of this, but just know that alpha blending is now not an option for hair unless its unlit.
it reduces the frame rate by up to 80 percent

If you notice, Xbox 360s chipset lacks some features that would allow a performant handling of any kind of situation (at least for now and the next 2 years until the needed programming paradigms exist for paralleled programming without OOE support) so I would not take it as a reference.

As you see with the HL2 engine and others, alpha is definitely usable and not as you mention "almost unuseable", but perhaps you refer to a very specific situation and everything, that would need a new type of depth buffer.
The only thing that falls into this section to me are Shader 3 effects just because the broad majority has nothing of it.

'alpha is definitely usable and not as you mention "almost unuseable'

you are just wrong on this, hl2 is not really a fully next gen engine, it barely uses normal mapping.

Unreal engine 3 and doom3 engine I am talking about mainly , with doom 3 you have to choose between alpha blending and normal mapping, just too expensive to have both.

had a simlar discussion on polycount forum and quoting from one of the posters who replied :

That's interesting about Doom 3 and alpha. I'd bet it was a performance choice, similar to how characters can only be lit by one light at a time.

One trick we've used to get soft-alpha to sort in the proper order is to divide the mesh up into chunks by material, so that even though the surface is a single entity (head of hair, or whole tree), it gets sent to the vertex cache in separate chunks, so then each can be sorted against the others, for better layering.

Problem is, this can be very slow, since (as I understand it) you can only have one chunk at a time in the cache, clearing it out and loading the next one takes time. Then there's the fill-rate issue on top of that, rendering each chunk in its entirety before rendering the next one, etc.

Alpha-test seems to avoid all that, so it's super fast, you can just send a single chunk for the whole tree (or attach multiple trees together as one massive chunk, so it's even faster). The clear texels are simply not drawn, so you don't have to render as many of those underlying never-seen pixels.

This is common to all engines, not just next-gen.

But alpha blending was fast enough previously to be used( PS2, xbox), but now it seems we can't.

Its not just me saying this, the programmers and technical artists at work are feeding me this stuff as well as other artists/programmers from other companies

seems that in practise we are told that 'alpha test'( 1 bit aplha) is useable sparingly, but alpha blending is hideously expensive and don't even think about depth sorting as each layer of transparency means the 'whole' scene gets re rendered for each layer.

I am sure ther will have to be a specialised solution written for this problem, but i don't think it will be adressed anytime soon.

Consoles should never be taken into account for things that connects GPU with CPU and other components.
Their hardware is highly optimised for the special task of realtime rendering, this includes especially the connection of RAM <-> GPU <-> CPU which is worlds faster than any desktop system can reach (even notebooks are better than desktop). At least I know for example no one having 1T RAM in his system as a GameCube for example.

Due to this special hardware config, they can afford to do stuff, that would be too slow on a PC.
You should also consider, that the mentioned consoles have a lower texture size than any of the next gen engines you mentioned, because 32MB / 48MB of total RAM. So they can do stuff that would take too much time on a PC (256x256 vs 1024x1024 -> 1:16).

I am not even taking their special GPU into account (beside MS console), which gives them abilities, your PC won't see anytime soon.


Btw: Which console game uses alpha blend that much that it is even worth mentioning? I saw a lot of other blends and some vertex alpha stuff, but not really alpha textures or not in an amount that would make them worth mentioning.


Fact is the actual GPU generations are not focused that much around alpha because other things seem to be more important, stuff like Blooming effect or HDRi ... this is why it took till now until anti alias learned how to work on Alpha Textures.

I would say the next generations will become better on handling alpha stuff.

so you think most of the characters should have no hair then? or 1 bit alpha hair which looks terrible. no windows , bottles or glasses in front of each other.
as you well know 1 bit alpha is either transparent or not transparent.
perhaps we could have invisible bottles

imagine 1 alpha blend bottle in a scene. even that causes major slowdowns and i am talking 80 percent slowdown because of the way the sorting works.

i think you should n't underestimate how important alpha is in a game engine as it used very commonly.

the only way to do fast alpha blends it to make the texture unlit, which means you can't have a shader on it.

woow, nice anisotropic hair shader that we can't use . whats the use in that?

How can the console not be taken in to account when that is the platorm we are designing for?

I was actually referring to xbox 360 which is a next gen console is it not?

the reason xbox 360 is not using alpha blend to great effect is because it too damn slow.

most ps2 and xbox games were using alpha to a great effect and its inexcusable that we can't use it properly in next gen engines.
I cant really see where you are going with this dreamorama?

xbox 360 can use up to 2048x textures BTW, though more common will be 1024x max.

look at perfect dark, her hair is 1 bit alpha and looks pretty lame

next gen is here now and I really hope they sort this stuff out, because it's lame as it is as we seem to be moving forward in respect, but backwards in another


But alpha blending was fast enough previously to be used( PS2, xbox), but now it seems we can't.



Did we not get Alpha Blending on PS1 with TOCA2?

probably, but i wasn't suggesting that aplha blending had just arrived:), just that it was useable , but now its too slow

Yeah, and I was proving just how long ago we had it :)

You mix up something there.

The stuff you mentioned for alpha was alpha through vertex alpha in most cases which is not the same as alpha in the generation you mention them mostly use vertex alpha to make regular textures transparent. Even the quote you made refers to vertex through textures.
The later has came up the last few years as the GPU became fast enough to do this kind of stuff on an acceptable level. (the PS2 chip came definitely before that)
But the games alpha and not to texture alpha.
For a transparent material you don't need transparent textures, you can modify

btw: You mention no where that you refer to XBox 360 in any way. As said, actual GPUs have alpha texture antialias support which does what the regular AA did the last years, so you don't need an AA shader for that.

Theoretically we hould assume that X360 is able of it as well as it is an overheating load PC. I would assume that the real consoles are capable of more interesting realtime stuff as it was not build around the "PC" way of doing stuff.

If Tekken3 used vertex alpha, then there are many, many, many polies on the level where you fight that tiger-dude :)

I imagine that was one-bit-alpha, or masking?

Im no expert, but how was that done?

I was referring to texure alpha as in you draw the alpha in your alpha channel in photoshop, so you can for example make the hair look soft at the edges rather than carboard cut out which looks naff.
vertex alpha would be too simplistic for this purpose as the hair would need more polys

cygnus - not sure, never played it, but you really can't beat alpha blending for hair which is the main thing I use it for.
I am going round to carmacks house to threaten him unless something is done

BTYW i wonder how max 3d will cope with this issue


no windows , bottles or glasses



Why wouldn't you just use a refractive shader on these things? Additionally, a lot of these things you mention can be polygon modeled and don't have to be faked with a texture anymore (although you can also map shaders to textures and have multiple textures per model). I think hair can be done with shaders as well can it not? I definitely don't remember the hair in Perfect Dark as looking bad myself. Look at Kameo ... that has a great fur shader anyway. I think you're relying on the old ways too much and not embracing the new technology.

Shaders rule!


ha ha well if someone at work can make a hair shader that doesn't rely on transparency then i will be happy

i agree that shaders are really nice, but it remains to be seen if they are any cheaper
i suppose one way around would be to have a shader that blurs the edges of polygons, so the hair at least looks soft. so yeah an anisotropic hair shader with soft edges

BTW would a refractive shader be very similar to a transparency mask in terms of how expensive it is?

really jeremy i have yet to see 'modelled' hair that looks great or were you thinking of something else since you did n't get in to specifics

I have to go play Perfect Dark again to see what you were talking about. I know the Kameo fur looks really nice but that's not hair really. I've definitely seen some shots of the clunky clay hair (actually I did a mop top myself like that by placing a bump map on the standard texture). I personally don't mind it but I can see what you're talking about.

yeah i think it was perfect dark where her hair seems to be just 1 bit alpha.
suppose thats passable for some hairstyles, but still far form perfect

Not quite sure what you're talking about Ruz, hair shaders or alpha? As far as transparency goes very good results can be achieved with shaders at very very low cost. On my 6800gt it is probably a few times faster to use shaders for alpha than things such as ancient vertex alpha you mentioned. If you're talking about hair shaders, there are many of them out there depending on what solution you are looking for. Have you seen the NVidia NALU (mermaid) demo? Thats a nice hair shader. RenderMonkey has a very cool shader example there too, but it probably isnt the style of hair you're looking for. There are tons of ways to simulate hair and if you can write smart shaders they will work on todays hardware. If you just want semi-transparent hair with strands, that's the easiest. You can use an alpha-map on a shader, and you should know that alpha blending or alpha maps in shaders are totally different than the blend modes you have in blitz3d, the only similarity is that there is an alpha map and nothing else.

I was actually talking about alpha blending in unreal engine 3 and doom 3 engine, not in blitz3d
They are both very, very slow with alpha sorting and transparency, so the cost is not low at all, its very high.


This is plain fact and there is currently no workaround



each level of sorting reduces the FPS by about 20 percent because the entire scene gets re drawn


Again the only 'cheap' alpha blending is unlit

aggh i did n't even say vertex alpha would be viable as a solution, I said 'alpha blending' or 1 bit alpha which are both slow as hell in next gen .
nextgen shaders have components like alpha, specular, normal map, transmission etc, so you can't just ditch the alpha component and hope to get nice looking traansparency.

Lenn did you read any of the above posts at all?

BTW the render monkey example uses alpha blend masks as well as the anisotropic component and the hair mesh is more than 6000 polys

I don't think you are correct on the whole scene having to be redrawn. Maybe that's what those engines do ... maybe it depends on the type of structure the alpha is applied to. I can see that with TSE currently ... it seems to be able to drawn an 'alpha'd' component separately whereever it wants on the screen. I've noticed some strange occurances because of this ... but honestly I don't know what's going on behind the scenes. I would think the hardware at this point is designed for many alpha transparency effects in mind. I've certainly seen no shortage of it in current games.

Additionally, maybe the game's running at 1,000 fps without alpha effects?

well I can only report what I hear from the coders at work jeremy and thats what they say

suppose its something to do with the multipass aspect to some shaders.

well I can see how complex lighting on scenery is going to cause problems. like if you had some kind of simple radiosity bounced lighting. Its possible that you may have to render more objects in the scene to get the correct lighting through and alpha shader.

To be honest none of this stuff bothers me much though. Most engines have alpha sorting issues whether they are old or new. Blitz3D being particularly bad.

well yeah i felt the same when working on ps2 stuff we had loads of z sorting issues. we had the rugby crowd, fences , fences in front of other fences. what a pain

but it never slowed everyhting down to a halt.

obviously dynamic ligting combined with lots of shaders, alpha transparency and normal maps will cause major speed issues.

Yea i read some of them, the first few.

Hmm, a shader can shade all the transparent objects in 2 passes with all effects enabled on them, including multiple lights, etcetc, whatever you give to the shader. It does that in the pixel shader by taking first the scene with the transparent objects completely see-thru and in the second pass adding alpha blended colour to pixels which belong to the transparent object. Then it adds all the lighting info (or any other info you give to the shader which could be anything including specular, emmisive, etc) to that pixel and outputs the final. And i'm not sure but i think it can be done in one pass, only i dont want to risk saying something im not 100% sure about.

yeah sure. he he it is possible that we were told this so that we wouldn't use alpha at all.
I think this real slowdown is caused by the auto depth sorting.

Lol, PS2 had ridiculous sorting issues. At least in our engine, we had to give everything extra thickness as in a 1:1 scale level built in max, any thinner than .2 units with back faces would start fighting, whether it was alpha or not.

This was a while ago, but kind of explained why a lot of games had a fairly chunky look.

we had to seperate out all the alpha stuff and label it . ie fences, trees etc