Sunday, July 26, 2015

Rendering Lag (Homeshow reply)

Mary the Prophetess asked on the Homeshow forums:
Greetings all.
As I understand it, rendering lag is a function of the distance an object is from the zone in location. Is this true for both the horizontal and vertical axis?
Also, do the number of objects placed affect rendering or just the distance from the zone in? If I were to place, (hypothetically), 1200 floor tiles in stacks around the zone in, would it have any effect on the rendering speed, or is the rendering speed strictly a function of distance from the zone in. and not of number of items?
If building in the breakout area of a huge zone, such as the Hua Mein Retreat, what can be done to reduce rendering times?
Is player lag inside a house, (moving, etc), a function strictly of the item count. or does the distance from zone in *also* increase the lag a player may experience?
I tend to push the limits on my houses to the max, and any suggestions on ways to reduce rendering times and player lag without impacting item count are very important to me. I also worry about the stability of massive homes and crashes that visitors might experience especially if they have a relatively modest rig.
Thanks ahead of time for your suggestions and advice.
Mary

Haohmaru of Daybreak responded with:
There are 2 things that cause the noticable lag/loads people see in homes/halls. Well, there are other factors but these are the 2 biggies most of the time. 
Texture diversity which directly equates to memory usage. The more textures (and geometry but that's far less an issue) used by unique items, the more memory is needed. The more memory needed, the more loading/unloading going on and the hitching that occurs even when you don't 'see' items in front of you. You will try and load any items within your view distance even if above/below you with no direct view. Items farther away use less texture memory unless a copy of the item is also close to you. It's constantly balancing those assets which leads to performance hits.
Item density which equates to rendering performance. If you have 1000 items in your view, it has to setup all of those to be rendered each frame. If you have lights/etc, it gets costlier. Even if the item is 'cheap' (few textures or copies of a select few items all over, like tiles) it takes time to set the items up to be rendered. So even if they are memory-friendly, it can still hurt performance if the quantity in view is crazy.

Unfortunately, there's little we can do to mitigate this since it's a completely user controlled experience. We've always said that players are a homes worst enemy One of the things we often suggest though when homes start to cap out is for players to lower their texture quality while in dense homes (better yet - before entering). Obviously the trade off is aesthetics (which pains me to suggest this) but generally, every step lower in texture resolution (say from Maximum to High) should lower memory usage by almost half, possibly more, sometimes less. If that doesn't do much, then it's more an issue of items-in-view and the only suggestion at that point is to thin out dense pockets which is certainly not a popular solution. I tour homes and watch a lot of crazy tour videos. It's insane what the community continues to come up with so I'd love nothing more than to remove all caps and let everyone go even crazier with their designs, but I'm not sure a computer exists that would allow that yet
I also took a moment to chime in with the following:

As Haohmaru already addressed the actual lag portion of your question, let me take a stab at the rendering lag issue. (And if any devs want to step in and correct any misconceptions I may have about how things work, that's encouraged! Everything I'm about to type is from observation and personal experience, not insider knowledge )

"Rendering lag" is the time that it takes for items to populate on your screen after you appear in a location (as you know, just reiterating for anyone reading who doesn't understand what's being discussed). The further items are from where you are in the world, the more likely it is that you'll run into rendering lag.

Contrary to popular belief, distance from your current location and number of items are the only things that matters with rendering lag. If items are 500 units away from you or 5000 units away from you, when you teleport into the middle of those items, it will take the same amount of time to load on your screen. The more items there are, the more time it will take, but the distance doesn't matter once it's out of your rendering distance from your point of origin. 500 or 5000, if you couldn't see it when you originally zoned in, it's going to take the same amount of time to render.

Rendering lag is actually not connected solely to zone in location--if you zone into a house zone and teleport to the decorations, and encounter rendering lag, then log out and log back in to the decorated portion of the zone, you will log in instantly, with all decor already in place on your screen.

Rendering lag is due to teleporting to items that are outside your character's rendering distance. It doesn't matter if you're starting from the zone entrance and teleporting to a location 10000 units away, or if you're starting from a location 10000 units away, and teleporting to a location at the zone in. If the location you're moving to is outside of your rendering distance, and you appear there instantly, you're going to experience rendering lag. Yes, it's less once you've been to a location in a zone once, and are heading back there, but it still happens.

I've found that sometimes it's actually faster to zone into a house, teleport to the decor, then /camp back to my character (a total time of less than a minute, rather than the longer load time of sitting and waiting for everything to appear on screen).

There isn't really a way to minimize rendering lag. The only thing that will "fix" it is to build the home inside a character's rendering distance from when they zone into a house. Even that depends on player settings, however. If a player has a low rendering distance, a low level of detail bias, and a low spell effects distance, not all of your home may load even if they're standing directly inside of it. Most players' computers can handle high enough settings these days that that shouldn't be an issue, but I have seen it occur.

Mary the Prophetess said: “As I understand it, rendering lag is a function of the distance an object is from the zone in location. Is this true for both the horizontal and vertical axis?”
It doesn't matter if that distance is horizontal or vertical; your visibility is a sphere around your character, so a horizontal or a vertical distance are treated the same.
Mary the Prophetess said: “Also, do the number of objects placed affect rendering or just the distance from the zone in? If I were to place, (hypothetically), 1200 floor tiles in stacks around the zone in, would it have any effect on the rendering speed, or is the rendering speed strictly a function of distance from the zone in. and not of number of items?”
I briefly touched on this earlier. The number of objects placed do affect rendering time, and while they affect zone in time, it isn't a big deal (30 seconds as opposed to 20 seconds, for example).

If you were to place 1200 floor tiles in stacks around the zone in, a player might experience a slightly longer zone in time, but it wouldn't be truly detrimental. I have a home with 1200 floor tiles in one room, and the zone in time isn't noticeably different from a home that's a bit more spread out. Most homes' items are all within a player's rendering distance from zone in (unless it's a breakout or custom build, which I covered above).

As Haohmaru mentioned though, texture diversity is a big one. If you had 1200 floor tiles, and you split those tiles among every type of tile in the game, it would take more zoning time and cause more lag than if you used 1200 floor tiles of one type. In fact, that's one reason I built my cathedral out of as few different textures as possible--the limited number of textures means that it's easier for a lower end computer to render without lag (of the rendering and movement varieties).

Haohmaru said: “You will try and load any items within your view distance even if above/below you with no direct view. Items farther away use less texture memory unless a copy of the item is also close to you. It's constantly balancing those assets which leads to performance hits.” 
 This. This this this this this! Keep this in mind when decorating.

Mary the Prophetess said: “If building in the breakout area of a huge zone, such as the Hua Mein Retreat, what can be done to reduce rendering times?”
When building in something like the Hua Mein, the only suggestion I can offer is to build the bulk of your home within rendering distance of the entrance, and to ensure that there are plenty of points throughout the zone for players to stop and explore. If you ensure that each "exploration point" is within view distance of the next one, this will allow the following exploration point to load on a players' screen while they're occupied with the current one. It isn't a perfect fix, but it does prevent the player from noticing the rendering lag that's occurring, as they slowly move from one point to the next, and each further point renders.

No comments:

Post a Comment