[Opensim-users] Custom Assets Folders

Justin Clark-Casey jjustincc at googlemail.com
Tue Jan 1 18:31:35 UTC 2008


Hi Ursula,

Thanks for writing that - hopefully this will prove useful to anybody 
wanting to use this functionality.  A couple of points

* Shortly after you wrote this, I added an inventory/Libraries.xml 
file.  This allows you to create your own library folders and items 
files without having to edit the OpenSimLibrary ones.  More details in 
the README.txt in the inventory directory.  This is the last change I 
personally anticipate doing for a while in this area (except for bug fixes).

* It should be possible to create two folders of the same type (e.g. two 
texture folders).  I have done this successfully in testing.

* As you saw, this works in standalone mode.  It also works in grid 
mode, as long as all the regions also have the same inventory 
configuration.  If a region doesn't have the same configuration, the 
library items it doesn't have will not be openable or rezzable (I think 
- I haven't actually tested this).  This is because item information for 
regions is being loaded from the local filesystem and not from the 
inventory server.  The reasons for this are largely historical and can 
be lifted in the future.  However, personally I will be turning my 
attention to other areas for now.

* Adding extra assets will increase startup time since we currently 
reload all assets sets on startup (even if they already exist in the 
asset db).  This probably isn't necessary and is another thing that can 
be changed in the future.

* I also tried using Kakedu to fix some broken jp2 files without 
success.  melanie_t on irc may well know how to do this (since she 
recently created the Plywood texture which does work in OpenSim).

--
justincc
Justin Clark-Casey


Ursula MATOVA wrote:
> 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.
>
>
> ------------------------------
>
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
>
>
> End of Opensim-users Digest, Vol 5, Issue 1
> *******************************************
>
>   




More information about the Opensim-users mailing list