how can i play like a prerenderd animation before my game starts?
Do you mean a cut scene, or animations for objects in-game?
sounds like you want to make a cutscene. search for “video texture module”.
you would play the video texture in your cutscene-scene and after playing the video switch to the game scene.
yea its a cut scene is what i want to do in game to were i plays then switches back to game mode
You can create a new scene for the cut scene and call it for example “cut scene”. In this you have a camera and a plane. The plane has a video texture of the pre-rendered video file. This plays until it’s over and you can add a delay sensor to the camera to change scene once it’s done.
i thought you have to have some sort of script cause i have tried to just put a video on a plane and play it and it didnt work
Use the video texture module. If it isn’t working, double check if everything’s right, if that doesn’t work, try a newer or different build of blender.
were is the video texture module and i have the latest build download now
Why do they have to make it so complicated ?
I know, I’ve also been having trouble with it. it’s extremely complicated for such a simple function.
just to see something, download this
but must replace the script :
copy and paste this on the script “VideoUpdate.py”
import bge
import VideoTexture
cn=bge.logic.getCurrentController()
ow=cn.owner
key=bge.logic.keyboard.events
if not "init" in ow:
ow["init"]=1
#if not hasattr(bge, 'video'):
matID = VideoTexture.materialID(ow, 'IMvideo.png')
bge.video = VideoTexture.Texture(ow, matID)
bge.sources = [None,None]
movie = bge.logic.expandPath('//video.mpg') #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
bge.sources[0] = VideoTexture.VideoFFmpeg(movie)
movie = bge.logic.expandPath('//video2.mpg') #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
bge.sources[1] = VideoTexture.VideoFFmpeg(movie)
bge.current = 1
bge.video.source = bge.sources[bge.current]
bge.video.source.scale = True
bge.video.source.flip = True
bge.video.source.repeat = 1
bge.video.source.play()
if hasattr(bge, 'video'):
bge.video.refresh(True)
at the line with #<<<<<<<<<<<<<<<<<<<<<<<<<<
put the right name , ex batman.mpg
which must be in the same directory of .blend (ex desktop)
I see the video but not sure if work well, I think which should be two video, but I see only one
a cool !
much better this , not have script jurassik!
on the left-bottom
http://www.tutorialsforblender3d.com/Game_Engine/VideoTexture/VideoTexture_Movie_1.html
thanks for the script ill see if it works
does the video have to be a mpg