Sign in to follow this  

Analytical motion blur

This topic is 4203 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm doing analytical motion blur by changing a sphere to a capsule as the sphere's velocity increases. The problem I have is that I want to gradualy make the capsule transparent along its z axis and I wonder if there is a better way than using a texture with an alpha channel to achieve this. A texture with an alpha channel doesn't look right in some camera angles (looking completely from the top for instance). Any suggestions on how to solve this?

Share this post


Link to post
Share on other sites
What about per-vertex transparency:

Add color values to each vertex of your sphere/cylinder (via glColor4() preceding your glVertex() calls or some glColorPointer(), etc.) using glBlendFunc(GL_SRC, GL_ONE_MINUS_SRC) & glShadeModel(GL_SMOOTH).

Another option should be the use of some vertex/fragment shaders...


[Edited by - zimerman on June 16, 2006 7:41:26 AM]

Share this post


Link to post
Share on other sites
May by use that:
float bf = 0.75f;
bf = powf(bf, 50 * frameTime);
bf -= 0.001f;
glAccum(GL_MULT, bf);
glAccum(GL_ACCUM, 1.0f - bf);
glAccum(GL_RETURN, 1);

Share this post


Link to post
Share on other sites
Look into either vertex shaders and/or pixel shaders, you will find the solution to you problem there. HLSL, Cg and GLSL are the three in which to concentrate on. HLSL is used for DirectX, GLSL is used for OpenGL and Cg is used for both DirectX and OpenGL but I think it only works on NVidia cards(???)

Share this post


Link to post
Share on other sites
Quote:
Original post by rpg_code_master
Cg is used for both DirectX and OpenGL but I think it only works on NVidia cards(???)


Nope, it works on all cards which support at least the ARB assembler vp/fp extensions, on NV it will make use of their custom extensions if you select the profile and on ATI it'll either use the arb extensions or you can now target GLSL in the most recent version.

Share this post


Link to post
Share on other sites

This topic is 4203 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this