6
 
  Improving the framerate
 

Tips and tweaks for a better framerate


When moving around with your avatar in a world, you will notice sometimes that the speed of the computer decreases , and underneath the aw screen, you will notice at the same time that the framerate decreases (="fps" or frames per second) . The lower the framerate, the slower you can move around throughout the world. The ideal would be of course , that there is a high framerate everywhere, and that you don't have problems with "lagging".

In this article we will mention the elements which cause a lower framerate, and the solution for each problem, in order to get a high framerate again. In the left column , we will mention the problem cases, which cause a lower framerate. In the right column, you can read about the solutions ....

PROBLEM SOLUTION
1. The computer , videocard and internet connection of the user :

When using a computer with a high intern memory and a good video card, you will have a higher framerate, because the computer can handle better the 3d environment : each time your avatar moves around, the computer must calculate each time the new scene that appears on your screen : the new objects are loading, but also the existing objects, some of which are moving constantly too. You have also the avatars of the other people moving around, and you can also have avatar-objects with sequence-commands on it , or objects with the move-command or rotate-command . If you have a computer and good video card, this should not be a problem.

Lower the visibility

When using a slower computer, it's better to choose a lower visibility. In the AW menu , you have the option "visibility",where you can choose between "float" or a distance in meters, going from 10 meters till 200 meters. If you have a good computer, you can even change the distance to 500 meters (see "ini tweaks" ).

With the "float" option, the computer will choose the distance automatically, but sometimes this is too much, so it is better to choose a low distance instead. If you have chosen a visibily at 30 meters, then the computer and video card only will have to calculate the objects located at 30 meters from your avatar, this can make a lot of difference !

 

2. Minimum visibility ( world option ) :

The world owner can choose the minimum visibility for his/her world. Sometimes the world is more beautiful with a wider view, and sometimes the world owner announces the best view distance. And you will see that you can't put the visibility in this world lower than 60 meters or 100 meters

 

 

Lower the minimum visibility

As a world owner, if the visitors complain about the low framerate in your world, you can change the minimum visibility for them to e.g 30 or 50 meters (instead of e.g. 60 meters or 100 meters)

 

 

3. Fly and look down with a high visibility

If you set visibility to 200meters (or higher) and you fly with your avatar into the sky, and start to look down to the world, then it can happen that the framerate is almost zero , and that you won't be able to move around with your avatar.

 

Avoid to fly and look down with a high visibility

If you do this, you will see the whole world (if it's a p10 or p20 size world) with perhaps thousands of objects . If the video card of your computer sees all those objects and you want to move your avatar, then the computer and videocard needs to recalculate the position of those thousands of objects....

 

4. The number of objects per cell :

The more objects per cell, the lower the framerate will be. The best is to have a world without objects, but that is not the purpose, lol.

When you fly smoothly around in a world , sometimes it might happen that there are areas in which you can't fly around because of the high amount of objects in the area.

 

 

 

Spreading of the objects per cell :

ff you put a lot of buildings together on a small spot in your world, then you will notice that the framerate is very low on that spot of the world. A solution would be is to build some of these buildings on another spot of the world, where few objects have been built, and where the framerate is still very high.

Building on a different height :

You can build up to 1000m hight or 1000m low, you will notice that on 200m height, the framerate will be high, even if you have built a lot of objects on these cells on ground level, because the objects on ground level are not in the "visibility reach" of your computer.

 

5. Cell data limit (world option)

Some world owners have a building world, in which all visitors can have a lot to build something . Some visitors however will put the maximum number of objects per cell as possible for their builds, which is 128 objects per cell. In those areas there can be lag...

 

Change the cell data limit

If you have a building world, you can change the cell data limit , and choose MEGA instead of ULTRA, so that the maximum number of objects per cell will be restricted, so that you don't have such a low framerate.

 

 

 

6. Object choice :

Not only the number of objects, but also the model itself can cause lag . Every model has been created with a modeling program , in which polygons are used to create them. Some models , such as walls don't have a lot of polygons. But there are complicated models too, which can have several thousands of polygons, which is often too much for a 3d environment , and the computer will have to calculate all these polygons when moving around with your avatar.

Sometimes statues and organic objects can be high polygon, if those models have been modeled with a "nurb"-modelling program. Some models with wheels or curved lines can be high polygon, because when modeling you can choose to use 320 lines to make a circle, but you can also make a circle with 16 or 20 lines.

Large objects : Some large objects e.g. palaces are often made with lots of polygons, and they don't load often if you approach those models with your avatar at a certain distance

 

Make and use low polygon models:

If you make your models yourself, then try to make the model with a minimum of polygons,by following some basic building rules : e.g. by not modeling the things that you don't see and by using pictures or masks instead of really making the model in 3d with extra polygons.

But in most cases, the models are already in the object path of the world : standard models or downloads of freeware or payware models , and mostly we don't know if the models are low polygon or not , even simple looking objects can be high polygon. You can open the model on your computer with a modelling program and view the number of polygons, but this takes too much time to do this for all the objects, so there is a better solution :

Wireframe view of the world

To view the world in wireframe : go to the menu and choose : Options - Setting - Graphics - Wireframe rendering (activate this) and click Ok.

In the example below , you can see a picture of AWReunion world in wireframe , and you see that the smaller plants and the balloons have more polygons than the big palm trees. These low-polygon palm trees are very good models.

 
6a. High polygon models

Using a lot of high polygon models can cause a low framerate

 

 

 

Limit the high polygon models :

if you have 4 identical high-polygon models in a room, try to consider if the room is also nice with 2 of those models.

Consider the importance of the model

if the high polygon model is a point of attraction in the room, then you can keep it, if the model is only an unimportant detail, then consider to replace it by a low polygon model.

6b. Low polygon models

It is easy to tell "use low polygons" models, so which one are they ? Don't look for the complicated objects, these will only be used as a point of attraction in your 3d scene, so we must look for simple objects...

 

 

Use primitives & the standard objects

If you start with modeling then you will know about primitive objects : a cube, a sphere, a pyramid,...etc. and also a square. A square consists of 2 triangle-shaped polygons. When you calculate : a cube (or a wall) consists normally of 12 polygons. Use the standard objects of the objectpath : you will find a lot of square objects (e.g. pictwll , landa, walk001,flat010...) and walls, roofs, etc. which have already the correct dimensions ( 2, 5 , 10 meters ,..). You can find these objects in the worlds megapath and uberpath.

Using masks

By using masks you can choose a simple flat square object with .png-file -texture , or with a texture which you can mask with a bmp file. (See this example used in the world Yellow: )

model : flat1a_g.rwx
action : create texture ap_gears5.png, rotate 10
Use sprites if you can

Sprites are considered as rather ugly : they are mostly masks or .png files, which are orientated towards the avatar, when you walk besides a sprite or fly above it, you will see that is not a real 3d model. Sprites were used abundantly during the first years of activeworlds, and are a bit old-fashioned too now. But in spite of that, they are still useful , in order to have a lower fps : they are square or rectangle and have only 2 polygons. You can use those sprites in corners where you don't have to walk around the sprite, just for decoration or ornamental purposes, where the 3d-view is less important.

7. Composition of your build or your scene

It is possible to make a very nice house with lots of details, and make interiors with with all objects you can imagine , but without any doubt, this will cause a lower framerate. Although you think you have done a nice job, there is still ways to do it better and build the same house and have a higher framerate, just by applying some "intelligent" building skills.

 

 

 

 

 

 

 

Avoid duplicate objects

Avoid duplicate or superfluous objects. It is better to use 1 wall object, instead of 10 small objects, to obtain the same wall.

Modelling as 1 object

Sometimes it is interesting to make 1 object, for which you need 30 objects now. (for world owners which use their own object path). Or you search for existing better objects in the object path.

Don't build objects that you don't see

In fact this is the same rule you have when you are making models. Of course you can use the visible off command on certain objects, but we are talking about superfluous objects e.g. building a tiled floor under a wall-to-wall carpet, or putting food objects into a refrigerator that you can't open, or making a basket of fruit objects , of which you only see the upper layer in the basket

Object Groups:

You can also make "object groups", the object that you group into 1 model will have the .awg extension , which you can put into the "groups" map of your object path. (for world owners).

7a. Interiors and objects inside buildings :

A special case concerning the composition of your build, are objects that have been built inside a building. All objects within the visibility radius of the avatar will be loaded, this means also all those objects will be loaded and calculated which are inside the building (maybe hundreds of objects) , even if the visitor does not enter the building .

 

read more about this on the wiki pages :

http://wiki.activeworlds.com/index.php?title=Visible

 

 

 

 

 

Use the radius command

With the radius command, you can make visible the objects only at visibility of 30 meters or less. If the avatar is more than 30 meters away, it will be invisible. By putting visibility radius' on objects inside buildings, your computer will not render them if you are outside the building

create visible no radius=30

Use the visible off command

First you can make objects invisible with the name command :

create name interior, visible off

Then you put the activate or the bump command on the door of the building and the objects inside the building will be visible :

bump visible interior on

Better is to use door buttons : a button to enter the building , and a button to leave the building, then the objects will not render when leaving the building:

activate visible interior on / bump visible interior off

8. Texture choice :

Not only the choice of your models but also the choice of textures and pictures is important. Each time you double the size of your picture, this means an increase of 4 times on your video card.

Use textures with the powers of "2"

It is not the kb-size of the texture of picture that counts, but it's the pixel size.And this pixel size should be a duplicate of 2 : 2x2 4x4 ....64x64 128x128 256x256 pixels, etc... or a combination of those numbers : eg. 64x128 192x192 192x256 ( 128+64 makes 192). This is because the computer likes those numbers for calculation. This is why nearly almost all textures of the standard object path have these sizes. It is better than using irregular pixels sizes such as 367x239 pixels.

Avoid too many large textures

Each time you double the size of your picture, this means an increase of 4 times on your video card : better use 256x256 pixels instead of 512x512 or 1024x1024 pixels.

Repeated use of the same textures

if you make models yourself, then try to use the same textures on different kinds of models, then those textures only need to be loaded 1 time in your world instead of lots of different kinds of textures.

 

Intelligent texturing

Make textures which can replace extra modelling , make a texture with perspectives in it, just giving the impression that you are looking at a 3d object.You can compare this with a "trompe l'oeil" in art. (See this texture example used in the world Yellow).

Masks can also replace a lot of models and modelling work.

Another example is making in advance a texture that has already lights and shadows in it, instead of having to build objects that give the correct lightening or shadow on that texture.

 

9. Using text upon signs

If you use a lot of sign objects with a high amount of text on each sign, then you will have a lower framerate, because all this text needs to be rendered too.

10. Text in the action command

The same thing can be said about the text in the action field or in the description field of the objects. For objects , you might need to type long action commands in order to have a nice result. We won't talk now about all triggers and commands, but we must conclude that all this long texts also cause a lower framerate, just like it is for text on sign objects. Just because the computer needs to recalculate these commands as well each time when you move with your avatar , e.g for a create texture-command, the computer need to recalculate each time the texture by using this command.

 

Make a webpage

If you want to use a large amount of text, then create you own webpage and put a link in the action command to that website, instead of showing all those texts on sign objects. Then you use here the "create url" -command).

Use the name command

For some commands that return repeatedly in your build or in your world, you can use the name command for it. For instance a building with the same texture on a lot of walls , you can type "create name a", instead of typing the each time a longer texture command for it. This method is used by a lot of advanced builders in Activeworlds. The disadvantage however is that is it more difficult to see what is the real action command for this object, as you see only the name command in the action field, the real action command with that name is only on 1 object, and is applied on all objects using that name.

11. Gif-animations

In activeworlds you can use files with the .gif-extension. Usually gif-files are animated pictures with demand a lot of energy of your computer, instead of using an ordinary object. We talk about flashing lights , dancing animations moving on a picture etc.

 

Avoid too many gif-animations

A few gif animations won't affect that much the framerate, only a large number of gif animations will cause lagging. If necessary, you can replace by an alternative (e.g. 1 particle emitter replacing lots of gif animations, or light commands, astart-adone command,...).

 

 

12 .Mirrors :

As soon as you use several mirrors with the create envi-command, you will notice that the framerate will be a lot lower. Although , since the introduction of mirrors in activeworlds, there have been program release upgrades in order to reduce the impact of mirrors on the framerate.

The problem with mirrors is of course that the computer needs to calculate also the objects which are reflected in the mirror itself.

 

 

 

Limit the number of mirrors

Try to use only a small number of mirrors , and not use them if they aren't necessary.

Use the activate command

If your avatar needs to enter a building with several mirrors in it, you can use an activate-mirror-command for those mirrors , when clicking upon the door of the room where the mirrors are located , and you put a second activate command to desactivate the mirrors when you click upon the door to leave the building. Or ...you can put the activate command on the mirror itself : the envi-command will only be activated when you click upon the mirror.

 

13 .Particle emitters :

 

In most of the cases, particle emitters won't affect the framerate rapidly, unless you have an excess of it.

************************************

 

*********************************

**********************************

14. Webcap navigation

 

Webcap navigation is a useful command, in which you can navigate on a website and show this to another visitor (if you add "global" in the command). With webcap navigation you can give a nice demo about something.

One disadvantage however of webcap navigation , is that the website must be adapted to webcap navigation , because you can't scroll down on a webcap navigation webpage.

Another disadvantage is the the framerate is a lot lower when you start navigating upon a webcap screen.

Webcap navigation is a great command , but there are some alternatives .

The url-command

You can use the activate url-command or type the url-link in the chat window, but then you only give a weblink, on you can't really give a demo.

The laserpen -tool

By pressing "crtrl" +click you will have a red laserpen in your 3d world. If you want to give a demo about something, then just move your laserpen upon a picture-sign (or several pictures), and you can start to talk about it

Presentation-tool

In the AW-menu you can choose : Tools- Prepare presentation. This tool will show a part of your computer screen as an online hudscreen in your 3d world. But it is also possibile to show your computer screen online on a picture object ,and you can start to give a demo this way.

15.the scale - command

The create scale-command is a great command : every wall or roof that doesn't fit can be scaled....

But you must know that the computer has to calculate twice : the first time to load the object into your world with the original dimensions, and a second time to get the object into the scaled dimensions.

Re-modeling the object

Using the scale command is a great command, but if you have an object that you use a lot in your world and you need to scale each time into the same new dimension, then you can consider to change the size of the model by using a modelling program (accutrans, truespace, wings3d, ...etc).

Then you computer won't need to calcute twice the object dimensions and you won't need to type the create scale command in the action commands of those objects.

16. rendering avatars

 

 

Reduce the number of avatars that need to be rendered

The presence of a lot of other visitors in the area of your avatar will also reduce the framerate, especially if there are a lot of visitors . But you have the possibility to render only a limited number of avatars...

Go to the menu and choose : Options - Settings - Chat and there you change the number of avatars that need to be rendered.

If you change the view of the world into wireframe with visitors in it, then you will also see their avatars in wireframe, but you need to know that these are no ordinary avatars, they move constantly , you can contact them , they have chat balloons, etc. And if you have a 'slow' computer being in a world with lots of avatars , it's better to render only the nearest avatars.

 

 

 

 

17. general performance

Modify the standard performance settings

When downloading the activeworlds program, there are some standard settings in order to have a good performance in the 3d environment, standard settings for standard computers.

If you have slow or advanced computer, you can modiy those settings. Go to the menu and choose : Options - Settings - Performance

The aw program will try to keep at 25 fps, but you can change that if you have a better or slower computer.

There is a minimum visibily of 60 meters for all worlds, in spite of the fact that the minimum visibility is different in every world. By choosing 30 meters, it will be possibile to have 30m visibility in all worlds in which the world settings have a minimum visibility at 30m.

Avatars animations and avatar types can be desactivated.

Also material effects, mirrors, transparancy and avatar shadows can be desactivated.

And you can choose for a lower quality (but let this be the last option)..

 

 

 

18. reflections (world option)

With reflections you can make your world or your builds more realistic, but at the same time the computer must calculate each time the reflections for those objects ,and in some cases the framerate can go down a lot.

Choose only some water reflection world options

Since the introduction of the new water texture in version 6.0 , the world owners can also choose for reflection in the water of the sky, clouds, terrain and ground, which is a great improvement in addition to the new water texture.

You can also reflect all the objects in the world, but then the framerate will be a lot lower, the effect is nice but perhaps you can use alternatives. So consider if it is necessary to reflect all objects in the water, knowing that the framerate will be lower for all visitor in the world.

Use reflection textures instead

In order to make the reflection of buildings in the water : just rotate the object upside down, and if necessary, make also a reflection image of the texture. Just like this example in the world Venice-Venezia.

 

19. shadows

Shadows are a bit similar to reflections, and give also an more realistic look.

 

Apply shadows only if necessary

In the Performance settings you can disable shadows for avatars, but you still can use shadows for objects. The result of using shadows isn't always excellent, sometimes there is barely any difference between using the shadow command or not using it. Just use is if it's really worth it, and consider using it with knowing that the framerate will be a bit lower.

Use shadow textures instead

In some worlds there are already shadow textures for trees, and for those shadows you can also add a transparancy for a strong or weak shadow.

In fact you can not only do this for trees, but you make appropriate shadow textures for all textures in the world. In this case however, the sun will always be in the same position, as the shadow has become a static part as a part of the model itself.

In the picture example (in the world AWReunion), the tree shadow is made with a terrain texture.

Read also :

- AW newsletter (mar. 2006) : http://activeworlds.com/newsletter/0306/030607.html
- Yellow Gazette (sep. 2010) : http://www.pbwhite.id.au/yellowg/archives/sept-2010/buildtips.html
- Yellow Gazette (oct. 2010) : http://www.pbwhite.id.au/yellowg/archives/oct-2010/buildtips.html