DrawMovie with rotation ?
Blitz3D Forums/Blitz3D Programming/DrawMovie with rotation ?
| ||
[edit] Just found BlitzMovie -problem solved (probably) [/edit] I have some AVI files that I took in portrait mode with my digital camera. I have tried rotating them in Windows Moviemaker (without success) or trying to find some other editor... no luck. ... so I thought it might be easy to just knock up a little player in B3D and use a rotated camera (or entity - whichever is easiest) to show the movies. The DrawMovie is a 2D command, so is there any easy way to get it drawn onto an entity (e.g. a face of a cube.) I seem to recall seeing an example that does this, but can't locate it in the CodeArcs or the Samples folder. A mpg player has been removed from the codearcs :-( and I seem to recall jfk working on movie blitting stuff. I guess that we are talking about locking buffers and drawing to them,etc. - just wonder if this exists anywhere already as this is a throwaway example to please my nephews and niece (who star in the clips.) Can anyone help ? |
| ||
I know you've found your solution, but couldn't you setbuffer texturebuffer(texture), then draw the movie to the texture? |
| ||
This should work: (Obviously just change the movie filename, to the one your using :o) )Graphics3D 800,600 SetBuffer BackBuffer() Global camera = CreateCamera() PositionEntity camera,0,0,-5 Global cube = CreateCube() Global texture = CreateTexture(512,512) EntityTexture cube,texture Global movie = OpenMovie("movie.mpg") While Not KeyHit(1) TurnEntity cube,1,1,0 SetBuffer TextureBuffer(texture) DrawMovie movie,0,0 SetBuffer BackBuffer() UpdateWorld RenderWorld Flip Wend End |
| ||
That's spot on RossC. With a little bit of tweaking I should have a multi-faced video cube up and running soon. U r0xx0r... err... or something like that ! |