Using movies and music while in 3d mode

Blitz3D Forums/Blitz3D Beginners Area/Using movies and music while in 3d mode

Mikorians(Posted 2012) [#1]
Is there a sample I should know about?

I tried to adapt the play movie sample to my 3D bb program and I forget right now whether it said memory violation or outright crashed on me.

Can someone provide the proper techique for my cut scenes?
Thanks in advance!


Kryzon(Posted 2012) [#2]
Hi Mikorians. Try using the forum search for 'DrawMovie', filtered for Blitz3D-only discussions:

http://blitzbasic.com/Community/_search.php?bbs=Blitz3D&forum=&terms=DrawMovie&method=simple&case=no&results=topic&user=&submit=Search

Also, have you thought of using real-time cutscenes?

On the subject of music, if you're playing something loaded with OpenMovie then whatever audio track is contained within the movie file will be played the moment it's loaded. You won't have channel control over volume, pitch or panning though.
So you might want to render out you audio track to a separate PCM file (WAV, MP3 etc.) and remove the original one from the movie file.
Then you can load the audio track with LoadSound() and play it the next line of code right after loading the pre-rendered movie or starting the real-time 3d cutscene sequence.

We don't have access to streaming in Blitz3D, otherwise you'd be able to stream the audio along with the animation as to avoid syncing issues.
Nevertheless, most of the time you can get away with simply starting the movie sequence and then playing the soundtrack right after - you'll find there's no desync between the media if done right.

Last edited 2012


Mikorians(Posted 2012) [#3]
ah. I'll try drawmovie to texture and render to object!

[UPDATE]
The best one was the avi frame playback module - lengthy, but---
I have adapted it and it is the fastest SOG of all I saw.
It doesn't seem to degrade the frame rate of the 3D scene below as much as the other samples did.
And I noted that we can already play mp3 files - unlike directx8/9 without directshow

Last edited 2012