[Opensim-dev] Serving textures in different formats

Diva Canto diva at metaverseink.com
Wed Dec 8 17:05:26 UTC 2010


Yes.
Plus, once the server does the conversion, the result of that conversion 
can be, at least, cached on the sim, if not stored persistently on the 
asset server; so what I'm planning to do here already goes into the 
direction of having several image types, more or less persistently, on 
the server side.

On 12/8/2010 9:04 AM, Melanie wrote:
> The conversion to jp2 is done by the linden viewer. The asset server
> could store any format, it's just a byte stream to us.
>
> Melanie
>
> Toni Alatalo wrote:
>> On Dec 8, 2010, at 5:36 PM, Diva Canto wrote:
>>
>>> So far, all textures in OpenSim are stored and served as jp2. However, some viewers can't use jp2. Example: Unity3d, for the time being. I would like to improve the GetTexture cap service by adding the ability for it to make conversions on the fly depending on extra data provided by the caller.
>> What about uploading?
>>
>> Ogre using viewers like realXtend apps are also happy with many texture formats, notable DDS which is most lightweight to load 'cause GPUs can decode them on their own. JP2 decoding with open source libs is very heavy, especially on small mobile devices. We've been using PNG as well.
>>
>> One problem IIRC we've had with Opensim is that it converts all the textures to jp2 upon upload.
>>
>> Is not much a problem for us anymore, as we are increasingly using normal web servers to host all assets.
>>
>> But it is insane to convert a png to a jp2 upon upload, and then convert it to png again upon download, so figured to point this out. Given I recall right and this was indeed on the server side, and not in the viewers.
>>
>> Of the actual question, I don't know my preference yet -- usually the easy&  safe way is to think that using standards like HTTP normally is good :) .. but haven't used those accept&content-type headers in own code so don't really know.
>>
>> ~Toni
>>
>>> There are two ways of doing this. Which one do people prefer?
>>>
>>> A) Add an extra query parameter: http://foo.com/GetTexture/?texture_id=<uuid>&format=<format>
>>>
>>> B) Use the Accept and Content-Type headers appropriately.
>>> The request might have
>>> Accept: image/png, image/jp2
>>> And the response might have
>>> Content-Type: image/png
>>>
>>> Diva / Crista
>>>
>>> _______________________________________________
>>> Opensim-dev mailing list
>>> Opensim-dev at lists.berlios.de
>>> https://lists.berlios.de/mailman/listinfo/opensim-dev
>> _______________________________________________
>> Opensim-dev mailing list
>> Opensim-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-dev
>>
>>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>




More information about the Opensim-dev mailing list