Hi,
I would like to export my OpenGL animation which runs smoothly at 60 to a
QuickTime movie running at 30 FPS. Actually my results look like a strobo
effect. Very bad. The problem is the motion blur. Someone told me I have to
stretch my animation to a duration multiple of 30, then mix 4 GL frames per
each QT movie frame. I did so, but I cannot understand whether:
1) I have to render the 4 frames then mix them with "drawInRect".
Basically I put the Front Buffer to a NSImage, then I create an array
containing the 4 images to be blurred, then I mix the 4 images with
"drawRect" using alpha = 1.0 for the first image and alpha = 0.5 for
the next 3 images:
------------
NSImage *workImage = [[NSImage alloc] initWithSize:gOriginalSize];
int i, totImages = [blurredImages count];
float alpha = 1.0;
[workImage lockFocus];
for(i = 0; i < totImages; i++){
[[NSGraphicsContext currentContext] setShouldAntialias:YES];
[[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationHigh];
[[blurredImages objectAtIndex:i] drawInRect:gOriginalRect
fromRect:gOriginalRect
operation:NSCompositeSourceOver fraction:alpha];
alpha = 0.5;
}
[workImage unlockFocus];
return [workImage autorelease];
------------
2) I have to mix the 4 frames with the accumulation buffer then render
the result to a final image. Here I don't know anything.
3) I have to render the 4 frames decreasing the alpha value of the
diffuse color of each moving object such a way the objects become
even more transparent. E.g.
Frame 1, globalAlpha = 1.0
Frame 2, globalAlpha = 0.5
Frame 3, globalAlpha = 0.25
Frame 4, globalAlpha = 0.125
Is anyone here who can point me to the right direction?
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden
This email sent to email@hidden