Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: theora video with transparencies (alpha)?  (Read 5927 times)

0 Members and 1 Guest are viewing this topic.

Helgiii

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
theora video with transparencies (alpha)?
« on: January 30, 2008, 05:00:16 PM »

1. Is there a way I can create theora coded video with transparent background.. that I would play on top of the scene

2. Is this way (video) a better choice than mere displaying a long frame sequence... say 5 seconds with a fine framerate

guess the animated sprite should be faster.. because images are precached and video is streamed, plus the codec is taking its time
Logged

Helgiii

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
Re: theora video with transparencies (alpha)?
« Reply #1 on: January 30, 2008, 05:08:01 PM »

And in addition to the first 2 questions:
For example... I click an object with my actor selected...
then the actor comes up to the object, takes it, throws it up in the air, takes out a big gun...and makes lots of holes in it.
so the animation is going to be big enough

What's the better way to script this kind of stuff.. use sprites, videos..

I suppose I gotto use animated sprites for both the object and the actor.. And load them when the scene loads as these animations are going to be scene-specific (and use mergeanimation for the actor).... is there a better solution? should I apply video instead of sprites?

thanks for listening:) bye
« Last Edit: January 30, 2008, 05:10:31 PM by Helgiii »
Logged

Helgiii

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
Re: theora video with transparencies (alpha)?
« Reply #2 on: January 30, 2008, 05:20:56 PM »

I found a method of the entity's class

PlayTheora(Filename, Looping, AlphaImage)

AlphaImage
Specifies the image to be used for an alpha channel underlying the video playback (optional)

so it's one alpha mask that cuts all frames? is it possible to have separate alphas for each frame?
Logged

Finn

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 11
    • View Profile
Re: theora video with transparencies (alpha)?
« Reply #3 on: January 31, 2008, 03:26:16 PM »

Yup, I'm afraid so - it's one alpha mask per ogg animation. Make sure your alpha is 32 bit colour resolution.

See this thread for more talk on it (scroll down a few posts):
http://forum.dead-code.org/index.php?topic=1738.0
It has a code example, etc.

It's something you'd use for putting, say, rippling water or a rolling sky into a scene.

For your gun totting animation (I was going to add in shootin' tootin' but that seemed a bit too much ;D) you'd probably be better off drawing/rendering out each frame with a transparent background (PNG or TGA) and then creating an animated WME sprite with them. If it's a one off anim, you could have the character and object in the same image - no need to do two different sprites (just remember to remove the object from the scene once the anim kicks off). Think of it as a cartoon animation cell.
Logged

Helgiii

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 18
    • View Profile
Re: theora video with transparencies (alpha)?
« Reply #4 on: February 01, 2008, 09:56:56 AM »

ok thanks..
actually I felt this is the better way.. just wanted to find out if video could be applied and used somehow to optimize things..
guess mere animated sprite is quite enough..
gotto test this out and see the frame rate (I mean long big, rare animations)
Logged
 

Page created in 0.034 seconds with 19 queries.