Jump to content

Can this be done?


You are about to reply to a thread that has been inactive for 4331 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have a .flv video file which has a transparent background.  I'm wondering if it is possible to create an object in second life, and add this video onto it.  So that the video will play in world, with a transparent background.

I have just started using SecondLife a few days ago and I know how to make an object and add a .gif with a transparent background to it.  I also know how to add videos from youtube onto objects.  However, I have been struggling with trying to figure out how to add a video like the one mentioned above.

Any help would be greatly appreciated.

Link to comment
Share on other sites

You can't directly apply a FLV file -- or any video file, for that matter -- to a prim surface.

What you'd have to do is have the FLV file hosted over at YouTube, and play it the way you've been doing with other YouTube videos.  However, I don't think alpha channels (i.e. transparency) are supported using that method, either, so I'm afraid the answer to your question is probably "you can't get there from here." 

Link to comment
Share on other sites

You can't directly apply a FLV file -- or any video file, for that matter -- to a prim surface.

What you'd have to do is have the FLV file hosted over at YouTube, and play it the way you've been doing with other YouTube videos.  However, I don't think alpha channels (i.e. transparency) are supported using that method, either, so I'm afraid the answer to your question is probably "you can't get there from here."

Yeah, that's what I thought.  You wouldn't happen to know of any video hosting sites that would retain the transparency when uploaded, would you?

 

Is it a lengthy animation file? You might be able to get away with using an animated texture if it's something simple that can be looped within a dozen or so frames.

It will be about 2 minutes.  You mean like an animated GIF/TIFF etc? Or something else?

Link to comment
Share on other sites

Penny was referring to an animated texture.  However, you can't just apply an animated GIF to a prim face, either; what you have to do is convert it to a single image that's divided into a mosaic of frames, then put a script into the prim to animate the texture by displaying one "tile" of the mosaic at a time.

The technique is descibed at the various LSL wikis, here:

http://lslwiki.net/lslwiki/wakka.php?wakka=llSetTextureAnim

http://wiki.secondlife.com/wiki/LlSetTextureAnim

However, that's not going to work for a 2-minute video.  Unfortunately, I don't know of any techinque that will permit what you're trying to do.

Why, exactly, is the transparency important, though? 

Link to comment
Share on other sites

I see, would that mean no sound?

Well I want to add a video of someone talking (in front of a blue screen which I want transparent) to be put onto an object.  Basically, they are giving a tour/talking about particular rooms and I'd prefer to have it transparent rather than put it on a wall and use the wall's texture as a background. 

Link to comment
Share on other sites

Well, yes and no...  You could do sound by uploading the sound file, then have the script start playing the sound at the same time it triggers the animation...  but again, I don't think the technique will work for a 2-minute video, as there's a maximum limit of 10 seconds on sound files (there are ways to work around this, by having the script actively queue up and play multiple files in sequence, but it gets complicated), and lip-synch won't be even remotely guaranteed.

You could, in theory, do the same thing by having multiple image sequence-mosaic files, and having the script switch the texture face from one to the next when it reaches the last frame/tile in the sequence... but this, too, would get complicated.  Plus, pre-loading two minutes' worth of sound and image files would be a significant burden on the player's viewer, and you can't necessarily guarantee that everything will pre-load before your script starts trying to play them. 

In the end, I'm afraid that what you're trying to do simply isn't possible, or practical, within the limits of the SL system.

Link to comment
Share on other sites


Indio Quinnell wrote:

Well, yes and no...  You could do sound by uploading the sound file, then have the script start playing the sound at the same time it triggers the animation...  but again, I don't think the technique will work for a 2-minute video, as there's a maximum limit of 10 seconds on sound files (there are ways to work around this, by having the script actively queue up and play multiple files in sequence, but it gets complicated), and lip-synch won't be even remotely guaranteed.

You could, in theory, do the same thing by having multiple image sequence-mosaic files, and having the script switch the texture face from one to the next when it reaches the last frame/tile in the sequence... but this, too, would get complicated.  Plus, pre-loading two minutes' worth of sound and image files would be a significant burden on the player's viewer, and you can't necessarily guarantee that everything will pre-load before your script starts trying to play them. 

In the end, I'm afraid that what you're trying to do simply isn't possible, or practical, within the limits of the SL system.

You're quite right.  In order to get 10-second sound clips to flow smoothly from one to the next, you need to be sure that they are exactly the same length (or at least all have known exact lengths), and you have to preload each clip individually before it is played. You can't just save a stack of preloaded sound clips. You have to preload one, play it while you preload the next, and so on.  In the best of all possible cases, you can piece together very long selections seamlessly if you are very careful.  Unfortunately, I have never seen the best case.  Lag invariably messes up timing, so that you get skips and dead spots.  Trying to sync a perfect sound file with a video would be hard enough.  When you add in the complications of a normal day in SL, it's hopeless.

If you weren't concerned with having a transparent packground, the best solution would be to host your video with sound on a streaming server somewhere and then simply show it on a prim in SL, using MOAP.  All the problems of gluing sound clips togetther and syncing them with the video would vanish, and your video could be as long as you want.  Unfortunately, your alpha requirement makes this option impossible, though, because there's no way to preserve the transparency that you might have in your original images (even if you could figure out how to do that part) once they are streamed to SL.

Link to comment
Share on other sites

Thank you both for your help.

I've managed to add videos to prims (without the transparent backgrounds), which I guess will suffice for now.  It is good to know that what I was trying to do isn't possible though, saves me spending any more time on it.

 

Link to comment
Share on other sites

  • 4 weeks later...

Indio

If you want a quick easy way to make animations from gif you can use  http://www.mrmonke.net/ 
It lets you upload an animated gif and edit it -in your browser- per frame.

You can pick what frames to use, what frames to skip in various ways and set animationspeed.
The site generates a texture to use in Second Life and a LSL script to use in secondlife.

Transparancy on a video would be quite cool though, i hope sometime in the future we get to give a chroma key and play streaming video with a transparancy :)

Animated gif's are limited to length and or quality depending on the source and t he texture size only being 1024 :(

 

IF you want it on an object maybe blend it in a video editor with the way the object looks?.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4331 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...