Does Size Matter?

How to find content for Real-Time Environments



There is a lot available out there on the Internet and it can be tempting to randomly grab everything we see and use it in a real-time environment like Active Worlds. But is it smart? If the limits are high for the environment, is size an issue at all? We're going to tackle two things that play the biggest part in virtual environments: 3D models and textures. First off though, what exactly is "real-time"?



If you look up "real-time" in the dictionary, you'll see two definitions. 1) "Time in which the occurrence of an event and the recording of it are almost simultaneous." This is the one we're used to. You build something in the world and everyone around you is going to see it right away. Event happens instantaneously and is recorded so everyone else sees it too. But here's a second definition: 2) "The actual time used by a computer to digest information that is immediately used by another process running at the same time." That gives "real-time" a new dimension. It's not just about seeing what someone else does in a virtual environment but also how long it takes your computer to be able to load all the information necessary for you to be in that environment. Sure, the capabilities and memory of computers have increased greatly since the days when Active Worlds was newborn in 1995, but the patience of most users has not increased, in fact, it has probably decreased. With that in mind, it's still important to think about the size of the objects and textures you are using when you build in a real-time environment, because anyone that visits is going to have to download all of it.



There are three areas you can optimize to make visits to your real-time builds a positive experience. A. Downloading from server: This is the time taken to download the geometry and texture files from the server

B. Loading files to memory: Time taken to unzip or uncompress files and load them into memory for it to be rendered and viewed by the environment

C. Rendering the scene: Average time taken for the real-time environment (Active Worlds) to render everything you've downloaded from the server. This affects the smoothness of movement inside the environment So let's see how these three areas come into play when it comes to using textures and models. We'll look at textures first.



Textures

Most textures you obtain, whether you find them on the Internet or the ones that come provided with a 3D model, will not be ready for use as they are. Textures you find on the Internet probably had a very different reason for being posted than what you intend to use them for. Textures that come with models may be huge in size to allow you, the buyer, to customize them according to your own needs. Both will probably require resizing before you can use them in your builds. Here are some pointers to keep in mind when determining how to size your textures.



First point: Powers of 2. Can't stress this one enough. What are powers of 2? This: The numbers in dark blue are the powers of two we speak of. You make the pixel size of your textures to these numbers and you speak a computer's language. Think of it this way: If you've ever gone to Walt Disney World or any amusement park, you know that the lines for some of the more popular rides will have a half an hour to several hour wait, especially in the summer. Some amusement parks grant special passes, stamps, or bracelets that basically let you bypass that long line. Using powers of 2 when you resize your textures is like giving them this special "Gold Pass". Textures with those sizes don't have to wait in the long line to be resized by your computer, they just go right in. This was the rule I learned the hard way early on in my career here at Active Worlds. I had not been using this rule and many people were complaining about the download times and lag in the new AWGate of 2001. I was given the task of resizing all the Gate textures, plus all the 3D Homepage object path textures, to powers of 2 so that I'd get the idea of just how important it was. Needless to say, I was still learning this one for the next few years after that. So never give up using this one. Learn to speak your computer's language: powers of 2.



Second point: How much of your screen will the end result actually occupy? Small items like flowers, dishes, lamps, watches, shelf items, food, etc, will probably take up fewer than 128 pixels on your screen once you are in the environment, so don't waste a large texture on something that small. Large items like trees, cars, billboards, walls of buildings will all need larger textures, but see how small you can keep them. You might be surprised at how far a 256 x 256 can go. Text and words on a texture might require that you go a little higher in texture pixel size if it's important that it can be read. Use 1024 x 1024 pixel size for any texture only when absolutely necessary. These textures will eat up memory quickly.



Third point: Another point that goes hand-in-hand with the second point is "What role will that texture play in the environment?". Will it be an important piece or will it be part of the ambience and background? For example, in a library build you might have several books laid out on a table but you want people to focus on one book in particular, an important one. So the texture on that important book might be a little larger to make it crisp and distinct, whereas the less important "background" books might get 128 or less. They are the same size book objects, but they have different roles to play in the build so different sizes for textures are in order. And remember, blurry or indistinct textures on "background" items is not always a bad result in virtual reality. Most people will not be looking at everything closely in a scene. Only the important pieces will need more distinct (and therefore larger) textures.



Fourth point: Always try to keep texture sizes as small as possible. Why? Remember that amusement park line you didn't have to wait in because of the "Gold Pass"?. What happens if you give a bunch of kids "Gold Passes" vs. giving it to a bunch of adults? Kids run to the ride while the adults laugh and follow more slowly. Same with your textures. The smaller they are, the faster they zoom in. Now what is meant by "small texture sizes"? 1. Saving textures in Photoshop (or PaintShopPro) with "Save for Web" creates smaller file sizes, which speed up download times. 2. Using smaller pixel sizes (128 and below) means smaller file size taken up in memory. Remember, jpgs are compressed files, like a zipped model, so they speed the download process. But once that texture gets to memory it becomes uncompressed. The pixel size determines this uncompressed size. 256 x 256 = 192kb, 512 x 512 = 768kb, and 1024 x 1024 = a whopping 3MB. So even if you reduce the quality on your 1024 x 1024 to zero and it gets saved to a file size of 71kb, this is only the initial download size. Uncompressed in memory on the computer it will be 3MB, no matter what. So smaller pixel sizes not only reduce download times but they also reduce the time it takes to write to memory and render and it helps prevent "drag" when your computer runs out of memory and has to start swapping resources in and out. Visualization of Texture Sizes

http://host.activeworlds.com/stacee/pictures/pic_class_textures.jpg



A final word on textures. Use as few textures as possible in your scene, and reuse the ones you have as often as possible. This will also help minimize the possibility of computers running out of video memory. Nothing ruins enjoyment faster than the "drag" caused by a computer trying to keep up with too much demand. Make it easy on your visitors. Keep textures as small as possible and you'll make the "real-time" it takes for visitors to download and render your build brief and sweet.



Models

Beware of models marked "low-poly". A lot of 3D models marked like this may have fewer polygons than their "high-definition" cousins, but they still may not be suitable for real-time environments. Look instead for tags such as "game 3D models" or "real-time environment 3D models" when doing searches.



A low-poly model is a model in which all efforts have been made during the modeling process to use the minimum number of polygons, which in the end will let you render at the fastest pace in a real-time environment. While it's difficult to give actual polygon counts for what is acceptable in any given object, there are some things you can look for when selecting objects. Guideline 1: If you don't see it, it shouldn't be modeled. That means that the artist has taken pains to get rid of any polygons that won't be seen. Polygons that are covered by other pieces of the object or faces that are on the back or bottom are examples of this kind of work. If the artist hasn't done this, chances are he hasn't done some of the other steps that follow. Guideline 2: The model accomplishes details with textures rather than modeling them with polygons. This could be using a mask to replace actual geometry (like trees or railings) or using a texture to show features that would require too many polygons (like the numbers on a clock face). Caution: While masks are very helpful in replicating something that would require a lot of polygons, if masked textures are used in conjunction with a high number of polygons, the two together can cause noticeable lag as both tax rendering processes. Guideline 3: Curved surfaces should be moderately smooth. If the model uses high numbers of polygons to round a surface then it isn't for real-time. Expect to see slight jaggedness, in fact, look for that quality in 3D models for real-time. Guideline 4: The model should not have unnecessary subsections on flat surfaces. The only time subsections come into play is if proper prelighting is needed on the object, otherwise, they are a complete waste of polygons. And if NURBS was used to create an object, it isn't for real-time. Avoid these. Subdivision does not do anything useful here

http://host.activeworlds.com/stacee/pictures/pic_class_sub.jpg Guideline 5: What kind of polygon count (preferably in triangles) does an object have. While hard and fast numbers are difficult to give, if you are looking at over 10,000 polygons for anything but a building you are probably looking at too much. Small items like cups, toys, guns, or food should not even be close to 1,000 polygons. At most, a few hundred. If you find them below 100 polygons you've found a goldmine. Gobble those items up. Furniture depends on the complexity, but anything between 500 to 3,000 is usually good. Obviously a kitchen table will need fewer polygons than a baby grand piano. If you are having trouble deciding if an object is too many polygons, try envisioning how often you think this object will be used and how important it will be. If it is in the background or used often, you want something that is very low-poly. Save those extra polygons for objects that will be the focal point of your scene. An example would be a christmas pine tree. Those who visit your build might not notice the teacups and napkin sets you have out but you can be sure they'll notice the tree. Remember, the fewer polygons in a scene to render, the better.



Also keep in mind how many people will be viewing your environment at one time. Why is this important? Avatars are polygons. The more people (avatars) that are in an area at one time, the more polygons just got added to your environment. This becomes incredibly important for large events where 30+ people will be. If we estimate each avatar is 2,000 polygons, 30 avatars will be 60,000 polygons....and that's without the scene. For those hosting very large events (100+ avatars), having as few polygons as possible in the objects you use in your scene becomes a necessity.



For those managing an object path in a public building world, you also have the burden of watching carefully what you put in the path. You will not have control over how an object is used by the public, and the public, for the most part, will not be conscious of how high-poly something is. Therefore, try to be prudent when searching for objects to use in your path. If it's an object that is going to get a lot of use, the lower-polygon it is, the better. Take into consideration a worst case scenario. If this object was used 20 times in a small area, will it cause a burden? If so, it's probably not a good item for use in a public build world. Try to find something with fewer polygons.



Examples of Automobiles Weighed Against Guidelines



Poor Example

http://host.activeworlds.com/stacee/pictures/pic_class_car1.jpg



Better Example

http://host.activeworlds.com/stacee/pictures/pic_class_car2.jpg



Best Example

http://host.activeworlds.com/stacee/pictures/pic_class_car3.jpg



In Conclusion

It might all seem overwhelming at first, but try using one or two points at a time. Every piece you learn guides you to becoming a better builder. Using these tips when selecting textures and models to use in any real-time environment (including Active Worlds) will make the experience for those who visit your builds a smooth and easy one.



For more 3D displays used in the original presentation of this material, visit AWSchool 81.52S 165.18W 0.01a 269 in Active Worlds.

