re-write mat file controlling .tga file to one controlling a video file

4 views (last 30 days)
[ClassInfo]
ClassName TMaterial
[Layer0]
TextureName background.wmv
tfNoWriteZ 1
tfNoDegradation 1
tfMinLinear 1
tfMagLinear 1
The above contents of a mat file control the apperance in game of a static image .tga file which functions as a menu background to a loading facility.
the game has an open source philospohy where users (the public owners) may manipulate certain files in the game (made openly availaable such as config.ini etc). This is so the game's potential increases with public use and innovation inside the game.
i would like to re-write this mat file to display a video file instead of the .tga file. Is it possible?
I am not familiar with matlab being of the FORTRAN generation.
Thanks in advance
  1 Comment
Image Analyst
Image Analyst on 16 Feb 2013
Wow, that's a blast from the past. I haven't heard of anyone using tga files (targa) in at least 20 years!

Sign in to comment.

Answers (2)

Image Analyst
Image Analyst on 16 Feb 2013
A mat file is just a data file. So writing or re-writing a mat file (which you do with the save() function) does not display anything. You can display things with image(), imshow(), imagesc(), and movie(). I'm not sure how your mat file is involved at all. For your video file, you can read that in with the VideoReader Class. Feel free to explain better what you have and what you want to do.
  3 Comments
Walter Roberson
Walter Roberson on 18 Feb 2013
Is this a text file that can be edited?
If you go into MATLAB and ask
whos -file background.mat
then what does it respond?

Sign in to comment.


Walter Roberson
Walter Roberson on 16 Feb 2013
Who knows? That isn't a .mat file, and there is no reference there to a .tga file. It does appear to reference background.wmv which is probably a Windows Media Video file, so if that is indicating something to be displayed perhaps you just need to change the name of the file listed in the texture.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!