[Opensim-users] Custom Assets Folders
Ursula MATOVA
ursula.matova at klintcentral.net
Mon Dec 31 15:36:24 UTC 2007
Hi All,
Here is some informations for using the new "custom assets folders"
function ( Thanks a lot Justincc ) :
( Tested in Standalone mode )
You have to consider the following files & folders :
* bin/inventory/OpenSimLibrary/OpenSimLibraryFolders.xml
* bin/inventory/OpenSimLibrary/OpenSimLibrary.xml
* bin/assets/AssetSets.xml
* bin/assets/
Step #1 : Define a new Folder
Edit the bin/inventory/OpenSimLibrary/OpenSimLibraryFolders.xml and
add a new section :
<Section Name="My Folder">
<Key Name="folderID" Value="80000112-000f-0000-0000-000100bba001"/>
<Key Name="parentFolderID"
Value="00000112-000f-0000-0000-000100bba000"/>
<Key Name="name" Value="My Folder"/>
<Key Name="type" Value="13"/>
</Section>
This should create a new folder named "My Folder" in the "OpenSim
Library" tree.
Remark : One important thing to know is that you cannot have more that
1 Folder per type. ie if you want to create a new folder containing
some new textures, you cannot simply add a section like this :
<Section Name="My Textures">
<Key Name="folderID" Value="80000112-000f-0000-0000-000100bba001"/>
<Key Name="parentFolderID"
Value="00000112-000f-0000-0000-000100bba000"/>
<Key Name="name" Value="My Textures"/>
<Key Name="type" Value="0"/>
</Section>
But you MUST create a subfolder of the existing "Texture Library"
folder, something like this :
<Section Name="My Textures">
<Key Name="folderID" Value="40000112-000f-0000-0000-000100bba001"/>
<Key Name="parentFolderID"
Value="00000112-000f-0000-0000-000100bba001"/>
<Key Name="name" Value="My Textures"/>
<Key Name="type" Value="0"/>
</Section>
The "parentFolderID" should have the value of the "folderID" from the
"Textures Library" folder ...
Here are the different TYPE you could use :
Accessories : 8
Animations : 20
BodyParts : 13
Clothing : 5
Gestures : 21
Landmarks : 3
Notecards : 7
Objects : 6
Photo Album : 15
Scripts : 10
Sounds : 1
Textures : 0
I have only tested textures folders/subfolders ... But should work
with other types ( but don't know how to push contents in them yet ).
Step #2 : Define Asset Items for this folder :
Well, we now have the Textures Subfolder : "My Textures" with folderID
= 40000112-000f-0000-0000-000100bba001 let's fill it with some custom
textures :
go to "bin/assets/" directory and edit the "AssetSets.xml" file by
adding the following section :
<Section Name="My Asset Set">
<Key Name="file" Value="MyAssetSet/MyAssetSet.xml"/>
</Section>
now create the coresponding directory :
bin/assets/MyAssetSet
move to that directory and create a new XML file : MyAssetSet.xml
this one should have the same structure than the default one ( bin/
assets/OpenSimAssetSet/OpenSimAssetSet.xml ) ...
Here is one for a sample texture :
<Nini>
<Section Name="sample Texture">
<Key Name="assetID" Value="40000000-0000-2222-3333-100000000001" />
<Key Name="name" Value="sample" />
<Key Name="assetType" Value="0" />
<Key Name="inventoryType" Value="0" />
<Key Name="fileName" Value="sample.jp2" />
</Section>
</Nini>
copy your "sample.jp2" file to that directory.
then, go back to the "bin/inventory/OpenSimLibrary" directory and add
the following section to the "OpenSimLibrary.xml" file :
<Section Name="sample Texture">
<Key Name="inventoryID"
Value="40000000-0000-2222-4444-100000000001" />
<Key Name="assetID" Value="40000000-0000-2222-3333-100000000001" />
<Key Name="folderID" Value="40000112-000f-0000-0000-000100bba001"/>
<Key Name="description" Value="sample texture" />
<Key Name="name" Value="sample" />
<Key Name="assetType" Value="0" />
<Key Name="inventoryType" Value="0" />
<Key Name="currentPermissions" Value="2147483647" />
<Key Name="nextPermissions" Value="2147483647" />
<Key Name="everyonePermissions" Value="2147483647" />
<Key Name="basePermissions" Value="2147483647" />
</Section>
That's done ...
You should now be able to see the new Texture Subfolder and the Sample
texture in your inventory.
Be very carefull with folderID / inventoryID / assetID ... and
types ... It's very sensitive. :D
Now : the question is : How to produce JP2 files for OpenSIM ...
I have used the following tools under UNIX to produce some JP2 files
from BMP ... But the resulting files doesn't display yet ... Sure I
have not used the right convert options ...
I have used the Kakadu JPEG2000 SDK from here : http://www.kakadusoftware.com/Downloads.html
# ./kdu_compress -i sample.bmp -o sample.jp2 -full -rate 1.0,0.5 -
no_weights
Generated 1 tile-part(s) for a total of 1 tile(s).
Code-stream bytes (excluding any file format) = 124927 = 0.999416 bits/
pel.
Layer bit-rates (possibly inexact if tiles are divided across tile-
parts):
0.496832, 0.999416
Layer thresholds:
52206, 52026
Processed using the multi-threaded environment, with
2 parallel threads of execution (see `-num_threads')
But this one doesn't want to load ... at all ... :S
( I also tried to use GraphicConverter on my Mac for that )
Please if some of you find a way to produce JP2 Textures that will be
great :D
Regards, Ursula.
More information about the Opensim-users
mailing list