食い寝るえぃだぁ〜

仮想世界Second Lifeでのもの作りのお話 Ada STOREの商品紹介をしています

   
お店と商品一覧はこちら    ものづくりはこちら

--/--/--(--) --:--:--

上記の広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書く事で広告が消せます。

このページのトップへ

2011/10/31(Mon) 22:43:20

LSL関連の目次はこちら

う〜ん、RL忙しすぎだぁ。というわけでカメラコントローラーV2の10月リリースは無理の模様。
もう一ヶ月以上書いていないので… 少し前に頼まれて作ってみたスクリプトの紹介でもします。

需要があるかどうかは存じませんが、次のようなケースに当てはまる方が使うことを前提としています。

  • いくつかアカウントを持っている。
  • プレミアムアカウント or L$を買い込んでいる・貯めているアカウントがある。
  • 普段は上記以外のサブアカウントで活動している。
  • サブアカウントでL$がほしくなったとき、プレアカでログインして送金するのが面倒。
上記のような方は、サブアカでログインしたままプレアカからお金を引き出したいということだそうです。
あたしの場合は、プレアカで主に活動しているので特に必要ないんですけどね。というか、サブアカはL$使わないし:p

では、スクリプトです。
先にゆうときますが、無保証です。このスクリプトで文無しになろうが責任とりません。

//(C)Ada Quinnell, 2011
list    Recipients  = [ "Ada Little", "Ada Quinnell" ]; // ここにサブアカを列挙する
integer Limit       = 10000;                            // 一度に引き出せる上限 [L$]
integer Listen_tout = 30;                               // やりとりのtimeout [秒]
integer Listen_chnl = PUBLIC_CHANNEL;                   // やりとりのチャンネル

integer Listen_on;
integer Listen_id;
key     Owner_id;
string  Owner_name;
key     Agent;
integer Debit_ok    = FALSE;
integer Amount;

default
{
    state_entry()
    {
        Owner_name = llKey2Name(Owner_id = llGetOwner());
        llOwnerSay("This box pays your money to "+llDumpList2String(Recipients," & ")+".");
        llListenControl(Listen_id = llListen(Listen_chnl,"",NULL_KEY,""),Listen_on = FALSE);
        llRequestPermissions(Owner_id, PERMISSION_DEBIT);
    }

    run_time_permissions(integer perm)
    {
        if((perm & PERMISSION_DEBIT) == 0) {
            llOwnerSay("You must give me DEBIT PERMISSION. Touch me to restart.");
        } else {
            Debit_ok = TRUE;
        }
    }

    touch_start(integer total_number)
    {
        string name = llKey2Name(Agent = llDetectedKey(0));

        if (llListFindList(Recipients,[ name ]) >= 0 && Debit_ok == TRUE) {
            llWhisper(PUBLIC_CHANNEL,"Say amount which you want within "+(string)Listen_tout+"[sec].\n"+
                      "Maximum amount is L$"+(string)Limit+".");
            llListenControl(Listen_id, Listen_on = TRUE);
            Amount = 0;
            llSetTimerEvent((float)Listen_tout);
        } else if (Agent == Owner_id && Debit_ok == FALSE) {
            llResetScript();
        } else {
            Agent = NULL_KEY;
        }
    }

    listen(integer channel, string name, key id, string msg)
    {
        if (id == Agent && channel == Listen_chnl) {
            if (Amount == 0) {
                if ((integer)msg > Limit) {
                    llWhisper(PUBLIC_CHANNEL,"Too large amount. Maximum is L$"+(string)Limit+".");
                } else {
                    Amount = (integer)msg;
                    llWhisper(PUBLIC_CHANNEL,"You will receive L$ "+(string)Amount+" from "+Owner_name+".\n"+
                                             "Are you sure? Say \"yes\", if you want to get L$.");
                }
                llSetTimerEvent((float)Listen_tout);
            } else if (msg == "yes") {
                llGiveMoney(Agent,Amount);
                llWhisper(PUBLIC_CHANNEL,Owner_name + " paid L$"+(string)Amount+".");
                llListenControl(Listen_id, Listen_on = FALSE);
                llSetTimerEvent(0.0);
            } else {
                llWhisper(PUBLIC_CHANNEL,"Cancelled.");
                llListenControl(Listen_id, Listen_on = FALSE);
                llSetTimerEvent(0.0);
            }
        }
    }

    timer()
    {
        if (Listen_on == TRUE) {
            llListenControl(Listen_id, Listen_on = FALSE);
            llWhisper(PUBLIC_CHANNEL,"Listen closed. Touch me again if you continue.");
        }
        llSetTimerEvent(0.0);
    }

    on_rez(integer num)
    {
        llResetScript();
    }
}

使い方

  • 送金者側の作業
    1. 上記スクリプトを適当なオブジェクトに入れます。
    2. 受取人の名前などを修正して、保存します。
    3. スクリプトが動き出すと、DEBIT PERMISSIONが求められます。
    4. 許可しない場合は、メッセージを出してオーナにタッチされるまで何もしません。タッチでリセットがかかり、パーミッション要求を出します。 要は、許可が出るまでなにもしません。
    5. 許可を与えると、受取人待ちとなります。
  • 受取人側
    1. タッチします。正しく登録されていれば、いくらほしいか聞いてきますので、 金額をタイプします。
    2. 確認を求められるので、間違いないなら yes とタイプします。
    3. L$が送られてきます。
送金者側の持ち金を調べるすべはありません。所持金0になった際にどうふるまうかはわかりません。ごめんちゃい。

 

 

以上です

LSL関連の目次はこちら

     ジャンル : オンラインゲーム      テーマ : セカンドライフ
     タグ : ものづくり LSL
このページのトップへ

2011/09/06(Tue) 22:45:36

もうすぐできるであろう(たぶん10月中には...→あやしくなってきた)、CameraController Ver.2のマニュアルです。
一部機能が実装できていませんが、評価版のテストをお願いしている方用に公開しています。
テスターをやってやろうという方は、本店にありますので取得してください。
進捗状況(最新評価版:Ver2 Pre26)
・レコードタブ -- 作業中
・再生タブ -- 作業中
・カメラ共有タブ -- テスト中(V1のクライアントとしても使えます)
・カメラ移動タブ -- 完了(RC)
・アバター移動 -- 完了(RC)
・表情制御タブ -- 完了(RC)
・AO制御タブ -- 完了(RC)
・レーダタブ -- 完了(RC)
・オンラインチェックタブ --- 完了(RC)
評価版は完了もしくはテスト中になっているタブのみ動作します。
Ada's Camera Controller Ver.2 Plus Manual
日本語はこちら

Abstract:
This tool is a camera controller HUD for 'Machinima'. And it has some other functions that are related with 'Machinima'.

Features:

  • Camera control: It can store camera positions, and it can move the camera position by complementing two of specified positions.
  • Camera work sharing: It can reproduce your camera work on the other avatar's screen.
  • Avatar movement: It can move avatar's position. It can also make you to fly high.
  • Expression control: It can control express_* animations.
  • Animation Override: It supports two kind of AO groups.
  • Radar: It supports radar function for avatars or objects.
  • Online check: It can check online status of specified avatars.

Contents:

  • CameraControllerV2: Main unit. Please use this as a HUD.
  • AnimSyncV2: A kind of poseball that can start animation by cue from 'CameraControllerV2'

CAUTION:

  • Camera control (1): When you want to move the camera to far, you need to change setting of your viewer. Check "Disable Camera Constraints" in "Advanced" menu.
    It is important when you share your camera work.
  • Camera control (2): Whenever the tool is going to control camera, you need to press 'ESC' button before starting camera control by the tool.
    When your camera is not default status (after moving of the camera by ALT + mouse, for instance), press ESC button to release viewer's camera control. Otherwise, the camera won't move.
  • Camera control (3): Whenever you want to camera control by a viewer, press 'camera cancel' button.
  • Hiding HUD and menu: The tool will disappear before starting playback.
    If you have another HUD, I recommend to press 'ALT+Shift+H'. You can toggle HUD display. About the menu, you can toggle display by pressing 'ALT+CTRL+F1'.
  • Playback time: Though you can specify playback time by the second, there is approximately 10% error.
    This is because of the implementation way. When error is getting bigger, the tool automatically adjusts it.
  • Playback: During playback, you can do nothing.
    No interrupt can be done. Please wait finishing playback after pressing 'playback' button. In case of emergency, detach the tool.
  • Command channel: The default is 3. You can change the channel number by editing configuration file (!CC2-config) in the content tab. Some buttons require input from the channel.
    ex. /3 10

Entry tab:
  1. "?" and "i" are for "Help" and "Information". These two buttons are on every tab.
  2. message height adjuster: You can adjust height of message position.
  3. taking away button: You can take the HUD away or restore it.
  • tabs
    1. Entry tab: You can 'Reset' script or can 'Reload' the configuration file in its content tab ('!CC2-config').
    2. Recording tab (Point mode):It stores camera positions by clicking a record button.
    3. Recording tab (Auto mode):It stores camera positions by tracing your camera work.
    4. Playback tab:It plays back the camera work that stored by 'record tab'.
    5. Share tab:It receive another avatar's camera work.
    6. Camera control tab:It moves camera.
    7. Avatar contorol tab:It moves you.
    8. Expression tab:It controls facial expression.
    9. AO tab:It controls animation override.
    10. Radar tab:It senses avatar or objects around you.
    11. Online tab:It check online status of specified avatars.

    Some tabs continue to work when these are not active tab. In this case, a red marker appears on the button of tab.

    You can set animations for AO, UUIDs for online checker and channels for commands by editing '!CC2-config' in the content tab. After editing, click 'Reload' or 'Reset' button.

[go TOP]
Recording tab (Point mode): (日本語はこちら)
  1. scene buttons
  2. camera control by keyboard button
  3. camera cancel button
  4. recording button
  5. stop button
  1. playback button
  2. position select buttons
  3. position replace button
  4. position insertion button
  5. position deletion button

This tab is for recording camera positions. The stored positions are played back by complementing two of positions. The playback time can be set by the second from a channel or a dialog. After recording, you can edit (replace, insert and delete) a camera position and you can set playback time.

See 'CAUTION' before using.

Usage example:

  • Select one of 'scene buttons'. Positions are stored to the scene number.
  • Move your camera to the position, then click 'record button' to store it.
    Then move the camera to the next position, and click the button again. Continue to these actions until you satisfy.
    The movement time of point-to-point is the same. That is, when you move the camera slowly, you set points with short range.
  • Click 'stop button', when you finish recording.
    After clicking the button, say playback time (the second) to the specified channel (the default is 3. You can change the channel by editing configuration file in its content tab). When you click 'stop button' more than 0.3 [sec], a dialog will be popped up for the playback time. When you click playback button before specifying the time, the tool uses the last playback time.
  • Edit positions (if necessary).
    You can insert/delete/replace the position. The position is selected by 'position select button'.
  • Click playback button (long click for long countdown).
    You can check the camera work. The tool starts countdown from 3, and starts playback. On the same time, the tool disappears and animation of 'AnimSyncV2' starts. (see 'playback tab' section for the details of 'AnimSyncV2').
    When the click time is more than 0.3 [sec] (long-click), countdown starts from 15.

note:

  • The difference of playback function between this tab and 'Playback tab' is 'multi-scene'. Though, this tab does not support 'multi-scene playback', the other functions are the same.
  • It can start animation when 'playback' starts.
    See 'playback' section for the detail of animation synchronization.
  • In order to use 'camera control by keyboard button', focus mode must be 'mode 1'. See 'Camera control tab' section for the details.

[go TOP]


Recording tab (Auto mode): (日本語はこちら)
  1. Auto recording button
  1. Interval setting button

The difference between this tab and Recording tab (Point mode) is the way of recording.
After clicking 'auto recording button', the tool stores camera positions until cliking 'stop button'. Positions will be stored every 0.5 second (you can change the interval by 'time setting' button).
The others are the same as 'Point mode'. See 'Point mode' section for the details.

See 'CAUTION' before using.

[go TOP]


Playback tab: (日本語はこちら)
  1. scene buttons
  2. camera cancel button
  3. playback button
  4. playback time adjust buttons
  1. data sending button for share
  2. cue button for share
  3. data cancel button for share
     

You can play back your recorded scenes and share the scenes with the other avatars by this tab.

See 'CAUTION' before using.

Usage example (playback):

  • Click 'scene buttons'.
    Click the scene button to select playback scenes. The order of clicking is important. You can see the order by color of selected buttons. Scenes are played back by the order of your clicking.
  • Click 'playback button'.
    The tool starts countdown from 3, and starts playback. On the same time, the tool disappears and animation of 'AnimSyncV2' starts. See later part for the details of 'AnimSyncV2'.
    When the click time is more than 0.3 [sec] (long-click), countdown starts from 15.
  • +,- or 0
    if you can't satisfy the playback time, you can make playback time faster or slower by these buttons.
note:
  • sharing:
    You can share your camera work by 'data sending button'. When you click this, the tool sends camera work data to the other avatars who is attaching 'CameraController V2', and selecting share tab. After sending data, click 'cue button for share button'. Then the camera work will be reproduced by your viewer and the other avatars' viewers.
  • Animation syncrhonization:
    The tool will send command to 'AnimSyncV2' at top of each scene and end of playback. You can control animation by these command from the tool.
    AnimSyncV2
    This is a kind of pauseball that starts an animation by cue from the 'CameraControllerV2'. A script in its content tab is editable so that you can modify action.
    • REZ it.
      It must be on the same SIM as a sender. And it must be within 100m from a sender.
    • Edit script in its contents tab.

[go TOP]


Share tab: (日本語はこちら)
  1. Data cancel button
  1. Camera cancel button

In order to reproduce another avatar's camera work, use this tab. This tab receives camera data from another avatar, and wait the avatar's cue. When the avatar click 'sharing playback' button, the camera work will be reproduced on your viewer.

See 'CAUTION' before using.

note:

  • You need to stay on the same SIM as a sender. And you need be within 100m from a sender.
  • Because of implementation specification, it is not guarantee 100% of data receiving. Lost data is replaced by nearest data. The camera will stop at these point during playback.

[go TOP]


Camera control tab: (日本語はこちら)
  1. Arrow buttons (1)
  2. Arrow buttons (2)
  3. Map button
  4. Keyboard control button
  1. Camera cancel button
  2. Focus mode button
  3. Speed setting button
  4. Acceleration button

This tab can move camera position and angle. There are four modes.

modefocuscamera position
mode 1Anywhere Fixed
mode 2You Fixed
mode 3You Follow toward you
mode 4You (*)Follow toward you

   * Depend on the camera position, focus might not be able to follow you sometimes.

A mode can be selected by 'Focus mode button'. The button's color will be changed from light ocher(mode 1), pink(Mode 2), red(mode 3) to magenta(mode 4) by each click. When click time is more than 0.3 [sec] (long-click), the color changes to reverse.

You can move the camera by 'Arrow buttons (1)' and 'Arrow buttons (2)'. Or you can use a keyboard instead of 'Arrow buttons (1)'.

When you click 'Map button' when the mode is '1', Map will be shown, and you can teleport to the position.

The velocity of the camera can be set by 'Speed button'. The button's color will be changed from green(very slow), yellow green(slow), yellow(normal), orange(fast) to red(very fast) by each click. When click time is more than 0.3 [sec] (long-click), the color changes to reverse.
When 'Acceleration button' is active, velocity is getting faster.

NO WARRANTY: When you click 'Speed setting button' more than 2 [sec] when 'Acceleration button' is not active, you can set the distance or the angle from the command channel. The distance or the angle is effective until changing of speed or acceleration.

See 'CAUTION' before using.

note:

  • Display
    When you are moving the camera by this tab, the following information is displaying.
    ModeDisplay ontents
    mode 1<Position>,Angle,Pitch
    mode 2<Position>
    mode 3Distance,Pitch,Offset(right/left,upper/lower)
    mode 4Pitch,Offset(fwd/back,right/left,upper/lower)


[go TOP]


Avatar control tab: (日本語はこちら)
  1. Arrow buttons
  2. Keyboard control button
  3. Flying-high button
  1. Speed setting button
  2. Acceleration button
     

You can move yourself by this tab.
The moving velocity of the avatar can be set by 'Speed button'. The button's color will be changed from green(very slow), yellow green(slow), yellow(normal), orange(fast) to red(very fast) by each click. When click time is more than 0.3 [sec] (long-click), the color changes to reverse.
When 'Acceleration button' is active, moving velocity is getting faster.

There are two ways of controlling the avatar. One is by 'Arrow keys', the other is by a keyboard. Keyboard control will be active by clicking of 'Keyboard control button' (Simultaneously, 'Flying-high button' will be active). When you click 'Flying-high button' when 'Keyboard control button' is not active, only flying height can be controlled by the keyboard.
Moving velocity is different from the keyboard and the arrow buttons. By keyboard control, you can not move slowly and you can not be speeding up on the ground.
When you activate 'Keyboard' or 'Flying-high', these controls continue to work even if you change the tab. You can see the indicator below the tab. Keyboard control for the camera on 'Recording tab' or 'Moving camera tab' has higher priority than avatar control.

NO WARRANTY: When you click 'Speed setting button' more than 2 [sec] when 'Acceleration button' is not active, you can set the impulse from the command channel. The impulse is effective until changing of speed or acceleration. 100 is big enough to go through a thin object.

note:

  • Display
    When you are selecting this tab, the following information is displaying.
    Velocity [m/sec], surface elevation[m], <coordinates>
  • Controllable range
    control methodavatar statuscontrol range
    arrow button Sitting None
    Flying All direction
    The other All direction
    keyboard Sitting None
    Flying All direction
    The other Up & Down only
    fly-high only Sitting None
    Flying Up & Down only
    The other Up & Down only
  • See http://wiki.secondlife.com/wiki/Control for the details of keyboard assignment.
  • If you attach another 'flight-assistant tool', you will have a trouble.

[go TOP]


Expression tab: (日本語はこちら)
  1. Power button
  2. Play type button
  3. Loop mode button
  1. Interval & pause button
  2. Expression buttons
     

This tab can control your facial expression.
Expression can be controlled by interval, pause, play type and loop mode.

play typeloop modeduration[sec]note
OR
continuous
interval Expression will be changed to one of selected expressions at every 'interval' second.

play & pause
interval - pause It is the same as the above, but there are pause period that is not playing of expression animations.
AND
continuous
infinity All of selected expressions are played simultaneously.

play & pause
interval - pause It is the same as the above, but there are pause period that is not playing of expression animations.

From the upper left button, buttons mean 'smile', 'toothsmile' and 'laugh emote'. From the lower left button, buttons mean 'disdain', 'bored emote', 'surprise emote', 'open mouse', 'shrug emote', 'wink emote', 'cry emote', 'embarrassed emote', 'sad emote', 'anger emote', 'frown', 'tongue out', 'repulsed emote', 'afraid emote', 'worry emote' & 'kiss'.

[go TOP]


AO tab: (日本語はこちら)
  1. Power button
  2. AO group button
  3. Previous animation button
  1. Next animation button
  2. Interval button
  3. Quick animation button

This tab controls animation override(AO).
You need to prepare animations before using this function, though sample animations are pre-defined. Animations must be in the content tab of the tool. And you need to enter animation names in the configuration file (!CC2-config).
Two AO sets are switchable, when you set animations to "ao1_*" and "ao2_*". you can change AO group by clicking on a 'AO group button'.
When the number of animation for a status is more than two, you can change animation by clicking 'previous animation button' or 'next animation button'. Otherwise, animation is changed at every 'interval' seconds. 'Interval' can be changed by 'interval button'.

When you specify animations to "quick_animation" in the configuration file, you can use 'quick animation buttons'. One of the specified animation is played by the button.

[go TOP]


Radar tab: (日本語はこちら)
  1. setup button
  2. object name button
  3. scan indicator

This tab scans avatars or objects.

You can change targets by clicking of 'setup button'. When targets are objects, you can specify the name of targeted objects. After clicking 'object name button', say the name to the command channel.
You can use '*' as a kind of wild-card. When you want to use forward matching, set the name as "foobar*", for instance. "foobar", "foobarabc", foobar123" and etc. will match the specified name. "*foobar" is an example of backward matching. "*foobar*" is an example of partial matching. "*" matches every object.

The top of the tool indicates scaning speed. 'sensor' is called at the same time of animation run.

The radar shows avatar names or object names (exception: target is an object and 'complete matching' rule is selected). And it shows additional information, such as distance, coordinates, direction or viewer's language.

targetadditional information
Avatar[distance,direction,viewer's language]
Object[coordinates,distance,direction]

'direction' contains symbol of point of the compass (N,NW,W,SW,S,SE,E,NE) and relative location (<,>,f,r,U,L). '<', '>', 'f' & 'r' mean 'left', 'right', 'front' & 'rear' respectively. 'U' and 'L' mean 'upper' and 'lower'. 'U' and 'L' appear when the height difference is 10m or more.

See 'CAUTION' for the detail of command channel.

[go TOP]


Online tab: (日本語はこちら)
  1. Power button
  2. Profile display
  3. Online indicator
    (online:bright, offline:dark)
  1. Interval button
  2. UUID button
  3. Scan indicator
     

This tab check online status of specified avatars. When you use this function, you need to set UUID in configuration file (!CC2-config)

The top of the tool indicates check interval. Online status is checked at starting of scan animation.

UUID can be obtained by 'UUID button'. After clicking the button, say avatar name to the command channel.
Then the tool try to get UUID from w-hat.com. If the UUID of the avatar could not get from the web, the tool uses 'sensor'. In order to get UUID by 'sensor', target avatar must be around you.

See 'CAUTION' for the detail of command channel.

[go TOP]



Ada's Camera Controller Ver.2 Plus マニュアル

Abstract:
このツールはMachinima用カメラ制御HUDです。 カメラ制御のほか、'Machinima'に関連のある機能があります。

特徴:

  • Camera control: カメラポジションの記録と再生をします。
  • Camera work sharing: カメラワークを他のアバターと共有できます。
  • Avatar movement: アバター移動を補助します。高高度飛行も可能です。
  • Expression control: 表情アニメーション制御ができます。
  • Animation Override: AOを制御できます。2つのグループを扱えます。
  • Radar: アバター及びオブジェクトレーダーをサポートします。
  • Online check: 指定アバターのオンライン状況を監視できます。

内容:

  • CameraControllerV2: 本体。HUDとしてお使いください。
  • AnimSyncV2: 一種のポーズボール。CameraControolerV2の再生に同期してアニメーションをスタートできます。

注意事項:

  • カメラ制御(1): カメラを遠くまで移動したいときはビューワの設定をしてください。 "アドバンス"メニューの"Disable Camera Constraints"をチェックします。
    カメラワークを共有する場合は重要です。 再生側が"Disable Camera Constraints"にチェックなしの場合、意図しない動きになります。
  • カメラ制御(2): ツールがカメラを制御する場合、 事前に'ESC'キーを押すなどしてツールがカメラ制御できるようにしてください。
    ALT+マウスでカメラ移動をした後などのように、ディフォルト状態でない場合は、 ESCを押すなどしてビューワのカメラ制御を開放する必要があります。さもないと、 ツール側でカメラを動かすことができません。
  • カメラ制御(3): ビューワ側に制御を戻す場合は、 'camera cancel'ボタンをクリックしてください。
  • HUDとメニューの隠匿: 再生の前にツールは隠れるようになっています。
    他のHUDがある場合は、'ALT+Shift+H'でOn/Offできます。 メニューについては、'ALT+CTRL+F1'でOn/Offできます。
  • 再生時間: 再生時間は秒で設定しますが、10%程度は誤差があります。
    これは、実装上の制約です。誤差が大きくなると、ツールは自動で調整するようになっています。
  • 再生: 再生中は何もできません。
    いかなる割り込みも効きません。再生ボタンをクリックしたら、再生が終わるまでお待ち下さい。 緊急の場合は、HUDを外してください。
  • コマンドチャンネル: 規定値はチャンネル3です。 この番号は、コンテンツタブにある設定ファイル(!CC2-config)で変更することができます。 ツールの一部ボタンは、クリックしてからコマンドチャンネルにタイプするようになっています。 その場合は次のようにしてください。
    ex. /3 10

Entry tab:
  1. "?" と "i" は、それぞれ "Help" と "Information"です。 この2つはどのタブにもあります。
  2. メッセージ位置調整: メッセージ位置を調整できます。 Windowの大きさにより相対位置が変わりますので必要に応じて調整ください。
  3. 隠匿ボタン: HUDの一部を隠したり戻したりすことができます。
  • タブ
    1. Entry tab:設定ファイル(!CC2-config)の'Reload'やスクリプトのリセットができます。
    2. Recording tab (Point mode):カメラ位置をレコードボタンを押すごとに記録します。
    3. Recording tab (Auto mode):カメラ位置をレコードボタンが押されてからストップボタンを押すまで記録します。
    4. Playback tab:'record tab'で記録したカメラ位置を再生します。
    5. Share tab:他のアバターのカメラワークを再生します。
    6. Camera control tab:カメラを移動します。
    7. Avatar contorol tab:自分自身を移動します。
    8. Expression tab:表情を制御します。
    9. AO tab:AOを制御します。
    10. Radar tab:アバターやオブジェクトをスキャンします。
    11. Online tab:アバターのオンライン状態をチェックします。

    いくつかのタブは切り替え後も動作を続けます。その場合、タブの下に赤いマーカーが表示されます。

    AO用のアニメーションや、オンラインチェック用のUUID、チャンネルの設定は コンテンツタブにある'!CC2-config'で行います。編集後は、'Reload'もしくは、 'Reset'を押してください。

[go TOP]
Recording tab (Point mode):
  1. シーンボタン
  2. キーボードカメラ制御ボタン
  3. カメラ無効ボタン
  4. 記録ボタン
  5. 停止ボタン
  1. 再生ボタン
  2. 位置選択ボタン
  3. 位置入れ替えボタン
  4. 位置挿入ボタン
  5. 位置削除ボタン

このタブでは、カメラ位置を記録します。 再生は、記録した位置間を補完して行われます。 再生時間(秒)は指定チャンネルにsayするか、ダイアログで指定します。 記録後、カメラ位置を編集できます。再生時間もあとから修正できます。

ご使用前に'注意事項'をご覧ください。

使用例:

  • 'シーンボタン'の一つを選びます。カメラ位置はこのシーン番号に保存されます。
  • カメラを移動して、'記録ボタン'をクリックします。
    次のポジションにカメラを移動して再度'記録ボタン'をクリックします。この動作を必要なだけ続けます。
    ポイント間の移動時間は同じです。つまり、カメラをゆっくり動かしたいときは、間隔を詰めてポジションをセットします。
  • '停止ボタン'をクリックして記録を終了します。
    クリックしたら、再生時間(秒)を指定したチャンネル (規定値は3です。コンテンツタブの!CC2-configを編集すれば変更できます)にsayします。 '停止ボタン'を0.3秒以上クリック(長押し)した場合は、ダイアログで指定できます。 このボタンを押す前に'再生'をクリックした場合は、前回の再生時間を使います。
  • 位置を編集します(必要な場合)。
    '挿入/削除/入れ替えボタン'で行います。対象となるポジションは、位置選択ボタンで決めます。
  • '再生ボタン'をクリックします(長押しでカウントダウンが長くなります)。
    カメラワークを確認できます。カウントダウンを3から始め、再生を開始します。 同時に、ツールは消えて、'AnimSyncV2'のアニメーションがスタートします。 ('AnimSyncV2'の詳細は'playback tab' sectionをご覧ください)。
    クリック時間が0.3秒以上(長押し)の場合は、カウントダウンが15から始まります

備考:

  • 再生機能について、'Playback tab'との違いは、マルチシーンです。 シーンをつないで再生することはできませんが、その他の機能はほとんど同じです。
  • '再生'時にアニメーションを開始できます。
    アニメーション同期に関しての詳細は'playback' sectionをご覧ください。
  • 'キーボードカメラ制御ボタン'を使う場合は、焦点モードが、'mode 1'になっている必要があります。 詳細は'Camera control tab'をご覧ください。

[go TOP]


Recording tab (Auto mode):
  1. 自動記録ボタン
  1. 間隔設定ボタン

このタブとRecording tab (Point mode)との違いは、ポジションの記録方法です。
'自動記録ボタン'をクリックすると、'停止ボタン'を押すまで、記録を続けます。 カメラ位置は、0.5秒毎(間隔設定ボタンで変更できます)に記録されます。
それ以外は、'ポイントモード'と同じです。 詳細は'Point mode'をご覧ください。

ご使用前にこちらの'注意事項'をご覧ください。

[go TOP]


Playback tab:
  1. シーンボタン
  2. カメラ無効ボタン
  3. 再生ボタン
  4. 再生時間調整ボタン
  1. データ送信ボタン(共有用)
  2. キューボタン(共有用)
  3. データ廃棄ボタン(共有用)
     

このタブでは、記録したシーンの再生とカメラワークの共有ができます。

ご使用前に'注意事項'をご覧ください。

使用例(再生):

  • 'シーンボタン'をクリックします。
    クリックで、再生するシーンを選択します。クリック順序は重要です。順序は選択されたボタンの色でわかります。 クリックした順に再生されます。
  • '再生ボタン'をクリックします。
    3からカウントダウンを始め、再生します。 同時に、ツールは消えて、'AnimSync2'のアニメーションをスタートします。 'AnimSync2'については後述します。
    クリック時間が0.3秒以上(長押し)の場合は、カウントダウンが15からになります。
  • +,- 及び ±0
    再生時間を調整できます。少し早く、もしくは、遅くすることができます。
備考:
  • 共有:
    'データ送信ボタン(共有用)'によってカメラワークを共有することができます。このボタンをクリックすると、 ツールは、'CameraController V2'を装着して、'share tab'を選択しているアバターにカメラワークデータを送ります。 送信後、'キューボタン(共有用)'をクリックすると、 カメラワークが他のアバターのビューワとあなたのビューワで再生が始まります。
  • アニメーション同期:
    ツールは、'AnimSyncV2'に対して、各シーンの先頭と、再生終了時にコマンドを送信します。 これらのコマンドを使ってアニメーションを制御することができます。
    AnimSyncV2
    これは一種のポーズボールで、'CameraControllerV2'からのキューでアニメーションを開始します。 アクションをカスタマイズできるように、スクリプトは編集可能になっています。
    • REZします。
      貴方と同じSIMにREZしてください。また、100m以内にいるようにして下さい。
    • コンテンツタブにあるスクリプトを編集してください。

[go TOP]


Share tab:
  1. データ廃棄ボタン
  1. カメラ無効ボタン

他のアバターとカメラワークを共有するときこのタブを使います。 このタブは、他のアバターが作成したカメラワークデータを受信し、キュー(再生開始合図)を待ちます。 送信者が'共有再生'ボタンを押すとあなたのビューワで再生が始まります。

使用前に'注意事項'を確認ください。

備考:

  • カメラワークを共有するアバターとは同じSIMで100m以内にいてください。
  • 実装上の都合から100%データを受信できない場合があります。 紛失データは直近のデータで置き換えられます。 その場合、カメラは一時的に停止することになります。 

[go TOP]


Camera control tab:
  1. 矢印ボタン(1)
  2. 矢印ボタン(2)
  3. マップボタン
  4. キーボード制御ボタン
  1. カメラ無効ボタン
  2. 焦点モードボタン
  3. 速度設定ボタン
  4. 加速ボタン

このタブではカメラの位置とアングルを制御できます。4つのモードがあります。

モード 焦点カメラ位置
モード 1どこでも 固定
モード 2貴方 固定
モード 3貴方 貴方を追従
モード 4貴方(*) 貴方を追従

   * カメラ位置によっては、フォーカスがアバターにならない場合があります。

モードは'焦点モードボタン'で選択できます。 ボタンの色は、黄土色(モード1)からピンク色(モード2)、赤色(モード3)、 マゼンタ(モード4)とクリック毎に変わります。 0.3秒以上クリック(長押し)すると、逆に変化します。

カメラは、'矢印ボタン(1)'と'矢印ボタン(2)'で移動させます。あるいは、'キー制御ボタン'により、 '矢印ボタン(1)'の代わりにキーボードで移動することもできます。

モードが1のときに、'マップボタン'を押すと、ワールドマップが表示されテレポートすることができます。

カメラ移動スピードは'速度設定ボタン'で設定できます。 ボタンの色は、緑(very slow)から黄緑(slow)、黄色(normal)、橙(fast)、 赤(very fast)とクリック毎に変わります。0.3秒以上クリック(長押し)すると、逆に変化します。
'加速ボタン'が有効になっていると、移動速度は徐々に速くなります。

無保証: '加速ボタン'が無効のとき'速度設定ボタン'を2秒以上クリックすると、 移動量をコマンドチャンネルから指定できます。'速度設定'や'加速'を変更するまで有効です。

ご利用前に'注意事項'をご覧ください。

備考:

  • 表示
    このタブでカメラを移動すると以下の情報が表示されます。
    モード表示内容
    モード 1<カメラ位置>,Angle,Pitch
    モード 2<カメラ位置>
    モード 3Distance,Pitch,Offset(right/left,upper/lower)
    モード 4Pitch,Offset(fwd/back,right/left,upper/lower)


[go TOP]


Avatar control tab:
  1. 矢印ボタン
  2. キー制御ボタン
  3. 高高度飛行ボタン
  1. 速度設定ボタン
  2. 加速ボタン
     

あなた自身を動かすことができます。
移動スピードは、'速度設定ボタン'で行います。ボタンの色は、緑(very slow)から黄緑(slow)、黄色(normal)、橙(fast)、 赤(very fast)とクリック毎に変わります。0.3秒以上クリック(長押し)すると、逆に変化します。
'加速ボタン'が有効になっていると、移動速度は徐々に速くなります。

移動させるには2つの方法があります。一つは、'矢印ボタン'で、もう一つはキーボードです。 'キー制御ボタン'のクリックでキー制御が有効になります。このとき、'高高度飛行ボタン'も同時に有効になります。
キー制御が無効の時に'高高度飛行ボタン'をクリックすると、飛行高度のみキーボードで制御できるようになります。
キー制御と矢印クリックによる制御では、移動速度が異なります。 キーボード制御では、ゆっくり動かすことはできませんし、地上で速く移動することもできません。
'キーボードボタン'か高高度飛行ボタン'を有効にすると、これらの制御はタブを切り替えた後も動作し続けます。 タブ直下の赤い表示でわかります。'レコードタブ'や'カメラ移動タブ'でキーボード制御を有効にした場合は、 カメラの移動制御が優先されます。

無保証: '加速ボタン'が無効のとき'速度設定ボタン'を2秒以上クリックすると、 impulseをコマンドチャンネルから指定できます。'速度設定'や'加速'を変更するまで有効です。 100は、薄い壁のすり抜け可能な数値です。

備考:

  • 表示
    このタブを選択すると以下の情報が表示されます。
    速度[m/sec], 対地地上高[m], <座標>
  • 制御可能範囲
    制御手段 アバターの状態制御範囲
    矢印ボタン 着席中 なし
    飛行中 全方向
    その他 全方向
    キー制御ボタン 着席中 なし  
    飛行中 全方向
    その他 Up & Downのみ
    高高度飛行ボタン着席中 None
    飛行中 Up & Downのみ
    その他 Up & Downのみ
  • キーボード制御の詳細については、 http://wiki.secondlife.com/wiki/Control をご覧ください。
  • キー制御は、他のフライトアシストツールと一緒に使うと正常に動作しない時があります。

[go TOP]


Expression tab:
  1. パワーボタン
  2. 再生タイプボタン
  3. ループモードボタン
  1. 再生・停止時間設定ボタン
  2. 表情ボタン
     

このタブでは表情を制御できます。
表情は、'interval','pause','play type'及び'loop mode'の組み合わせで制御されます。

play typeloop mode表情持続時間[sec]備考
OR
連続
interval 選択された表情が、'interval'秒毎に変わります。

再生と停止
interval - pause 上記と同じ。但し、表情を再生しない期間があります。
AND
連続
連続 選択されたすべての表情が同時に再生されます。

再生と停止
interval - pause 上記と同じ。但し、表情を再生しない期間があります。

上段左から、'smile(微笑)', 'toothsmile(笑)', 'laugh emote(爆笑)'です。 下段左から、 'disdain(軽蔑)', 'bored emote(退屈)', 'surprise emote(驚き)', 'open mouse(開口)', 'shrug emote(肩をすくめる)', 'wink emote(ウインク)', 'cry emote(号泣)', 'embarrassed emote(羞恥)', 'sad emote(悲しみ)', 'anger emote(怒り)', 'frown(しかめっ面)', 'tongue out(べぇ)', 'repulsed emote(拒絶)', 'afraid emote(恐れ)', 'worry emote(心配)', 'kiss(接吻)'です。

[go TOP]


AO tab:
  1. パワーボタン
  2. AOグループボタン
  3. 前アニメ切り替えボタン
  1. 次アニメ切り替えボタン
  2. 間隔指定ボタン
  3. Quickアニメーションボタン

このタブは、アニメーションオーバーライド(AO)を制御します。
:w サンプルがあらかじめ入っていますが、 AO用のアニメーションはご用意ください。 アニメーションはツールのコンテンツタブに入れて、 !CC2-configというコンフィギュレーションファイルにアニメーション名を記載します。
コンフィギュレーションファイルに"ao1_*"と"ao2_*"の両方を設定した場合は、 2つのAOセットを切り替えて使うことができます。'AO group'ボタンで切り替えます。
状態(StandingやSittingなど)用のアニメーションが複数指定されている場合、 アニメーションを'前','次'ボタンで切り替えることができます。ボタンを押さなくても、 指定した秒数ごとにきりかわります。切り替え間隔は'interval'ボタンで指定できます。

コンフィギュレーションファイルの'quick_animation'にアニメーションを指定した場合は、 'quick animation'ボタンでアニメーションの再生、停止ができます。

[go TOP]


Radar tab:
  1. 設定ボタン
  2. オブジェクト名ボタン
  3. ボタン

このタブはいわゆるレーダーです。アバターとオブジェクトに対応しています。

ターゲットの種類は'設定ボタン'で指定します。 ターゲットがオブジェクトの場合は、名前を指定できます。'オブジェクト名ボタン'を押した後、 コマンドチャンネルに名前をタイプしてください。
'*'をワイルドカードのように使うことができます。たとえば、"foobar*"は、前方マッチになります。 "foobar", "foobarabc", "foobar123"などがマッチします。"*foobar"は、後方マッチで、"*foobar*"は部分マッチになります。 "*"はすべてのオブジェクトにマッチします。

HUDトップのアニメーションはセンサー間隔を表しています。一回の捜査アニメーションごとにセンサーが動作しています。

レーダーはアバター名やオブジェクト名を表示します(対象がオブジェクトで完全一致の場合は表示されません)。 また、追加情報として、距離、座標、方角、ビューワ言語などを表示します。

対象種別追加情報
Avatar[距離,方角,ビューワ言語]
Object[座標,距離,方角]

'方角'は、方位(N,NW,W,SW,S,SE,E,NE)と相対位置(<,>,f,r,U,L)のシンボルです。 '<', '>', 'f' 及び 'r' は、それぞれ、'左', '右', '前方' 及び '後方'を意味します。 'U'と'L'は、上方と下方です。10m以上高さが異なる場合に表示されます。

コマンドチャンネルについては'注意事項'をご覧ください。

[go TOP]


Online tab:
  1. パワーボタン
  2. プロファイル表示
  3. オンライン状態表示
    (オンライン:明, オフライン:暗)
  1. 間隔設定ボタン
  2. UUID取得ボタン
  3. 走査表示
     

このタブは、アバターのオンライン状態をチェックします。この機能を使う場合、 対象アバターのUUIDをコンフィギュレーションファイル(!CC2-config)に記述する必要があります。

HUD上部は、チェック間隔を示しています。チェックは捜査アニメーションの開始時に行われます。

UUIDは、'UUIDボタン'で得ることができます。クリックしたら、コマンドチャネルにアバター名を タイプしてください。
ツールは、w-hat.comからUUIDの取得を試みます。見つからない場合は、'sensor'を使います。'sensor' の場合は、対象アバターがあなたの近くにいる必要があります。

コマンドチャンネルについては'注意事項'をご覧ください。

[go TOP]


 

 

以上です

     ジャンル : オンラインゲーム      テーマ : セカンドライフ
     タグ : tool manual
このページのトップへ

2011/08/31(Wed) 22:39:39

取扱店と作品一覧はこちら


通知[11/10/09]:テレポート後に表示が期待通りにならない不具合を修正しました。少し機能追加もあります。Rev.1になっています。

先日紹介したカメラ制御ツールV1 の後継ツール作成中ですが、なかなか完成に至りません。blog更新も滞ってます^^;

というわけで、少し前に作ったフローティングテキストチェンジャーをつなぎで:p 紹介しておきます。

装着して使ってください。オブジェクトは何でもよかったんですが、 帽子にしてみました。
スクリプトは移動できますので、好きなものに入れ替えてください。 なお、オブジェクトの表示・非表示は透明度を変更しています。 スクリプトを入れ替える際は、アルファを変更しても問題のないオブジェクトにしてください。

自動AWAY時には、LINKメッセージを出しています。AWAYのときに何かしたければ、そのメッセージを拾ってください。 例は、READMEにあります。

よろしければお持ちください。

 

 

以上です

取扱店と作品一覧はこちら

     ジャンル : オンラインゲーム      テーマ : セカンドライフ
     タグ : tool freebie
このページのトップへ

2011/07/13(Wed) 19:59:52

取扱店と作品一覧はこちら


通知[11/10/15]:購入直後の装着時にPermission関連のエラーが出る不具合を直しました。Rev.1になっています。

先日カメラ制御スクリプトを紹介しましたが、 その製品版です。

なぜV1か? ほんとは、もう少しいろいろ機能をつける予定だったんですけど、 時間がかかりそうなので、簡易版としてリリースすることにしました。 どんな機能を付けるはずだったかは、V2ができてからにします^^ しばらく出来そうもないし:p

以下マニュアルです。


English
日本語


Ada's Camera Controller Ver.1

Abstract
This tool is a camera controller for 'Machinima'.

Features:

  • It can store camera positions, and can move positions by complementing positions between axes.
  • playback time can be specified approximately by the second.
    It can not specify exact time because of a specification of the tool (There is 10% error).
  • It can start animation when 'playback' starts.
  • It can share the camera work with the other avatars.
  • The HUD disappears when playback starts.
    When you have the other HUDs, 'Shift+ALT+H' helps you to toggle HUD display.

Contents

CameraControllerMain unit for recording and playback
CameraControllerClientPlayback tool of another avatar's camera position
AnimSyncA kind of poseball that can start animation by cue from 'CameraController'

Usage

  • CameraController
    • Wear it on HUD

    • Move your camera to the position, then click record button to store it.
      Then move the camera to the next position, and click the button again. Continue to these actions until you satisfy.
      The moving time of point-to-point is the same. That is, when you move the camera slowly, you set points with short range.
    • Click stop button, when you finish recording.
      After clicking the button, say playback time (the second) to the chat window (or channel you specified in config file). After clicking stop button, whenever you say the time, playback time can be changed. When you click playback button before specifying the time, the tool uses the last playback time.
      Because of implementation specification, it is not able to specify the exact playback time.
    • Click playback button (long click for long countdown).
      When your camera is not default status (after moving of the camera by ALT + mouse, for instance), press ESC button to reset the camera. Otherwise, the camera won't move.
      The tool starts countdown from 3, and start to playback. On the same time, the tool disappears and animation starts. Synchronization of an animation is done by AnimSync (see later part for the detail).
      When the click time is more than 0.5 [s] (long click), countdown starts from 15.
    • Click camera cancel button, when you need it.
      The camera position moves to the default.
    • When you want to share your camera work with the other avatars.
      • Ask avatars to wear CameraControllerClient.
        Explanation of the client describes later. The avatars must get it from Ada STORE.
      • Click data transfer button.
        After clients' receiving the data, their status is waiting the cue from you.
      • Click Sync. Playback button
        Almost same as the playback button. Clients start playback at the same time.

  • CameraControllerClient
    It receives data from 'CameraController' and reproduces the camera work.
    • Wear it on HUD

      You need to stay on the same SIM as a sender. And you need be within 100m from a sender.
    • After a sender sends data, the tool waits cue from the sender.
      During cue waiting, set camera control as default by pressing ESC key. When camera control is not default, the camera won't move, even if the sender sends cue.
      Because of implementation specification, it is not guarantee 100% of data receiving. Lost data is replaced by nearest data. The camera will stop at these point during playback.
    • Click camera cancel button, when you need it.
      The camera position moves to the default.
    • Click power button to turn on/off.
      When the state is power-off, data receiving does not occur. It discards received data when it is turned off.
    • It can be used with 'CameraController'
      It does not receive data from own 'CameraController'.

  • AnimSync
    This is a kind of pause ball that starts an animation by cue from the 'CameraController'. A script in its content tab is editable so that you can modify action.
    • REZ it.
      It must be on the same SIM as a sender. And it must be within 100m from a sender.
    • Edit script in its content tab.

  • Misc.
    • You can do nothing during playback of 'CameraController' and 'CameraControllerClient'
      Any interruption can not be occur. In case of emergency, detach it.
    • Each channel can be changed. Edit CC*-config in the content tab.
      In CCC-config, specify the channel for synchronization. In CC-config, specify the channel for playback time setting and synchronization by comma separator.
    • Viewer setting
      When you move the camera to far, you may need change setting of your viewer. Check "Disable Camera Constraints" in "Advanced" menu.

Ada's Camera Controller Ver.1

概要
このツールはMachinima作成用のカメラ制御ツールになります。以下の特徴があります。

  • 複数のカメラポジションを記憶して、ポジション間を補完しながら再生します。
  • 再生時間は秒数で大まかに指定することができます。
    ツール仕様上正確な時間で再生することはできません(10%程度は誤差があります)。
  • アニメーションを同期制御することができます
  • カメラワークを他のアバターと共有することができます。
  • 再生時HUDは自動で消えます。
    他のHUDがあるときはShift+ALT+Hで消してください。

コンテンツ

CameraController本体です。録画・再生をします。
CameraControllerClient他のアバターのカメラワークを再生します。
AnimSync再生に合わせてアニメーションをスタートするポーズボールです。

使い方

  • CameraController
    • HUDに装着します。

    • カメラポジションを決めて録画ボタンを押します。
      ポジションは複数指定できます。なお、再生時、ポジション間のカメラ移動時間は同じになるので ゆっくり動かしたいところは細かく指定すればよいです。ポイント間は適当に分割補完されます。
    • ポジション指定が終わったら停止ボタンを押します。
      この直後、再生時間をSayします。秒数を指定してください。再生後もSayで再度再生して様子をみることができます。 指定しない場合は、前回指定した時間で再生します。
      ツール仕様上、指定した時間で正確に再生することはできません。
    • 再生ボタンを押します(長押しでカウントダウンが長くなります)。
      カメラがディフォルト位置でない場合(ポジション決めの後やALT+マウスでの移動後やカメラ移動ツールでの移動後など)、 ESCを押すなどしてカメラをディフォルトにしておいてください。 そうしないと再生ボタンを押してもなにも変化しません。
      カウントダウン(3秒)を始めて再生を開始します。同時にHUDが消え、アニメーション同期を行います(詳細は後述)。
      長押し(0.5秒以上)で、カウントダウンが15秒からになります。
    • カメラキャンセルボタンでカメラ位置をディフォルトに戻します。
    • 他のアバターとカメラワークを共有する場合。
      • CameraControllerClientを装着してもらいます。
        Clientの使い方は後述。お店で入手してもらってください。
      • データ転送ボタンを押します。
        クライアントがデータを受け取り、CUE待ち状態になります。
      • 同期再生ボタンを押します。
        再生ボタンと同じ動きになりますが、クライアント側も同時に再生が始まります。

  • CameraControllerClient
    CameraControllerからのデータを受け取り再生することができます。
    • HUDに装着します。

      送信者とは同じSIMにいてください。また、100m以内にいる必要があります。
    • 送信者がデータを送信してきたらCUE待ちになります。
      この間にESCを押すなどしてカメラをディフォルトに戻しておきます。 カメラがディフォルトでないと送信者がCUEを出してもカメラは移動しません。
      仕様上100%のデータ受信が保証されません。 ロストしたデータは直近の位置を再利用します(この場合、動きがとまります)。
    • カメラキャンセルボタンを押せばカメラをディフォルトに戻せます。
    • パワーボタンを押すとOn/Offします。
      Off状態(暗い状態)では、データ受信を行いません。受信済みデータも破棄します。
    • CameraControllerと同時使用できます。
      自分のCameraControllerからのデータは受信しません。

  • AnimSync
    CameraControllerからのCUEで、アニメーションをスタートするポーズボールです。 スクリプトが編集可能になっていますので、キューから時間をおいて開始するなど調整可能です。
    • REZしてください。
      送信者とは同じSIMにおいてください。また、100m以内におく必要があります。
    • スクリプトを編集します。

  • その他
    • CameraControllerもCameraControllerClientも再生中は何もできません
      割り込みもかかりませんのでご注意ください。緊急の場合はdetachしてください。
    • 各チャンネルは変更できます。コンテンツタブのCC*-configにありますので編集してください。
      CCC-configでは、同期用チャンネルを指定します。 CC-configでは、時間指定チャンネルと同期用チャンネルをこの順でカンマで区切って指定します。
    • Viewer設定
      Viewerの設定を変更することで、カメラを遠くまで移動できるようになります。
      AdvanceメニューのDisable Camera Constraintsにチェックを入れればOKです。

 

 

以上です

取扱店と作品一覧はこちら

     ジャンル : オンラインゲーム      テーマ : セカンドライフ
     タグ : tool freebie
このページのトップへ

2011/07/11(Mon) 23:11:53

LSL関連の目次はこちら

Machinimaをやられる方から相談を受けましてカメラ制御ツール作成中です。

実際には、もうちょっといろいろできるようにしてますが、 今回紹介させていただくスクリプトが基本になってます。

HUDとして使うので、まずは入れ物を用意します。
ここ で紹介している4面プリムを用意してHUDに装着します。


色は適当につけてました。ここに後程紹介するスクリプトを入れればOKです。

ちなみに、商品化中のHUDは↓こんな感じです(持ち金は偽造です^^;)。

まず、なにができるか?

  • 赤いボタンを押すたびにカメラ位置を記憶します。
  • 黒いボタンを押して録画終了
  • 青いボタンを押すと再生します。
    このとき、前もってESCキーを押すなどしてカメラ制御をスクリプト側に渡す必要があります。ご注意ください。 カメラがディフォルトの状態でないとスクリプトでのカメラ移動が有効になりません。 ALT+マウスでカメラを動かした場合などは、ディフォルト状態でありませんので、ESCキーが必要なります。
  • 白いボタンでカメラ制御を開放します。
  • 再生速度はスクリプトの変数で調整します^^;(サンプルということで...)

では、スクリプトです。

// Camera Control Sample
// (C)Ada Quinnell, 2011

integer Division          = 100;
integer Capture_on        = FALSE;
list    Cam_pos;
integer Cam_pos_n;

get_perm()
{
    llRequestPermissions(llGetOwner(),PERMISSION_CONTROL_CAMERA|PERMISSION_TRACK_CAMERA);
}
clear_cam()
{
    llClearCameraParams();
    llReleaseCamera(llGetPermissionsKey());
}
set_cam(vector pos, vector focus)
{
        llSetCameraParams([
            CAMERA_ACTIVE            , TRUE ,
            CAMERA_FOCUS             , focus,
            CAMERA_FOCUS_LAG         , 0.0  ,
            CAMERA_FOCUS_LOCKED      , TRUE , 
            CAMERA_FOCUS_THRESHOLD   , 0.0  ,
            CAMERA_POSITION          , pos  ,
            CAMERA_POSITION_LAG      , 0.0  ,
            CAMERA_POSITION_LOCKED   , TRUE ,
            CAMERA_POSITION_THRESHOLD, 0.0  ]);
}
pan_cam(vector f_pos, vector t_pos, vector f_focus, vector t_focus, integer res)
{
    vector pos_step   = (t_pos   - f_pos  )/res;
    vector focus_step = (t_focus - f_focus)/res;
    integer i;

    for (i = 1; i < res; i++) {
        f_pos   += pos_step ;
        f_focus += focus_step;
        set_cam(f_pos,f_focus);
    }
    set_cam(t_pos,t_focus);
}
play()
{
    integer i;
    integer n      = Cam_pos_n * 2;
    integer res    = Division;
    vector  pos0;
    vector  pos1;
    vector  focus0;
    vector  focus1;

    pos0   = llList2Vector(Cam_pos,i=0);
    focus0 = llList2Vector(Cam_pos,++i);
    set_cam(pos0, focus0);
    for (++i; i < n; i += 2){
        pos1   = llList2Vector(Cam_pos,i  );
        focus1 = llList2Vector(Cam_pos,i+1);
        pan_cam (pos0,pos1,focus0,focus1,res);
        pos0   = pos1;
        focus0 = focus1;
        
    }
}
rec ()
{
    if (Capture_on == FALSE) {
        Capture_on = TRUE;
        Cam_pos_n  = 0;
        Cam_pos    = [];
    }
    vector p = llGetCameraPos();
    Cam_pos += [ p, p + llRot2Fwd(llGetCameraRot()) ];
    Cam_pos_n++;
}
rec_stop()
{
    llOwnerSay((string)Cam_pos_n+"ポイント保存したよ。再生の前にESC押してね。");
    Capture_on = FALSE;
}

default
{
    state_entry ()
    {
        if (llGetAttached() != 0) get_perm();
    }
    attach(key agent)
    {
        if (agent != NULL_KEY) get_perm();
        else                   clear_cam();
    }
    run_time_permissions(integer perm)
    {
        if ((perm & PERMISSION_CONTROL_CAMERA) == 0 || (perm & PERMISSION_TRACK_CAMERA  ) == 0) get_perm();
    }
    touch_start(integer num)
    {
        integer face = llDetectedTouchFace(0);
        if      (face == 3) rec();
        else if (face == 6) rec_stop();
        else if (face == 5) play();
        else if (face == 1) clear_cam();
    }
} 

ちょびっと解説
POSITIONとFOCUS
llSetCameraParam()のPOSITIONとFOCUSは、 それぞれカメラ位置とカメラ焦点位置(見ているものの位置?)です。 カメラ位置はllGetCameraPos()で取得できますが、焦点位置は直接取得できません。 llGetCameraRot()で向きを得て、それをllRot2Fwd()で単位ベクトルに変換して、 カメラ位置に足し込んで焦点位置とします。

再生速度
forループでllSetCameraParam()をコールしているだけですが、このとき少しずつ開始点から終了点まで変化させます。 要は、座標の差をDivision(変数)で除算したものを始点に足していくかんじです。 このDivisionを大きくするとゆっくり動きます。
1秒間に何回llSetCameraParam()をコールできるかは、SIMのスクリプト処理能力に依存します。 ちなみに本店のあるFontaine SIMでは15回前後、どっかのprivate SIMでは70回位でした。

 

 

以上です

LSL関連の目次はこちら

     ジャンル : オンラインゲーム      テーマ : セカンドライフ
     タグ : ものづくり LSL
このページのトップへ