Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
03-10-2005 17:20
Preface: With how QuickTime streams and Heads Up Display's (HUDs) work, everyone can see them, this of course isn't optimal when you want them to be private. The way video streaming in SL works is that it replaces a texture (recognized by key) with the video stream. The texture we replace is the MouseLook CrossHairs. So when you go into MouseLook you see the video in the center of the screen (where the crosshairs should be). The great thing about this is, nobody else can see the crosshairs. If you were to send custom streams to each user you could do anything you wanted with it. Exampe: card games, porn movies (you know it's funny i can't think of any other uses). A Solution:- Have the user register (see Register Script).
- Have the user sit down and force them to mouse look (see Seat Script).
- Have stream server send custom stream based on IP from registration.
Put DialogModule, Register Script Main, and 10 Register Script Slaves in one prim. Put Seat Script in as many chairs as you want. It should handle multi object sit targets ok. Scripts you need to make this work:DialogModule Script: LibraryDialogModuleRegister Script Main: float accesstime = 3600; string location = "here";
list streams = ["easy readable name","codename", "easy readable name","codename", "easy readable name","codename"];
integer slaves = 10; integer slave;
integer com = -2; integer dlgcom = -1;
string msg; list ret;
list parse(string a) { return llParseString2List(llDeleteSubString(a,0,0), [llGetSubString(a,0,0)],[]); }
string dump(list a, string b) { string c = (string)a; if(1+llSubStringIndex(c,b) || llStringLength(b)!=1) { b = "|\\/?!@#$%^&*()_=:;~{}[],\n "; integer d = -llStringLength(b); while(1+llSubStringIndex(c,llGetSubString(b,d,d)) && d) d++; b = llGetSubString(b,d,d); } return b + llDumpList2String(a, b); }
msglink(string a, string b) { llMessageLinked(LINK_THIS, slave, a, b); slave = (slave + 1) % slaves; }
dialog(key user, string message, float timeout, list buttons, integer buttonmask, integer retchan, list ret) { llMessageLinked(LINK_THIS, dlgcom, dump([retchan] + ret, "|"), dump([user, message, timeout, buttonmask] + buttons, "|")); }
default { state_entry() { if(llGetOwner() == llGetLandOwnerAt(llGetPos())) { llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_TEXTURE,"6e1a3980-bf2d-4274-8970-91e60d85fb52", PARCEL_MEDIA_COMMAND_URL, "http://your_url.com/stream.php?loc="+location]); state ready; } else llSay(0,"I do not have privlages to access this option; I need to owned by the land owner or deeded to the group that owns the land."); } }
state ready { state_entry() { list a; integer b; list c; integer g = llGetListLength(streams); if(g>24) g =24; for(;b<g;b+=2) { c+= llList2List(streams, b, b+1); a+= (llGetSubString("ABCDEFGHIJKL",b/2,b/2) + ": "+llList2String(streams,b)); } msg = "Please choose a stream:\n"+llDumpList2String(a, "\n"); ret = c; } touch_start(integer a) { dialog(llDetectedKey(0), msg, 30, llList2List(["","A","B","C","D","E","F","G","H","I","J","K","L"],1,llGetListLength(streams)/2), 0x200FFF, com, ret); } link_message(integer a, integer b, string c, key d) { if(b == com) { list e = parse(d); a = (integer)llList2String(e,0); d = (key)llList2String(e,1); e = llList2List(parse(c),a*2,1+a*2); if(a > -1) { msglink("llLoadURL", dump([d, "Please follow this link to activate the video stream:\n"+llList2String(e,0), "http://your_url.com/register.php?user=" + (string)d + "&loc=" + location + "&handler=" + (string)llGetKey() + "&time=" + (string)accesstime + "&stream=" + llList2String(e,1)],"|")); } } } }
Register Script Slave (put 10 of these in the object): //each one of these scripts should have a unique value for chan. They need to be numbered 0->9 integer chan=0;
list parse(string a) { return llParseString2List(llDeleteSubString(a,0,0), [llGetSubString(a,0,0)],[]); }
default { link_message(integer a, integer b, string c, key d) { if(b==chan) { if(1 + b = llListFindList(["llEmail", "llLoadURL"])) { list e = parse(d); if(b == 0) llEmail(llList2String(e,0),llList2String(e,1),llList2String(e,2)); else if(b == 1) llLoadURL((key)llList2String(e,0),llList2String(e,1),llList2String(e,2)); } } } }
Seat Script: key user = NULL_KEY;
default { state_entry() { llForceMouselook(1); llSitTarget(<0,0,1>,<0,0,0,1>); } changed(integer a) { if(a & CHANGED_LINK) { key b = llAvatarOnSitTarget(); if(b!=NULL_KEY) { user = b; llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_AGENT, user, PARCEL_MEDIA_COMMAND_PLAY, PARCEL_MEDIA_COMMAND_URL] + llParcelMediaQuery([PARCEL_MEDIA_COMMAND_URL])); } else { if(user != NULL_KEY && llGetAgentSize(user) != ZERO_VECTOR) llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_AGENT, user, PARCEL_MEDIA_COMMAND_STOP]); user = NULL_KEY; } } } }
please forgive me
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
|
03-10-2005 17:53
but wouldn't everybody on the same plot get the same video on their cursor and lose it when they leave the land?
_____________________
Zuzi Martinez: if Jeska was Canadian would she be from Jeskatchewan? that question keeps me up at nite. Jeska Linden: That is by far the weirdest question I've ever seen.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
03-10-2005 18:30
Ahhh but thats where the IP binding comes in, you custom make the stream per IP. Basicly you are doing custom encodes per connection. You connect the IP to the user via the webpage link ^_^
Now connect that with a more advanced script set and you have PayPerView.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Azelda Garcia
Azelda Garcia
Join date: 3 Nov 2003
Posts: 819
|
03-10-2005 18:40
> The way video streaming in SL works is that it replaces a texture (recognized by key) with the video stream. The texture we replace is the MouseLook CrossHairs.
Whoa, that made me go "whoa!". What an awesome idea!!!
Random question: how did you get the cross-hairs texture key?
Azelda
|
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
|
03-10-2005 18:54
All the graphics used in the UI are texture assets, with keys. You can set them on a prim. Heck, I think XyObject does that on its UI. Those keys are all listed in a text file somewhere in your SL folder. That's where I went to get the ground texture keys before they made the textures available to everyone.
|
Jack Digeridoo
machinimaniac
Join date: 29 Jul 2003
Posts: 1,170
|
03-10-2005 19:21
This is totally awsome! TY Strife!!
_____________________
If you'll excuse me, it's, it's time to make the world safe for democracy.
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
03-10-2005 19:23
Now why didn't I think of that? Nice. 
_____________________
---
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
03-10-2005 19:35
Ohhh i forgot to mention, besure to flip your video or pass it through a link file that does the flipping.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Hiro Pendragon
bye bye f0rums!
Join date: 22 Jan 2004
Posts: 5,905
|
03-11-2005 00:56
Strife, I got a chance to try this out.
Bravo! This is a wonderful invention... I can imagine this being a great tool for game developers in SL!
_____________________
Hiro Pendragon ------------------ http://www.involve3d.com - Involve - Metaverse / Emerging Media Studio
Visit my SL blog: http://secondtense.blogspot.com
|
blaze Spinnaker
1/2 Serious
Join date: 12 Aug 2004
Posts: 5,898
|
03-11-2005 02:46
Just make sure you're not playing cards behind a NAT with someone  Or watching pron when your wife logs onto SL.. (yes, I know.. she'd have to be in the same parcel in mouselook mode.. but who knows  she probably has your calling card!) heh. However, I'm not sure why the complexity. Why not simply say that when people connect you detect the remote ip and respond with the correct contents (can QT handle redirs? hmm.. regardless with GD and PHP it's all good) I guess you like the idea of not everyone seeing the same default texture? But wait a sec.. they wouldn't have to. For example, they could have a 'texture' of cards they are holding in their hand and no one could look over their shoulder (unless they're behind a NAT).. QuickTime (qtver=6.5.1;os=Windows NT 5.1Service Pack 1) Too bad you can't get any useful information out of the referring URL to handle NAT requests. Maybe you could rip open the stream and look for a remote IP address. Errr.. that probably would have shown in my http logs.. who knows, I didn't check the whole request header. Might be something.
_____________________
Taken from The last paragraph on pg. 16 of Cory Ondrejka's paper " Changing Realities: User Creation, Communication, and Innovation in Digital Worlds : " User-created content takes the idea of leveraging player opinions a step further by allowing them to effectively prototype new ideas and features. Developers can then measure which new concepts most improve the products and incorporate them into the game in future patches."
|
blaze Spinnaker
1/2 Serious
Join date: 12 Aug 2004
Posts: 5,898
|
03-11-2005 02:54
Truly inspirational though 
_____________________
Taken from The last paragraph on pg. 16 of Cory Ondrejka's paper " Changing Realities: User Creation, Communication, and Innovation in Digital Worlds : " User-created content takes the idea of leveraging player opinions a step further by allowing them to effectively prototype new ideas and features. Developers can then measure which new concepts most improve the products and incorporate them into the game in future patches."
|
Surina Skallagrimson
Queen of Amazon Nations
Join date: 19 Jun 2003
Posts: 941
|
03-11-2005 03:44
Hmmm, view video feeds through mouselook.. isn't that sorta like wearing a head mounted display in RL?
Random thoughts.... set up a dedicated machine connected to SecondLife, encode the video output to a streaming video feed, in-world pass the video feed to to the mouselook crosshairs like a head mounted display, capture the users key inputs and pass back to the dedicated machine via xml-rpc.. you now have an av within SL playing SL... or would it be TL (ThirdLife)?
_____________________
-------------------------------------------------------- Surina Skallagrimson Queen of Amazon Nation Rizal Sports Mentor
-------------------------------------------------------- Philip Linden: "we are not in the game business." Adam Savage: "I reject your reality and substitue my own."
|
DebbieAnn Fairplay
Registered User
Join date: 14 Jul 2004
Posts: 35
|
03-11-2005 04:14
Well hope all you brilliant minds put them to good use by teaching us idiots, who just learned how to program their VCR's two days ago, how to do all that stuff you mentioned above. Cause I would love to be able to show video's in a theater or something but alas, just like with many things in SL, I can't do it cause I'm too dumb.  <---yea I know a feeling sorry for myself comment but sometimes I always feel like I'm 10 years behind everyone else. <-- yea another one. 
|
EABlade Keen
Registered User
Join date: 27 Apr 2006
Posts: 113
|
this is a great old post but it don't work anymore....
12-27-2006 07:45
anyone know why?
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
12-27-2006 19:56
I was going to ask "What's the difference between doing this and just having a full-screen HUD with a secret texture key"... then I realised it was a necropost ...
The original post was from Mar 10, 2005.
HUDs were added in 1.7, Oct 21 2005.
This isn't necessary any more.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
12-27-2006 23:47
From: EABlade Keen anyone know why? Two possibilities: 1) they changed it so you can't use client textures for rendering video (unlikely) 2) they changed the UUID for the cross-hair. You really should be using a HUD and not the cross-hair for this. And by using a HUD you could eliminate some of the security concerns with this set of scripts. These scripts are really old and there are newer and better ways to do these things. It is funny this thread should come back to life, you could implement IP based land security based upon this. I'm kinda amazed that this thread was brought back. Good times.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
12-28-2006 06:45
No thread is safe from the Necroposter!
|