Difference between revisions of "Texture Usage"

From Second Life Wiki
Jump to navigation Jump to search
m
m (I corrected a few grammar problems, incorrect prepositions, sentence fragments, and adjusted the wording slightly, replacing vulgar expressions like "lots of" with "many.")
(One intermediate revision by one other user not shown)
Line 4: Line 4:




We have all been there. Teleporting to a new location, everything being grey, and having to stand there for 10 minutes waiting for everything for load. Even then a lot of the textures still remain blurry. Some people give up and teleport away, some people go off to make coffee. Land owners can lose traffic over it. Store owners can lose customers over it. So optimizing your textures for a faster load time, without losing any of the visual impact, is an valuable practice to use.
We have all been there, teleporting to a new location, everything grey, the need to stand there for 10 minutes waiting for everything to load. Even then many textures still remain blurry. Some people give up and teleport away, some people leave to make coffee. Land owners can lose traffic over it. Store owners can lose customers over it. So optimizing your textures to ensure that they load quickly, without losing any of the visual impact, is important.


As a general rule the smaller the surface the smaller the texture size you need to use. The smaller the better, as the result would be the textures load a lot faster for everyone.
As a general rule the smaller the surface the smaller the texture size you need to use. The smaller the better, as the result would be the textures load a lot faster for everyone.


Very small texture sizes on small surfaces look absolutely fine and you don't lose any of the visual quality. Try using sizes such as 64x64 128x128 and 256x256, and in certain cases you can go even smaller. If the texture becomes pixilated just up the size, but try to keep the size as small as possible.
Very small texture sizes on small surfaces can look absolutely fine and you don't lose any of the visual quality. Try using sizes such as 64x64 128x128 and 256x256, and in certain cases you can go even smaller. If the texture becomes pixelated just try increasing the size slightly, but try to keep the size as small as possible.


As with anything it is a balance you're aiming to achieve, as you need to use small texture sizes on small surfaces, but you don't want to go overboard and end up with a pixilated result. For example if you use a 256 x 256 sized texture on object of a certain size the result can end up looking pixilated. In this case you would need to up the texture size to 512 x 512.
As with anything it is a balance you're aiming to achieve, as you need to use small texture sizes on small surfaces, but you don't want to go overboard and end up with a pixelated result. For example if you use a 256 x 256 sized texture on object of a certain size the result can end up looking pixelated. In this case you would need to up the texture size to 512 x 512.


If you have one texture repeated lots of times around your parcel/region, it costs more resources to have that one texture broken down into various sizes for different sized surfaces. In this case it is better to just have one size of the texture throughout your land.
If you have one texture repeated many times around your parcel/region, it costs more resources to have that one texture broken down into various sizes for different sized surfaces. In this case it is better to just have one size of the texture throughout your land.


Lessening the number of textures you are using on your land is also a great way to reduce the load time. If you have 3 or 4 main 512 x 512 textures on your land for the main build, and then use smaller sized textures for the detail on smaller objects, this would also make the texture load extremely efficient.
Reducing the number of textures you are using on your land is also a great way to reduce the load time. If you have 3 or 4 main 512 x 512 textures on your land for the main build, and then use smaller sized textures for the detail on smaller objects, this would also make the texture load extremely efficient.


You should rarely ever use 1024 x 1024 sized textures. Try to avoid using this size as much as possible.
You should rarely ever use 1024 x 1024 sized textures. Try to avoid using this size as much as possible.
Line 21: Line 21:


Keep in mind that your average Second Life user has between 128MB to 256MB of memory on their video card.  You can see that it won't take much to fill that up if you toss a bunch of large textures onto your builds.  Bottom line is, you want to use the smallest texture possible for the appropriate surface size.
Keep in mind that your average Second Life user has between 128MB to 256MB of memory on their video card.  You can see that it won't take much to fill that up if you toss a bunch of large textures onto your builds.  Bottom line is, you want to use the smallest texture possible for the appropriate surface size.


== Transparency ==
== Transparency ==

Revision as of 12:30, 14 May 2013

Tips and Tricks for Texture Optimization

We have all been there, teleporting to a new location, everything grey, the need to stand there for 10 minutes waiting for everything to load. Even then many textures still remain blurry. Some people give up and teleport away, some people leave to make coffee. Land owners can lose traffic over it. Store owners can lose customers over it. So optimizing your textures to ensure that they load quickly, without losing any of the visual impact, is important.

As a general rule the smaller the surface the smaller the texture size you need to use. The smaller the better, as the result would be the textures load a lot faster for everyone.

Very small texture sizes on small surfaces can look absolutely fine and you don't lose any of the visual quality. Try using sizes such as 64x64 128x128 and 256x256, and in certain cases you can go even smaller. If the texture becomes pixelated just try increasing the size slightly, but try to keep the size as small as possible.

As with anything it is a balance you're aiming to achieve, as you need to use small texture sizes on small surfaces, but you don't want to go overboard and end up with a pixelated result. For example if you use a 256 x 256 sized texture on object of a certain size the result can end up looking pixelated. In this case you would need to up the texture size to 512 x 512.

If you have one texture repeated many times around your parcel/region, it costs more resources to have that one texture broken down into various sizes for different sized surfaces. In this case it is better to just have one size of the texture throughout your land.

Reducing the number of textures you are using on your land is also a great way to reduce the load time. If you have 3 or 4 main 512 x 512 textures on your land for the main build, and then use smaller sized textures for the detail on smaller objects, this would also make the texture load extremely efficient.

You should rarely ever use 1024 x 1024 sized textures. Try to avoid using this size as much as possible.

Keep in mind that your average Second Life user has between 128MB to 256MB of memory on their video card. You can see that it won't take much to fill that up if you toss a bunch of large textures onto your builds. Bottom line is, you want to use the smallest texture possible for the appropriate surface size.

Transparency

Believe it or not, a clear texture also causes a hit on the Viewer. There are a few things you can do to keep this to a minimum, in order of most efficient to least:

Use the built-in "Transparency %" setting

  1. Right-click an object and select Edit.
  2. Optionally, click Select Face if you don't want to select the whole object, then click a face to select it.
  3. In the build tools palette, click Texture tab.
  4. Set Transparency %" to 100.

This doesn't work in older viewers. You can also script this:

Create a new empty script in your inventory, and add this to it: <lsl> default { state_entry() { llSetTexture(TEXTURE_TRANSPARENT, ALL_SIDES); }

} </lsl>

Save it, then add it to the prim you want transparent. You can then remove the script, and your prim will remain invisible. Be warned however, that this still adds a memory hit to your build.

Use the Library transparent texture

  1. Select Me menu > Inventory.
  2. Search your inventory for "default transparent". The texture you're looking for is *Default Transparent Texture.

Create your own transparent texture to use

The free transparent textures available in Second Life are generally 256 x 256 pixels but you can upload one that is 8 x 8 to use instead. Simply create a new texture of 8 x 8 pixels in your graphics application, and save it with nothing else added (as a 32-bit .tga or a .png). You now have a transparent texture that should only use 256 Bytes of memory as opposed to the 256 x 256 transparent texture available free in world that will use 256KB of memory.


If you're interested in seeing just exactly what's going on behind the scenes when you teleport into an area, hit ctl+shift+3 which will open up the texture console and you can watch the textures around you being loaded into your viewer. Hit ctl+shift+3 again to close it.


Back to Good_Building_Practices