VENICE3D.NET  
 

 

Textures in Activeworlds : efficient texturing

1. Choose your texturing program

If you want to make textures yourself , you can also choose between a wide range of texturing programs : a texture can be a simple picture, but you can make a pattern of it , or a seamless texture , or you can cut it out as a mask, or you can make a gif animation or a filmstrip , or even a skybox. There are simple texturing programs with few possibilities (eg. Paint) , and advanced programs with many possibilities (eg. Photoshop).

2. File extensions

For pictures and textures in Activeworlds, we can use these file extension types : .jpg .gif and .png. These are also the most popular file type that you will find on the internet. But in a real-time 3d chat environment, there is more than just choosing the texture file type , there is more involved ...

3. What do you need to know about textures ?

A. Entering the 3d world

The capacity of the computers has increased, the patience of the visitors has decreased. This means you will have to optimize the 3d environment, so that the real-time visitor has a positive experience when entering the world : What happens when you enter a 3d world ?

1. download server : the model (geometry) en the texture files are downloaded from the (web)server , where you have the object path of the world.
2. loading of the files : the files are stored into the memory of the computer of the visitor , so that they can be viewed (=cache)

3. rendering of the scene : the 3d world will appear on your screen, all objects become visible in your world. This rendering time is important : all the objects should load smoothly and fast, the computer of the visitors should be able to process these downloads quite easily.

B. Textures on the internet

Textures which you will find on the internet have not been made for using in a 3d real-time environment, but normally for another purpose. Also textures of 3d models on the internet, have not always been designed for real-time environments : often the file size will be too large. In this case the file size of the textures will have to be resized into another pixel size.

C . The powers of 2

Number 2 is an easy number, which can be processed easily by a computer , and that's why you give to your textures a pixel size which is a multiple of 2, because the computer (aw browser) needs less time to calculate and process these numbers. Under powers of 2 , we mean : 8 x 2 = 16 x 2 =32 x 2 = 64 x 2 = 128 x 2 = 256 x 2 = 512 x 2 = 1024. And for the textures, we will use image sizes indicated with "pixels" : 64x64 128x128 256x256 512x512.

In Activeworlds , we use mostly square images, but also square images are possible : 128x64 512x128 , as long as it is a multiple of 2. And the width should be larger than the height, otherwise Activeworlds will consider this as a filmstrip. You are allowed to use another image size (not a multiple of 2), but then the computer will need a bit more time to process the file.
So in Activeworlds, we speak about the pixel size of the images (256x256pixels) rather than the file size (indicated in kilobyte). When you find a texture on the internet , better resize the image into a suitable pixel size.

D. How large does the texture size needs to be for your objects ?

1. The size of the object : On small objects like flowers and books you need to use textures with small pixel size 64x64 or 128x128 is sufficient. On larger objects such as cars, walls, terrains , you can use more pixels e.g. 512x512. Also for textures with text and words you better use a larger pixel size, so that you still can read the text. So use the image size in function of the surface. 5mx5m -> 256x256 pixels, 10x10m -> 512x512 pixels.

2. The importance of the object : Which role does the object play in your 3d scene ? Is it important, or just a background player ?
3. The video memory of your computer (and of the visitor's computers ) : use small textures if possible. The smaller the texture, the less video memory will be used. The pixel size 256x256 -> 192kb , 512x512 -> 768kb , 1024x1024 ->3mb , each time you go to a higher pixel size, the texture will be more clear, but it will take 4 times more of your video capacity memory. Small textures means a quick download. Try to use 512x512 as a maximum pixel size, a 1024x1024 size is only for large panels, if you add transparancy, this will be 4mb already.

E. Optimalisation of the textures

1. The number of textures in the world : if possible, try to limit the number of textures : there more textures, the more video memory will be used. If you use a lot of large textures of 1024x1024 pixels, some computers will not be capable to process this smoothly, because with every move with your avatar, the computer will need to reprocess these large textures files in the video memory at the same time, and this will cause lag on your computer ,and the framerate will go down. If you want to test this , then try this : go into a world with a lot of objects and fly with your avatar into the sky, and look down and put visibility at 200 (or more).
2. Use small textures and also fewer textures : you can use the same texture upon several models, (instead of using another texture name for each new object).

3. UV-mapping : you have 2 types of textures mapping : the first method is using 1 texture for the whole model. which is easy because you will find all the textures for this model in 1 large image (e.g. 512x512 pixels) . the second method is using smaller textures (e.g. 128x128 pixels) for every seperate part of the model which will be better for the video memory of your computer. Even better is using a seamless texture of 64x64 pixels , and use it multiple times on 1 surface as a pattern.

4. Powers of 2 : an image pixel size which is a multiple of 2 , will usually have a smaller kbyte size too.
5. The shape of the object : If you use UV-mapping and you have a rectangular model , then don't resize the UV-texture of 900x632 into a 512x512 size, then this could affect the texture quality of the model . If you use a square texture upon a rectangular model , then the texture will be stretched out on the dimensions of the model . So make textures which approach the size of the model (and with powers of 2 : e.g. 320x256 pixels -> 320=256+64 )
6. Image optimalisation : in some texturing programs (Photoshop, Fireworks, PaintShopPro) , you can choose "save for web" instead of "save as" : this will reduce the excessive number of colors in the image. You can also choose the quality level of your images when saving them.

More info : using textures in AW

You will find more info and examples about this in AWTimes : http://www.venice3d.net/2013create11.html