Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Flash file support!!!

Lordfly Digeridoo
Prim Orchestrator
Join date: 21 Jul 2003
Posts: 3,628
09-13-2003 21:23
Ooh! ooh! I just thought of this :D

Wouldn't it be cool if Second Life had native Flash support? You know Flash... the plugin in your web browser that makes websites all flashy, and makes low-bandwidth animation videos.

Now, imagine this... say you had a prim, and you wanted it to be a "video wall". You could upload the .swf file, and just drag it onto the side of the prim, and viola, instand video.

It would also make interfaces a snap! You could have fully interactive games, slot machines, directories, and so on, designed within Flash, that works within the prim area! You could "activate" the Flash interface by just clicking on the prim and going to "activate" or whatever, and you would "focus" on the prim. Then when you're done with that flash applet, you just move on.

Now... why would this be a bad idea?

1) Security issues? I could be wrong, but I think flash is fairly harmless... I've yet to see a malicious Flash animation. Aren't they completely self-contained anyway?

2) Bandwidth costs? I think they'd add no more strain than the hundreds of mp3s floating around the world. Probably less, if the truth b e told... vector graphics are sweet like that.

3) Licensing? I believe the Flash .swf file format is an open format, so it wouldn't be prohibitively expensive to add it in.

C'mon, tell me why this is a bad idea :D I'll fight for this one.

Lordfly
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
09-13-2003 22:15
This is the best idea for 'video' imported directly into SL that ive ever heard of! Id love to see this implimented. This would be EXTREMELY benificial to people who need to create dynamic user interfaces or are good with animation.
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
Spider Mandala
Photshop Ninja
Join date: 29 Aug 2003
Posts: 194
09-14-2003 02:28
OOOH can they do this? o.O
This would bring a whole new level of interaction to the game.
dag Greenacre
Junior Member
Join date: 4 Aug 2003
Posts: 20
09-14-2003 18:46
low bandwith ?

I think i'd rather see animated gifs.

Flash animations have their own scripts and interaction which i think would be a bit beyond SL...

would SL have browsers that read HTML too ?

Flash animations are notorious for sucking up bandwidth...especially when the creators do not place "pre-loaders" in.... and if they were in you would definately need an option to view these or not...they can be huge.. 6MB movies are not uncommon....

But I would love to see flash "type" effects on sign etc...but how far to go...

Live streaming video on TV's thruout SL ???
Lordfly Digeridoo
Prim Orchestrator
Join date: 21 Jul 2003
Posts: 3,628
09-14-2003 18:54
//low bandwith ?

A menu interface with no sounds aren't very big. If you stick to scrpiting and vector graphics, you can have a fully-interactive webpage under like 500k. That's including a bunch of flashy gadgets and whatnot.

The main bulk of flash files are embedded movies, jpgs, .wav files, and so on.

//I think i'd rather see animated gifs.

I'd rather not. Not an open standard, if I recall correctly.


//Flash animations have their own //scripts and interaction which i think //would be a bit beyond SL...

The same could be argued about LSL :)


//would SL have browsers that read //HTML too ? Sure, why not? :)


//Flash animations are notorious for //sucking up bandwidth...especially //when the creators do not place //"pre-loaders" in.... and if they were //in you would definately need an //option to view these or not...they //can be huge.. 6MB movies are not //uncommon....

Only if you put in cd quality sound and all that garbage. Perhaps they could just remove the ability to have sounds eminating from flash files.
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
09-14-2003 20:02
Well, while flash could be neat in some ways, I think that LL could spend their time working on their own language opposed to spending the time converting another. Flash, while it works wonderfully for web pages, I feel would not be so great in a multi-player 3d environment. And the fact that flash does not have functions to communicate with external SL obejcts.
What I think would be better is to have "flash-like" commands in LSL. Pretty much various function calls that could modify a texture, take coordinate based touches, display text on a face of an object, ability to have "2d -sprite'ish" objects on faces, import vector graphics, etc.


James Miller
Village Idiot
Join date: 9 Jan 2003
Posts: 1,500
09-14-2003 20:15
I have the Macromedia Studio MX for my Mac, including Flash MX...I like it a lot, wasn't too expensive. Now, I like this idea a lot, I just think it may be abused. We all know how many websites overuse flash...even the one we are on right now. That being said, I think it would have a lot of good applications in SL. :)
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
09-15-2003 01:17
I'll tell you why this is a bad idea. Graphics cards dont natively support SWF textures because an SWF isnt an image file but rather a vector format - sorta like 2D prims.
In order to implement anything like this they would have to render every frame of the SWF into a temporary texture and then stream it to you which would be slow and nothing like a smooth flash animation at all. At the moment setting a new texture to a given prim is really laggy since you have to download it. Just stop by stamp's texture shop if you dont believe me. The thing is a lag bomb.
Besides, the SWF format isnt ENTIRELY open, which is why you dont have a decent open source flash app for linux, and do you really expect LL to code a flash viewer from scratch?
Lordfly Digeridoo
Prim Orchestrator
Join date: 21 Jul 2003
Posts: 3,628
09-15-2003 05:49
From: someone
Originally posted by Eggy Lippmann
I'll tell you why this is a bad idea. Graphics cards dont natively support SWF textures because an SWF isnt an image file but rather a vector format - sorta like 2D prims.
In order to implement anything like this they would have to render every frame of the SWF into a temporary texture and then stream it to you which would be slow and nothing like a smooth flash animation at all.


Is that why web browsers can handle flash animations with no troubles at all?

Why would you have to convert everything to textures? That makes no sense. You act like video cards have never seen a vector graphic, and freak out and explode if you try to render a Flash animation.

Lordfly
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
09-15-2003 06:49
Clearly you dont understand the inner workings of SL and graphics cards in general.
Browsers do not deal with textures because they arent 3D. Textures are 2D images and so they have to be mapped on the 3D surface of an object which can be reshaped, moved and rotated, and needs to keep track of perspective, lighting, and a host of other stuff.
Try doing that to your browser window and then get back to me. Your browser window is a 2D image which flows through your graphics card mostly unchanged, and is piped directly to the monitor without needing any thought with regards to the 3D problems mentioned above.
Also, a browser is a client, not a server. In SL, pretty much everything is done in the server. It's called a thin client architecture.
The Lindens have designed this game around a streaming paradigm - All content is stored on the server and streamed to you in real time. This makes it possible to easily have multiple clients working on the same project.
Textures are equally stored on the server and streamed to you as needed. Even if the texture is in your inventory, and even though you "download" your inventory on startup, you still have to wait for textures to load when double clicking them, because you merely download their names and pointers to the actual server data.
Now imagine if your textures were not static raster graphics but rather dynamically generated vector graphics such as flash.
Even if they were run on the client, which the lindens would definitely not want to do since it opens a whole can of worms regarding security problems and consistency of content across all clients, what you would have is a constantly changing texture. Since graphics cards do not support procedural vector graphics as a texture, let alone interactive ones, the processing has to be done on the main system memory and CPU, and uploaded through the AGP bus to the graphics card on the fly.
The fastest AGP bus in existence is still 10 times slower than the graphics card memory bus, so hardware developers try to limit utilization of said bus by adding more memory to the cards, and software developers try to limit it on their end by introducing "loading" screens, where the textures and shapes for the next level of your game are uploaded to the graphics card.
Since flash is interactive, there is no way of pre-generating the whole animation (and if there was it would be hella slow) because what it will display is dependent upon your actions, so you cant upload it all to the graphics card and have it run from there.
After doing some math, a cube with all 6 faces covered by a dynamically generated 512x512 texture running at 30fps would take up around 20% of my AGP bus's bandwidth so if you made a grand total of 5 such cubes it would totally bog down my computer.
This of course, assuming that you COULD do it in the client, which poses a lot of problems and probably isnt an option LL would be willing to explore. Doing it on the server is impossible. There's no way a lowly internet connection can deal with the amount of bandwidth required for this, you would have to download like 200 megabytes per SECOND if it was done on the server, and the servers could never handle multiplying such a load over an arbitrary number of clients.

Nevertheless it is a cool feature. Way before I had even joined SL I wondered why graphics cards didnt include support for dynamically generated vector-based textures. I vaguely recall reading that something like it is being planned for future graphics cards generations.
Since SL is designed around the capabilities of the OpenGL graphics library, which in turn is designed around the capabilities of modern graphics cards, if graphics cards get such a feature SL will be sure to implement it as soon as an quivalent OpenGL function becomes available.
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
09-15-2003 06:49
I think he is referring to mapping onto a 3d object. A 2d application does not require all the math be thrown onto it like the 3d app does. I believe he is probably correct about gfx-cards using bitmapped graphics only for texturing. I also agree even if it did not have this issue, having the animation be smooth would be incredibly unlikely. (Sure, I can convert a 25fps mpeg or flash animation to a tile map now, and play it on second life, however it really is not the smoothest or prietiest.)
Deeds Greenacre
Junior Member
Join date: 13 Sep 2003
Posts: 9
09-20-2003 13:39
Flash is not a problem in second life. A large gif file would probably be 80kb while a vector flash file would be 22kb. Why do you say that flash is a problem. If they can't add flash to their engine, then they can't. But if there is a possibility to add flash, it would be the greatest thing to hit second life. You designed a 3D wide screen tv, now what do you do for picture? You add flash to it and it makes the scenery look a whole lot better then the method I was told which cuts up a movie file frame by frame. I say that's larger then flash and wouldn't make sense unless your using pictures from a movie. Adding flash to objects would make the enviornment look clean.

Once again, we don't want to get into "THERE" discussion, but look what they have done with vector animation. If it's possible, why deny it? Let it happen and hopefully it'll be a successful feature for all of us to enjoy. I will look into this with some major flash guru's and they'll give some opinions if this might work depending on what SL uses for their engine.

Enjoy!
Coyote Murphy
Beelphazoaric
Join date: 12 Aug 2003
Posts: 91
09-20-2003 14:38
Webstar's Off-Line dictionary entry:

flash guru, n. The dental assistants of programming. See also: temp.

Ask a client/server model guru, or a streaming media guru, or a 3D rendering guru. Or you could just listen to Eggy.
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
09-21-2003 23:17
How it could be done...
  1. You have the Flash library client-side. (Most people already have it installed.)
  2. The library renders everything to a local texture which is scaled, rotated, and rendered by the GPU. (It is not lit or shaded.)
  3. The keyframe animation and script execution tasks happen client-side as well.
  4. There is a way for Flash apps to talk to JavaScript code on the containing web page, I have seen it done. I'm betting that facility can be used to allow the Flash movie to trigger something like a link message, and in this way, communicate with the host object in-game.
  5. Application security would be an issue. In the case of a slot machine, for example, you'd want the application logic to be in LSL and have the object trigger Flash animations - that way you aren't open to someone fiddling with the packets between the viewer and Linden Lab's colo to extract money from your machine.
  6. If you are ultra-concerned about file size, have the viewer (which is responsible for uploading everything from the client) reject uploads of Flash movies that are over a certain size. 250K should be way more than enough to run an app.
  7. This could break the everyone-sees-the-same-thing paradigm. A possible solution would be to run the keyframe and ActionScript stuff server-side and have the client only responsible for drawing the vector graphics to a texture in real time and handing this to the GPU.


Totally academic, I don't think it will happen any time soon. :)
Dusty Rhodes
sick up and fed
Join date: 3 Aug 2003
Posts: 147
09-22-2003 12:54
a few of my thoughts on this:

1. Flash IS a client side application. That is why it is so fast. To support the "everyone sees the same thing" paradigm, the sim would have to run the flash animation, and send every frame, which would be no faster than today's processes.

2. If Linden Labs were to put a Flash player into the SL viewer, they might need to pay a royalty for that, since it would be used to enhance a commercial product.

3. The reason Flash and Javascript are so secure is that they run in a "sandbox" memory space and are not allowed to access anything outside that sandbox. Thus, Flash games would not be able to credit L$ to avs, etc.
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
09-22-2003 20:48
I think they could add many aspects of flash into LSL with the addition of 2d texture effects. LL should develop the wanted features of flash into their language, not integrate another language into their product.
Darwin Appleby
I Was Beaten With Satan
Join date: 14 Mar 2003
Posts: 2,779
09-22-2003 21:20
If this were ever to happen then action scripting would be far too complex. We'd have to make it 100% NON-INTERACTIVE. Otherwise lag would rule the kingdom...
_____________________
Touche.