Forums


Tips for better world building

General discussions related to content creation

Tips for better world building

Postby Ozwell Wayfarer » Fri Mar 04, 2016 6:19 pm

Opensim has some particular quirks that sometimes make it hard to build responsive environments. More controlled environments such as games or pre-designed experiences have ways of mitigating these issues that are not available to us.

That said, there are ways of building and ways of thinking about sim design that will help you deliver a more responsive experience.

This post is aimed at people who want their regions to be visited and care about the user experience in terms of performance. This is for people who want a world in which they can use VR goggles and not end up getting motion sick from lag. They are good tips for anyone to follow but if your a hobbyist/casual users its probably of less interest.

1. Build small
I know in Opensim its really really tempting to go for the biggest amount of land you can get, then proceed to cram it with as much stuff as you can find. if this is your private space and you have a great computer and/or you dont care about framerates and load times then fine. But if you are expecting visitors, this is a BAD move.

The larger the space you have, the more sparse it needs to be. This is because issues like LOD, LOS and Overdraw (which you will read more about below) conspire against you in larger environments. In a game situation for example, objects that are on your screen are pre-loaded and rendered and anything not on your screen (LOS) is "culled" essentially meaning it does not get rendered and will not place burden on your CPU. Not so in Opensim.

You can easily test this in any moderately full sim with Firestorms phototools. Bring up the FPS monitor and cam to the corner of the sim. You will notice your framerate jump and your camera will become more responsive. Now slowly cam from the outer corner to the center of the sim. You will notice the FPS reading gets lower as you move from outer to center. If you do this in a 1x1 sim, the effect is barely noticeable, but try it in a dense 2x2 or 3x3 and I am SURE you will see what I am talking about.

I want to stress that this is normal behavior. Something isnt "wrong". Its just something to consider. Every object that you rez has a rendering cost, no matter how well it is designed. Rez a lot of objects in a single area and your CPU struggles. Designers (like myself) can only help the situation so far by designing low poly and trying to make effective LOD models (but this can be a crapshoot, more below). The rest is down to the sim designer and how they choose to use objects.

Therefore if you want to build a "dense" environment such as a city or large forest I STRONGLY recommend using nothing bigger than 2x2 (4 regions).

If your going for high detail/density, its much better to build a series of smaller worlds rather than try to cram it all into one big worldspace. So really consider before you start your project "do I NEED all this space to convey my idea?".

2. Dense on the outside, sparse on the inside
If you MUST build in a larger area than 2x2, consider building the densest parts of the build on the outer sims and trying to leave the center fairly sparse. This way, when users are looking towards the center of the world, there CPU will not be suddenly hit by looking at 3-4 regions of dense geometry all at once.

3. Think LOD, think LOS
LOD - Level Of Detail. If you are a designer and in control of this, you can greatly reduce the burden on users computers by designing effective LOD. The problem with LOD as I eluded to above is that it is often very context specific. Items need a different LOD if they will be placed inside or outside for example. If placed outside the object will need multiple, fairly accurate models, as they will possibly be viewed from far away. An object inside probably only needs 1 LOD stage and can then be culled completely after that, as they will never be seen by anyone not directly in the house/castle/whatever.

LOD is also effected by scale. So somewhere between distance and scale is your sweet spot.

LOS - Line Of Sight. Related to point 2. Say you are building a roleplay sim with a large settlement or town as the centerpiece. its more beneficial to build this settlement to one of the far corners or sides of the sim/world rather than the center.

For example: you have a 3x3 region and build in the center. Now, no matter which direction the user looks, there is a sim extra to render in every direction on top of whatever is in the sim your actually standing in. Those sims are not very far away, and so probably at the Med/Low LOD stages. Also conversely, if your user is in ANY other sim, they have to render the entire settlement too!

Build in the corner then you have empty space/water to one side, 3 sims at Med/Low LOD stage on the other side and the rest of the sims so far away most objects should be culled or at the lowest LOD stage. This will result in improved framerates both inside and outside your "built up" area.

4. Be aware of Overdraw
Overdraw is a thing which happens when too many alpha textures are present on screen and your computer cant decide which is the correct order to display them. So it displays all of them at once. You may have looked at a tree or plant and noticed a strange effect where you can see the leaves both in front and behind at the same time and the object seems in a weird semi-solid semi-transparent state. Happens with grass all. the. time. Thats overdraw. It hurts your brain to look at it and it hurts your CPUs brain too! If you build big areas full of plants, I can almost promise you this is why you experience lag.

Alpha textures are most often found on plants and trees. Most plants and trees use "alpha blending" which causes overdraw. But we now have the option of changing that. Select the face of the plant in the build menu, go to the textures tab and select "Alpha Masking". Then type a number between 1 and 200 into the box below.

Alpha Blending allows pixels to have both transparency and colour. Alpha masking does not allow this. Pixes must be transparent OR coloured. The number you just entered above is the threshold ratio. The higher the number, the more pixels are moved from "colour" over to "transparent" or vica versa. This saves your computer from having to calculate this aspect and eliminates overdraw. Leading to significant performance benefits for most users. The downside is it makes lighting look harsher and as Opensim has pretty crappy shaders it can make some things look ugly.

5. Stay away from sculpties
I know, I know. I sell mesh so I would say that right? ;) But its pretty hard to defend sculpties these days. You can nearly always do it better with mesh both in terms of beauty and efficiency. If your still working with sculptie tools do yourself and your users a favor and stop it right now and learn Blender. It isnt that hard, if you can "get" sculpties, you can "get" mesh. and there are plenty of resources for education out there these days. Sculpties are fine for hobbyists but if your making a world designed to be visited then leave the sculpties at home!

6. Recyle
ALWAYS reuse objects and textures wherever you can. The Kitely Evergreen Island is a good example of this. Break that whole island down and I would guestimate (I didnt keep exact count) no more than a few dozen meshes and textures were used to create it. Whatever the number it is LOW. Thats why it loads fast and responds well.

7. Texture Size
Just as the best meshes use the fewest number of polygons possible, the best builds and objects also use the smallest texture size to get the job done. Its easy when designing to be tempted into making every texture surface super crisp and high definition. When your working on even a small object, its easy to get lost in the detail. But texture size has a bigger effect on load times and lag than mesh complexity (I have no figures for that, but Ilan told me this was the case and I believe him :) ).

It is also a bad trend set in Second Life (both users and designers are equally to blame here). People should understand that higher texture quality comes at a significant cost. People have developed bad habits of expecting textures to be super crisp at every zoom level. Which is ridiculous. If you spend all day with your cam zoomed into tiny details and grumbling that the textures dont stay sharp, sorry to tell you but you have problems and should probably get outside more. Just dont put your face too close to anything ;) you may be disappointed with the resolution.

Ideally, only textures that cover large areas (such as terrain or brick/stonework on buildings) should have 1024x1024 textures. Everything smaller can usually be done with 512x512 or smaller. In the process of designing anything, you should always ask yourself if the textures could be smaller.

I hope that was a helpful rant and I have given you some ideas for improving your sims. Happy building! :)
Last edited by Ozwell Wayfarer on Fri Sep 23, 2016 12:38 am, edited 3 times in total.
User avatar
Ozwell Wayfarer
 
Posts: 544
Joined: Thu Jan 10, 2013 10:32 am
Has liked: 790 times
Been liked: 835 times

Re: Tips for better world building

Postby Brayla Sana » Thu Sep 08, 2016 7:15 pm

Thank you for the excellent post - the one I flunk on is world size!

I would like to add to this:

physics models. For most home objects (chairs, dishes, lamps, bottles, etc) a CUBE is all the physics you need. (I used to use planes in SL, but for some reason, cubes work better in Opensim). having simple physics models for your uploads reduces the amount of time required for your world to start and reduces CPU load inworld. Note: If you are uploading something with multiple meshes, you can use a mesh of multiple default boxes greater than or equal to the number of meshes in your build. E.G. if my dresser has one cabinet, 2 doors and 3 drawers, I need a physics mesh of 6 boxes or more. THE BOXES DO NOT NEED TO BE IN THE SAME POSITION AS THE MESH. If your physics mesh has more boxes than you need, they are simply discarded. I reuse the same box files over and over. Clothing Makers: Use boxes for your physics mesh. Then when you rez your creations inworld, (either to modify them or as displays) they use less CPU. For objects with holes, etc, I create a simple physics mesh. Just make sure the rotation of your physics mesh and your object are the same in your editing software before importing them (e.g. apply rotations on both before export). As with the cubes, polygon volumes (that wrap around the object) work better in Opensim for physics than planes do. I really do not know why, I just learned that by trial and error.

Default Blank and Transparent Textures: I often use blank textures on glowing things, and I often use a transparent texture in scripted objects to make things disappear and reappear. The default white and transparent textures are wayyy too large. When I need a blank or transparent texture, I use my own - which are tiny 8x8 tga's. The default transparent texture is 32x32, and the default blank is a whopping 512x512! This is also great for making products to export - as Kitely will export your texture instead of the default - making your build efficient on all worlds.

A side note, I wish SL and opensim were designed to use DDS textures, which get smaller in smaller LOD's, but this is not the case.
Dadiella's for Fashion and Brayla Sana Gallery for Building!
User avatar
Brayla Sana
 
Posts: 37
Joined: Wed Mar 27, 2013 7:09 pm
Has liked: 12 times
Been liked: 44 times

Re: Tips for better world building

Postby Ozwell Wayfarer » Mon Sep 12, 2016 10:57 am

Thats a good point Brayla. I do cover that as part of my mesh uploading guide. I would go even further and set my lowest LOD stage to zero, then take that as the physics model. Usually its just a single tri. For things that dont need to be bumped into (such as clothes) this is even better than the box solution. A box is 12 tris. Multiply that by 5000 objects and you get 60,000 unnecessary tris.

If you want to still use the lower LOD stage, you can set the physics model first, then go back and add your last LOD stage.

More info on uploading mesh can be found in my mesh uploading guide here: https://www.kitely.com/forums/viewtopic.php?f=25&t=3199

Agree on the DDS textures. Theres a whole bunch of back-end optimization that could drastically improve Opensim performance in regard to textures and LOD.
User avatar
Ozwell Wayfarer
 
Posts: 544
Joined: Thu Jan 10, 2013 10:32 am
Has liked: 790 times
Been liked: 835 times

Re: Tips for better world building

Postby Tess Juel » Thu Sep 29, 2016 8:44 am

Some really good advice here, this post should be mandatory reading for everybody who create mesh for the hypergrid or for SL!

One comment though:

Ozwell Wayfarer wrote:5. Stay away from sculpties


That is true 99.99 percent fo the time but there are some very rare exceptions.

A sculpt is essentially a simplified form of mesh. It has 24 bit vertice addressing while a regular mesh has at least 160 (possibly more, haven't checked) including the UV mapping. Also, quite a lot of the other data required for a mesh are hardwired presets in sculpts. So in theory a sculpt should be an ultra-efficient form of mesh.

Usually it isn't though, for several reasons:
  • General poor implementation: Let's face it, the whole thing is a crude hack
  • Fixed number of vertices: A sculpt has 1024 vertices, nothing more and nothing less. How often do we need that?
  • Oversampling: A sculpt map is encoded as a graphics image. That is fine in itself but it should really only need a 1024 pixel image. However, since it's a crude hack, it needs four times as many to work properly. And to make matters worse, many sculpt generators (Tatara is perhaps the worst example) use even higher ratio of oversampling, adding lots of superfluous data to the map.
  • Poor simplification algorithm for LoD models: You often have to waste vertices just to strenghten crucial points or - even worse - force the user to increase the RenderVolumLODFactor of their viewer.
  • Inflexible UV mapping: Often requiring laggy custom textures where a mesh would have worked with standard repeating tesxtures.
  • Hardwired smooth normals: Doubling of vertices required to get sharp edges.
  • Fixed grid layout: 4x256, 8x128, 16x64 or 32x32 vertices - those are the options you have.

That's a long list of flaws and limitations but even so, if you can actually make good use of at least half of the vertices, if you don't use more oversampling than necessary and if you can find good ways aroudn the LoD, texture and normal issues, a sculpt can still be a more efficient alternative to a mesh. It doesn't happen often but it does happen.
Tess Juel
 
Posts: 1
Joined: Sun Sep 11, 2016 4:24 pm
Has liked: 0 time
Been liked: 0 time


Return to General Content Creation

Who is online

Users browsing this forum: No registered users and 2 guests

cron