Custom Libraries
From OpenSimulator
(merged the following page -> "Library Preparation" and "Library Importing") |
m (Removed 'Template:' prefix from template includings and/or changed external-link into internal-link) |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | {{ | + | {{Quicklinks}} |
<br /> | <br /> | ||
Adding new content(scripts,textures,notecards,objects,etc.) to your OpenSim server isn't that hard to do. The two ways to do it are: | Adding new content(scripts,textures,notecards,objects,etc.) to your OpenSim server isn't that hard to do. The two ways to do it are: |
Revision as of 06:19, 10 June 2011
Languages: |
English Deutsch |
Adding new content(scripts,textures,notecards,objects,etc.) to your OpenSim server isn't that hard to do. The two ways to do it are:
- Using the viewer
- Preparing your content, and directly importing it to the server (preferred for large amounts of content)
The second method can be divided into two parts:
- #Preparing Library - how to create extra items for the default inventory
- #Importing Library - how to import extra items into the default inventory
Preparing Library
If you want ready-to-import libraries, you could check out the Free Assets section...
Textures
Converting Textures
The jp2 files used by the Secondlife client, are actually j2k files. These can be encoded by image_to_j2k from openjpeg. There is a Linux script or Windows script in perl, that does all the work for you. It uses imageMagick and image_to_j2k to make valid input files and converts them to j2k fileformat. It then renames the j2k file to jp2 extension, so these can be used within the viewer.
- Download the blender texture cd (as an example)
- Prepare your imagefiles (jp2 files with 16,32,64,128,256,512,1024 resolution and aspect ratio's 1:1,1:2,1:4,1:8,1:16,1:32,etc. are supported)
- Copy the jp2 files(including directory-structures) into the /opt/opensim/library directory
Terrains
Create a terrain heightmap
Importing Library
Creating a custom library
- Create the appropriate xml storage files using the Asset Generator script
- Edit the opensim inventory library reference file
nano /opt/opensim/production/bin/inventory/Libraries.xml
- Add the inventory reference
<Section Name="OpenSim Custom Library"> <Key Name="foldersFile" Value="MyCoolOpenSimLibrary/3DDCInventoryFolders.xml"/> <Key Name="itemsFile" Value="MyCoolOpenSimLibrary/3DDCInventoryItems.xml"/> </Section>
- Edit the opensim assets library reference file
nano /opt/opensim/production/bin/assets/AssetSets.xml
- Add the asset reference
<Section Name="OpenSim Custom Asset Set"> <Key Name="file" Value="MyCoolOpenSimAssetSet/3DDCAssetSet.xml"/> </Section>
- Restart OpenSim
- Check out if the textures are rendered correctly in the viewer
Load Terrain
Assume your file is called "terrain.r32".At the region console, type:
script terrain load terrain.r32
You now have your new terrain! You can at this point use the terrain add, terrain scale, or terrain multiply to rescale it to your liking.