[Opensim-users] Custom Assets Folders

Ursula MATOVA ursula.matova at klintcentral.net
Thu Jan 3 13:45:21 UTC 2008


Hi all,

in SVN 2923, everything works perfectly ...

I was able to bulk load more than 500 Textures in OpenSIM ( from BMP  
512x512 300dpi source files ) then, I retreive them in the bin folder  
( save ToDisk option is turned on ) and I have created folders &  
subfolders in the OpenSim Library > Texture Library ...

Everything is ok now.

I can also view the entire default texture set ( what was not the case  
before ).

The only point, I have to ask Melanie about JP2 creation, without  
using the "Upload & Save To Disk" feature ... I mean : outside the  
SLClient/Opensim ... because, some of the textures I upload doesn't  
display fine and are "blured" ... Even if the source BMP file is  
clean ...

Thanks a lot all of you for this great work with the inventory.

Just for information : I have tested Standalone mode with SQLite and  
Gridmode with MySQL ...
As I always have problems with mono under linux, I have switched my  
server to Windows 2003 ( customized :D ) ...

Regards,

Ursula.

PS: Melanie, if you read this, please could you draw me on the correct  
way to create JP2 Textures ?
Thanks in advance.

Le 3 janv. 08 à 02:48, Justin Clark-Casey a écrit :

> I think you're right.  In fact, I had previous reduced max items in  
> each inventory descendents packet to solve another bug.  I've now  
> reduced this further in r2922 to approximate the number that Linden  
> servers appear to use, so that if it works on the Linden grid, it  
> should work on an opensim grid.
>
> Let us know if this doesn't work.
>
> --
> justincc
> Justin Clark-Casey
>
>
> Adam Frisby wrote:
>> I suspect that might be packet MTU-size related.
>>
>> Should be fixable with a little work, but right now I'm guessing it  
>> only uses a single packet for this.
>>
>> Regards,
>>
>> Adam
>>
>> Ursula MATOVA wrote:
>>
>>
>>> Thanks a lot Adam,
>>>
>>> The saveToDisk option works really fine.
>>>
>>> I'm now able to load some custom textures.
>>>
>>> Justin, yes, now we can create more that one folder per type and  
>>> also  subfolders ... It's nice ...
>>>
>>> The last problem : if I store more that 18 textures items in a  
>>> folder,  the content of the folder is not displayed at all ... ( I  
>>> haven't re- test this on Grid Mode, but it always occurs in  
>>> Standalone mode ).
>>>
>>> Thank you all for this great job.
>>>
>>> Regards,
>>>
>>> Ursula.
>>>
>>> Le 2 janv. 08 à 07:07, Adam Frisby a écrit :
>>>
>>>
>>>
>>>> There's a switch / option for the AssetServer which is called   
>>>> something like "saveToDisk = false", flip it to 'true', then  
>>>> upload  the asset to the server from the SL client.
>>>>
>>>> It will save the asset, including the header SL adds (which is  
>>>> the  crucial missing bit), which you can then use in the  
>>>> library.xml.
>>>>
>>>> Regards,
>>>>
>>>> Adam
>>>>
>>>> Ursula MATOVA wrote:
>>>>
>>>>
>>>>
>>>>> Hi Justin,
>>>>> Yes, I saw the inventory/Libraries.xml but haven't tested it   
>>>>> yet :)  I'll do that in a few minutes :)
>>>>> Thanks again for you great job ... And if you allow me, i'll  
>>>>> post  an  entry in the OpenSimulator Wiki about that ...
>>>>> I'll also try to contact melanie about JP2 ...
>>>>> Thanks again,
>>>>> Happy new year,
>>>>> Ursula.
>>>>> Le 1 janv. 08 à 19:31, Justin Clark-Casey a écrit :
>>>>>
>>>>>
>>>>>> 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
>>>>>>> *******************************************
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> _______________________________________________
>>>>>> Opensim-users mailing list
>>>>>> Opensim-users at lists.berlios.de
>>>>>> https://lists.berlios.de/mailman/listinfo/opensim-users
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> Opensim-users mailing list
>>>>> Opensim-users at lists.berlios.de
>>>>> https://lists.berlios.de/mailman/listinfo/opensim-users
>>>>>
>>>>
>>> _______________________________________________
>>> Opensim-users mailing list
>>> Opensim-users at lists.berlios.de
>>> https://lists.berlios.de/mailman/listinfo/opensim-users
>>>
>>>
>>
>> _______________________________________________
>> Opensim-users mailing list
>> Opensim-users at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-users
>>
>>
>
>
> -- 
> --
> justincc
> Justin Clark-Casey
>
>




More information about the Opensim-users mailing list