Video of Actors - Best Practices?

As part of our current project, we hope to have some “real” people come and talk to the game player. I’m assuming/hoping that I can do this by shooting the talent in front a green screen, knocking them out, and then placing the Alpha channeled footage on a plane (the viewer wouldn’t be allowed to move).

Is this the best way to go about this? Would it work as an animated texture? Would it be better to simply make a big GUI with a still shot of the scene the actor would be composited into that had animated elements as part of it?

Thanks.

Unfortunately, the video format which Unity uses does not support alpha channels. Maybe your actors could appear on video monitors to avoid trying to comp them in a realtime scene.

Kevin

Ewww. Shoot. Hmmm, does Unity support animated textures at all (as in sequential stills rather than a quicktime movie)?

Yes, you can have an array of textures, and flip through them as you desire. Of course the size would quickly add up here, but at least you can use DXT5 compression.

–Eric

A year and a half ago, Aras Posted this script to one of my posts asking the same question. Thanks Aras!

var materials : Material[]; 
var changeInterval = 0.33; 

function Update() 
{ 
    // if no materials are setup, do nothing (to prevent division by zero) 
    if( materials.length == 0 ) 
        return; 

    // we want this material index now 
    var index : int = Time.time / changeInterval; 
    // take a modulo with materials size so that animation repeats 
    index = index % materials.length; 
    // assign it 
    renderer.sharedMaterial = materials[index]; 
}

Its a good script to keep handy
AC

How about, extend the QuickTime plugin to include an alpha channel into the texture it hands off to OpenGL?

The lack of an alpa channel has to do with the video codec Unity uses (OGG), no so much with QuickTime.

Also, the Quicktime codecs that do include alpha channels (“PNG”, “Animation”) are not efficient formats for realtime. They create large files and they require a lot of CPU power to decompress. They’d be pretty awful inside a game environment. Thats one of the reasons you rarely see alpha’d video in a video game.

Kevin