|
PaidAssetUpload
How to upload paid assets
Paid Asset UploadThis page details the upload of assets you have to pay for. That is, animations, sounds and textures. AnimationsWARNING: Animation uploads currently do not work. The upload will complete successfully, however, and cost you L$10. You have been warned. Having said that, uploads are accepted in the .bvh format. Normal SL restrictions apply. See Issue #5 for details on why it won't work at all. However, to attempt to upload an animation is very simple. Just create a new uploader object, pass the simcaps object to its constructor and use the uploadanim function. The arguments are: filename, inventoryname, inventorydescription, and, optionally, targetfolder (Defaults to 'Animations') Example: // Assuming that $caps is an already-logged-in simcaps object:
$uploader = new uploader($caps);
$uuid = $uploader->uploadanim('animtest.bvh','Test Anim',"This is a test animation.");The return type will be an LLUUID. SoundsUploading a sound is very similar to an animation. However, the input file must be a 128kbps, 44.1KHz, single channel Ogg Vorbis file that is less than but not equal to 10.0 seconds long. Simply substitute uploadanim for uploadsound: $uploader = new uploader($caps);
$uuid = $uploader->uploadanim('soundtest.ogg','Test Sound',"This is a test sound.");TexturesAgain, largely similar to animations. However, texture upload uses the convert tool from ImageMagick to convert the files to JPEG2000 and alter their dimensions to the powers of two required by SL. As such, you must have a copy of ImageMagick with JPC support, and it must be in your path. If it isn't in your path, you can use the setconvert method of the uploader object to set the absolute path. Textures also take an additional optional argument, quality. This defaults to 100, and it is recommended that you don't change it. It is the quality used by convert to convert whatever the input format is to J2C. To upload an image as a texture, assuming you have convert with J2C support in your path, use the uploadtexture method like this: $uploader = new uploader($caps);
$uuid = $uploader->uploadtexture('texturetest.jpg','Test Texture',"This is a test texture.");WARNING: Due to what appears to be an ImageMagick bug, you may have blurred textures uploaded, as detailed in Issue #3. |
Sign in to add a comment