Game Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesGame Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 27th, 2011, 11:20 AM
SnowsportsSid SnowsportsSid is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2011
Posts: 1 SnowsportsSid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 53 sec
Reputation Power: 0
SDL, .mov video files and alpha channels

Good afternoon everyone,

I've been using C++ and SDL to write a basic 2D game. I've come to a point where I want to put in some nice looking explosion animations. My theory on this was that I could take a video file, split it into it's constituent frames, so I had an array of image files, then load these image files into my game and use some looping to cycle through them.

I managed to source a nice explosion video that came in .mov (Quicktime?) format and also had an alpha channel, which, correct me if I'm wrong, but I assumed to mean was an explosion on a transparent background. I realised that I could use VirtualDub to split my video into it's constituent frames. However, I found that I was unable to open a .mov in VirtualDub. I worked around this by converting the .mov to a .avi using WinFF. I was then able to open the file in VirtualDub and split the video into individual .png (transparency support) frames.

After doing this, I loaded my .png image files into GIMP and noticed that the explosion was on a black background, not transparent, which I found a little bit disapointing. I think I read somewhere that .avi does not support transparency and therefore I concluded that I had probably lost the alpha channel when converting the video from .mov to .avi using WinFF?

Now, I realise that I can use SDL's SetColorKey function to render the black background as transparent at runtime. However, I wondered whether I was going about things in the right way... Do games developers working with SDL generally deliver the transparency at runtime using SetColorKey, or is there a better way / programs to use to convert the video in the first place? How do other developers using SDL go about incorporating videos into their games in this kind of context?

Any comments and advice would be greatly appreciated!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesGame Development > SDL, .mov video files and alpha channels

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap