Post transform alpha?

Blitz3D Forums/Blitz3D Programming/Post transform alpha?

AntonyWells(Posted 2004) [#1]
I.e, imagine a camera floating about your average fps level. Now, say you wanted to ALPHA in the seen polys of the level(I.e entityAlpha) so that they blend in. BUT, you want to do this *Without* drawing unseen polys(from that point of view)..Is this possible?

Additive blending is a mixed bag..serious overdraw, and simply doesn't work if you're using a lightmap, so the obvious solution isn't really a solution...


Rob Farley(Posted 2004) [#2]
The only way (i can see) you're going to do that is by processing everything that cam can see and chopping up faces, it would be a nightmare.

The reason why I say this is imagine you're looking at a T junction where you've got a corridor going to a corridor that crosses it. The back wall that you're seeing may only be a couple of triangles so there is hidden and visible stuff on the same triangles. This means working out what parts are visible and what parts aren't and rebuilding the mesh and sorting the uvs as necessary...

Good luck!

I'm sure Swift will be on the end of this post soon to give you a 14 screen explainatio :)


Sweenie(Posted 2004) [#3]
Do you mean that you want the scene to fade in from black or have i totally misunderstood you?


AntonyWells(Posted 2004) [#4]
That you have Sweenie. :)

Rob, yeah, I was thinking about methods like that, can't afford the cpu hit. I'm looking for an entirely hardware(I.e gpu) solution.
Additive blending on the entity does achieve this in one easy render. BUT, then we have other issues...scary, errie issues.

Ah well, Think I'll give the this idea a miss for now..


Michael Reitzenstein(Posted 2004) [#5]
RenderWorld, CopyRect to quad texture, RenderWorld again would probably be your best bet.


AntonyWells(Posted 2004) [#6]
Oh yeah, I know, use that method in the ninja time demo in user creations.

The best method, though imo is to render to texture, then re-render the scene at full size, and then render the quad over the final big render. That way you get the fx(Whatever that may be, radial/motion blur etc) without any of the blurring you get when just rendering a quad.
-

Reason I was asking for this is for ultra fast/smooth motion blur.

Try this, load up a fps..say rob's shell for example. Then call cameraClsMode cam,0,true to disable cls. And remove any manual cls. Then set entityAlpha on the level to 0.2

Result is really nice looking motion blur..but due to blitz's method of self-alpha you can see polys of the level that you shouldn't..

additive works. but of course additive never darkens, so you quickly end up with mad feedback..

Modulate 2x could work in theory..but that theory isn't working ;)