Frame Tutorial

Description

In Twinity, frames are a quite popular and simple way to customize apartments. Frames are just 3d models with a rectangular surface that has a special function in the game engine.

Twml options

Inside the Twml document you can define which material of the object contains the frame surface and which functions the frame should expose.
Currently the following functions are available:
  • Picture: The member can upload any picture onto the frame surface
  • Mirror: The member can turn the frame surface into a mirror
  • Browser: The member can turn the frame surface into a web browser
  • Flash Video: The member can play back web videos (e.g. from Youtube) on the frame surface
  • Quicktime Video: The member can play back streaming Quicktime videos on the frame surface

Setting the material id

Watch out: The frame will only work correctly if you specify the correct material id in the <frame material="picture"> node. The id can be found inside the materials-section of the collada file.

<library_materials>
    <material id="frame-material" name="frame">
        <instance_effect url="#frame-fx"/>
    </material>
</library_materials>

Note: The ColladaMax exporter uses the 3dmax material name as id while the OpenCollada exporter uses the 3dmax material name plus "-material" as id. For example: <frame material="picture-material">

Twml example

<package caption="Frame" icon="icon.jpg">
    <description>Frame for picture, mirror and browser</description>
    <object path="frame.dae">
        <frame material="picture">
            <frame_content type="picture" />
            <frame_content type="mirror" />
            <frame_content type="browser" />
        </frame>
    </object>
</package>

Preview