Table of Contents

Shortnote

The patch below is meant for the Singularity viewer and turns the viewer into a God-like client with the ability to export most assets from either Second Life or OpenSim.

The patch modifies the Singularity viewer so that the built-in, client-side, shallow "security" is disabled.

Oh no, not this shit again!

It is remarkable how broken the whole system Linden came up with is. Many protections are embedded into the client, without any server-side checks. For example, Singularity includes (without source-code modifications) an option to toggle an option which allows an agent to always fly - regardless of the simulator permissions. Even if the simulator disallows flying, the server relies on the client to honor the restriction.

Similarly, it is remarkable that Linden does not care and that the whole grid is pretty much a welcoming target of copyright infringement. For example, several animation creators have had all their items "stolen" and the blame was shoved onto broken vendors. In truth however, animations can be exported as any other item, completely bypassing any "vendor" systems. Furthermore, there is an avid market for "copybot" protections (the sums go up to the L$10 000), when in fact, the "copybots" may very well be modified viewers that are impossible, under any circumstance, to detect - most certainly not by using pure LSL code.

The patch below will slightly alter Singularity and Avination viewer so it can export assets to the hard-drive without leaking any trace of tampering. This is going further than Rake since Rake only deals with assets in the avatar's inventory, while these patches make it possible to grab most in-world assets.

If you plan on using your modified viewer in Second Life, it is recommended to use the Singularity master-branch patch because it is recent enough to cope with the Server-Side Baking (SSB) "feature" (that did not really make a difference) of Linden servers. On OpenSim, any of the patches will do fine.

Capabilities

The following table summarizes the agent's capabilities after applying the patch to Singularity (or Avination viewer):

Type Details
Textures and Sculpts Any texture or sculpt, whether in inventory or otherwise can be copied.
Meshes Supported on the master branch of Singularity.
Animations Can be saved if playable in-world, either in inventory or from an object.
Shapes Can be exported if in inventory.
Wearables Can be exported while worn as a baked texture (from foreign avatars as well) 1).
Objects Can be exported if displayed in-world (from foreign avatars as well).
Scripts Cannot and will never be able to be exported 2).

Export Guide

The patch disables most client-side security settings without dismantling the permission system entirely. That is, the patch adds a convenient new menu item Advanced→Hacked Godmode that, when toggled, switches the viewer into a grid God client. This also enables a bunch of features such as kicking, freezing, unfreezing and the Linden profile gateway called CSR - most of which have additional server-checks.

Regardless, since the main goal of the article is to grab assets, the guide that follows shows how any asset can be copied from Second Life or OpenSim.

Textures

Exporting Objects

You can grab any in-world texture by going to Advanced→Hacked Godmode and then by selecting any in-world texture and copying the Asset UUID to a different object.

Objects

Exporting Objects

Any object that is displayed in-world can be copied by right-clicking the object, going to Tools on the pie menu and then selecting Export from the next pie menu. Linked objects will be exported too along with all the textures.

Animations

Exporting Objects

Animations can be exported to the animatn format and then uploaded anywhere using the same viewer. In order to do that the animation has to be in your inventory or playable by your avatar. Go to Hacked Godmode and double-click an animation. Then select from the menu File→Save Preview As… and save the animation to the harddrive. Additionally, animations can be converted to BVH by using Anim2BVH.

Wearables and Shapes

Exporting Shapes and Wearables

Shapes can be imported and exported at will once the Hacked Godmode menu item is toggled but they have to be in the current avatar's inventory.

Baked Wearables and Skins

Switch to Hacked Godmode and right-click any attachment on an avatar and choose the menu option Advanced→Character→Debug Avatar Textures. Then, click a texture and you will see the UUID box filled with that texture UUID. You can then create a box and apply that texture UUID to the box and export it to your harddrive. For convenience, memorize the key-combo. This effectively grabs the baked textures off the avatar, so for skins you will need to find a naked avatar.

Exporting Wearables

Wearables can exported the same way as skins are exported: by selecting an object on an avatar and then pressing the shortcut keys Alt+Ctrl+Shift+A. The wearables will have to be processed in a graphics program because they will be superposed on the skin. This is very easy to do and takes little time.

Compiling the Viewer

Compiling the viewer is not covered here, but a good guide is the one provided on the Imprudence secondlife:

However, for Linux-systems, and for Singularity, the procedure can be summarised here. The build requires the cmake package. If you are on Linux, consult your Linux distribution on how to install the cmake package. If you are on OSX, you can get cmake via homebrew by issuing brew install cmake. After that, you can proceed with the steps here:

git clone https://github.com/singularity-viewer/SingularityViewer.git
git reset --hard 897e175d3c9be3ea25acbf5c7b4a53dc53e31453
cat copybot.patch | patch -p1 --dry-run
cat copybot.patch | patch -p1
cd indra/

and issue:

./develop.py -t Release configure

which will prepare the sources for compilation.

indra/cmake/00-Common.cmake

and delete the following string:

-ftemplate-depth=256

otherwise the viewer will not compile.

./develop.py -t Release build

and after about an hour you should see the following message, indicating that the build was successful:

echo Build\ all\ projects
Build all projects
** BUILD SUCCEEDED **

In case of failure, happy debugging. :-)

Getting a Ready-Made Viewer

This is a popular demand, but Wizardry and Steamworks does not distribute binaries. However, rumor is that Darkstorm Viewer or Hydrastorm are viewers that implements all that we show here and many other features. It is up to you whether to trust third-party viewers or not.

Things you Should Know

Index

1)
This will have the clothes superimposed on the skin, but the texture can be cleaned easily by using any graphics program.
2)
The reason why scripts cannot be exported is because the code is stored on the server side. When an agent saves a script, it gets compiled on their machine and then sent to the server as bytecode. It is possible to sniff one's own connection to grab the bytecode (and even plain ASCII-format code in some cases) but the reverse is not possible because the server never sends the bytecode back to the client.