Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Object on top of .avi animation

Author
Message
047
17
Years of Service
User Offline
Joined: 4th Jun 2006
Location:
Posted: 18th Oct 2009 20:04
Is there a way to make an object appear on top of an .avi animation?
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 19th Oct 2009 00:06
There are a couple ways. The easiest way is to use
DRAW TO BACK. Call this somewhere before you display any 2d on the screen (don't keep repeating it in a loop though). This will put all 2d (except sprites) behind all 3d. When you want the 2d back in front use DRAW TO FRONT.

You can also play an animation on another bitmap. Bitmap, in this case, means an offscreen or hidden drawing area that has the same properties as the main drawing area except you can control it's size. You create an offscreen bitmap with
CREATE BITMAP number,width,height. But once you create a bitmap, all drawing is done there so any 2d will not show up on bitmap 0 (the main drawing screen) until you switch the screens with SET CURRENT BITMAP bitmap number or use COPY BITMAP from,to, or get the image from the hidden bitmap.

Once the animation is playing on another bitmap, you can use GET IMAGE to capture each frame and texture them onto another 3d object - like a plain. You then could position the plain anywhere you want in your 3d world. The pseudo code looks like this



Enjoy your day.

Login to post a reply

Server time is: 2024-05-04 01:39:38
Your offset time is: 2024-05-04 01:39:38