Texture performance and Server Side Baking - SLUniverse Forums
Navigation » SLUniverse Forums > Virtual World Discussion > General SL Discussion » Texture performance and Server Side Baking


General SL Discussion Discuss topics related to Second Life

 
Sponsor:
Steampunk Victorian Caledon
Reply
 
LinkBack Thread Tools Display Modes
Old 08-17-2013, 05:05 PM   #1 (permalink)
Senior Member
 
Jon Vetinari's Avatar
Wandering around in a Daze
 
Join Date: Jul 2012
Location: Wendigo Lake!
Posts: 184
Texture performance and Server Side Baking

With the various projects going to both improve performance and allow for materials, I'm wondering how sim performance is going to be altered going forward. Will we be able to use more and larger textures without causing client side lag? Will the simulator be able to handle the increased stress of materials-heavy sims without freezes? Will the number 1024 no longer make my performance-oriented heart clench?

Since I'm building a new sim just when all this is happening, I'm considering adding materials to a lot of the builds - but I'm hesitant to do this if its going to mean that I end up creating a sim that only a few people at a time can enjoy.
Jon Vetinari is offline   Reply With Quote
Old 08-17-2013, 05:10 PM   #2 (permalink)
Senior Member

*SLU Supporter*
 
Darien Caldwell's Avatar
LLvangelist
 
Join Date: Apr 2008
Location: Cali
Posts: 3,890
My Mood:
SL Join Date: 10/12/2006
Business: [H]arsh Styles
Client: Always changing, and too lazy to edit.
I'm kind of in the same state of wondering. I'm rebuilding my store from mesh, and I want to use advanced materials in it's construction. However, the potential for having 3 time more textures on the build has me wondering just how well is SL going to hold up in this scenario.

My gut says, 'not too well, unless you are very, very careful to keep the texture count and size down as much as possible.'

Afaik, LL hasn't done anything to make larger textures more behaved, or for viewers to handle a larger # of textures, or anything of that sort.
__________________
[H]arsh Styles

The truth doesn't care if you agree with it or disagree with it. It continues to be regardless, unchanged. Denying the truth is only lying to yourself. - Darien Caldwell
Darien Caldwell is offline   Reply With Quote
Old 08-18-2013, 03:41 PM   #3 (permalink)
Senior Member
 
Nalates's Avatar
Curious
 
Join Date: Jun 2009
Posts: 165
My Mood:
There really isn’t much the Lab can do about textures. They have limited us to 1024x1024px images. We can upload whatever size we want, but the system will convert it to no more than 1024x1024.

The Lab has done about all that can be done with compression. The problem comes once the image is decompressed. Regardless of the JPG size it is going to be decompressed into a 1024x1024x4 image for display. (4 = 3 colors RGB and one alpha for transparency) The video card is going have to deal with about 4 megabytes of data. (I’m skipping the 16, 24, and 32 bit considerations.)

How fast the video card can move data is a matter of hardware performance. The Lab could make better use of video cards. But, there is still a lot of data to push around when large textures are used.

Materials will no doubt add to the texture load and people can abuse texture loading at 3x the speed they previously did.

The Lab has taken the step of pushing objects that use Materials into the new Land Impact cost accounting. That provides some incentive for people to build efficiently, but no incentive to the fashion industry in SL.

Smart creatives will use a single texture with diffuse, normal, and specular images mapped into one image for certain applications. Sort of like animated images for SL. Some will use separate and different size images for the 3 textures needed by Materials. But, others will go with three 1024px images for an earring.

It is going to take some measuring to decide where the trade off points are for deciding when to combine smaller images into a single image.
Nalates is offline   Reply With Quote
Old 08-18-2013, 04:05 PM   #4 (permalink)
Senior Member

*SLU Supporter*
 
Darien Caldwell's Avatar
LLvangelist
 
Join Date: Apr 2008
Location: Cali
Posts: 3,890
My Mood:
SL Join Date: 10/12/2006
Business: [H]arsh Styles
Client: Always changing, and too lazy to edit.
Well I disagree there is *nothing* they can do. Since modern games are more than capable of handling 5 orders of magnitude more textures than SL can, for some magic reason. (probably because they use DirectX or other APIs that just do the job better)

As discussed in a previous thread, they could up the utilized texture memory from 512 megs to the 2-6 gigs most modern cards support; that right there would be a big boost for most people.

Other things include making a 64 bit client, utilizing the cache better, not decoding textures constantly on each fetch, and probably more things I couldn't begin to imagine.
Darien Caldwell is offline   Reply With Quote
1 User Said Thanks:
1 User Agreed:
1 User Likes This:
Old 08-18-2013, 04:23 PM   #5 (permalink)
slurker
 
Leah Mayo's Avatar
AFK for Revolution
 
Join Date: Nov 2010
Posts: 669
My Mood:
Client: Cool VL Viewer
Quote:
Originally Posted by Nalates View Post
Smart creatives will use a single texture with diffuse, normal, and specular images mapped into one image for certain applications. Sort of like animated images for SL. Some will use separate and different size images for the 3 textures needed by Materials. But, others will go with three 1024px images for an earring.
IMO the use of 1024x1024 textures is justified in relatively few cases, large pictures or signs on walls for instance, where you don't want them to get blurred by stretching from a small texture.

In most cases, especially with clothing, you're better off with 1 or 2 diffuse textures and 1 normals map, each one 512x512 pixels. The normal map can be an even smaller texture if tiled, I use a 256x256 fabric NM for some mesh clothing.

Three 512x512 textures are still less than one 1024x1024 and save you 512x512 pixels worth of video memory for the specular map or next texture.
Leah Mayo is offline   Reply With Quote
1 User Agreed:
Old 08-18-2013, 04:42 PM   #6 (permalink)
Senior Member
 
Jon Vetinari's Avatar
Wandering around in a Daze
 
Join Date: Jul 2012
Location: Wendigo Lake!
Posts: 184
Quote:
Originally Posted by Leah Mayo View Post
Three 512x512 textures are still less than one 1024x1024.

I really wish more people understood this. I'm so sick of buying beautiful things with huge textures that don't need them.

However, none of this really answers my original question. Project sunshine was supposed to be making a lot of this stuff better - and in some ways I do see that things are loading more quickly. I'm just concerned if its enough to allow for three layers of textures per object and if larger textures will cease to be as much of a problem in busy sims with it implemented.

http://community.secondlife.com/t5/T...s/ba-p/1583465

Last edited by Jon Vetinari; 08-18-2013 at 04:48 PM.
Jon Vetinari is offline   Reply With Quote
Old 08-18-2013, 05:09 PM   #7 (permalink)
Senior Member

*SLU Supporter*
 
Darien Caldwell's Avatar
LLvangelist
 
Join Date: Apr 2008
Location: Cali
Posts: 3,890
My Mood:
SL Join Date: 10/12/2006
Business: [H]arsh Styles
Client: Always changing, and too lazy to edit.
of course, nobody's saying to plaster 1024s all over everything. but where they are needed, they are needed.

And really there's no reason SL couldn't allow for non-square resolutions, such as 2048x 128, which guess what, is exactly the same size as a 512 x 512. Sometimes you just need larger along one dimension.
Darien Caldwell is offline   Reply With Quote
1 User Agreed:
Old 08-18-2013, 05:11 PM   #8 (permalink)
Senior Member

*SLU Supporter*
 
Darien Caldwell's Avatar
LLvangelist
 
Join Date: Apr 2008
Location: Cali
Posts: 3,890
My Mood:
SL Join Date: 10/12/2006
Business: [H]arsh Styles
Client: Always changing, and too lazy to edit.
Hmm, I can't help but feel there's something missing from this thread...

or someone...
Darien Caldwell is offline   Reply With Quote
Old 08-18-2013, 05:58 PM   #9 (permalink)
slurker
 
Leah Mayo's Avatar
AFK for Revolution
 
Join Date: Nov 2010
Posts: 669
My Mood:
Client: Cool VL Viewer
Quote:
Originally Posted by Darien Caldwell View Post
And really there's no reason SL couldn't allow for non-square resolutions, such as 2048x 128, which guess what, is exactly the same size as a 512 x 512. Sometimes you just need larger along one dimension.
They don't? I have a few 2:1 textures, freebies and own made, but never tried "big disproportions".
Leah Mayo is offline   Reply With Quote
Old 08-18-2013, 07:16 PM   #10 (permalink)
Senior Member

*SLU Supporter*
 
Darien Caldwell's Avatar
LLvangelist
 
Join Date: Apr 2008
Location: Cali
Posts: 3,890
My Mood:
SL Join Date: 10/12/2006
Business: [H]arsh Styles
Client: Always changing, and too lazy to edit.
Quote:
Originally Posted by Leah Mayo View Post
They don't? I have a few 2:1 textures, freebies and own made, but never tried "big disproportions".
they clamp any dimension to 1024, regardless of the other dimension.

I understand why, as in the prim days, square textures were probably the most sensible. But with mesh, and arbitrary UV mapping, it seems to me they should think about instead limiting by overall pixel count (or memory size, whichever way you want to look at it).

Therefore for a square, 1024x1024 would be max. But as you lowered one dimension, the other could grow.

2048x512, 4096x256, 8192x128 etc. they are are completely equivalent from a # of pixels and memory used standpoint.

(of course we probably don't need to get into the 8192 range, but was just for example)
Darien Caldwell is offline   Reply With Quote
Old 08-18-2013, 08:11 PM   #11 (permalink)
LEMONY CAKE!
 
Andromeda Rage's Avatar
Tough times demand tough farts.
 
Join Date: Feb 2011
Location: The Moon
Posts: 1,043
My Mood:
SL Join Date: October 20, 2194
Client: SL Viewer for Commodore 64
Quote:
Originally Posted by Darien Caldwell View Post
Hmm, I can't help but feel there's something missing from this thread...

or someone...
I'll just go ahead and throw these in, to help make this thread feel a little more complete:

1. The build tools are unprofessional and broken.
2. The starter avatars and default camera angles contribute to poor building habits.
3. LL doesn't give a shit.
4. We must repeat!
Andromeda Rage is offline   Reply With Quote
2 Users Laughed:
Old 08-18-2013, 11:59 PM   #12 (permalink)
slurker
 
Leah Mayo's Avatar
AFK for Revolution
 
Join Date: Nov 2010
Posts: 669
My Mood:
Client: Cool VL Viewer
Quote:
Originally Posted by Jon Vetinari View Post
... I'm just concerned if its enough to allow for three layers of textures per object ...
I think Server Side Appearance compensates that to a degree by sending to the viewer only 3 textures per avatar instead of 3 skin textures plus 1-2 textures per clothing item.
Leah Mayo is offline   Reply With Quote
Old 08-19-2013, 03:10 AM   #13 (permalink)
Senior Member
 
Join Date: Dec 2010
Posts: 272
I've have been playing around with materials for a long while now, few things ive learnt and would like to share.

If you are building some thing that requires a fair amount of textures lets say a house or a vehicle and you want to use some normal maps to create the appearance of geometry. You can arrange all your UV's that will use normal maps so they only share 1 or 2 textures this way you only need to upload 1 or 2 normal maps for your entire build. This does take a bit more time and thought but its well worth it in the end.

Using specular maps, these don't always have to represent the same resolution as the defuse map I've actually been making most of my specular maps 256x256. But then again you if need the specular detail you could share them on the same texture like I explained above.
Grid Strom is offline   Reply With Quote
3 Users Agreed:
1 User Likes This:
Old 08-19-2013, 04:48 AM   #14 (permalink)
Oddly Controversial
 
Penny Patton's Avatar
 
Join Date: Dec 2007
Location: Here and there. Kinda inbetween places now.
Posts: 4,373
My Mood:
SL Join Date: 11/30/2005
Quote:
Originally Posted by Darien Caldwell View Post
Well I disagree there is *nothing* they can do. Since modern games are more than capable of handling 5 orders of magnitude more textures than SL can, for some magic reason. (probably because they use DirectX or other APIs that just do the job better)

As discussed in a previous thread, they could up the utilized texture memory from 512 megs to the 2-6 gigs most modern cards support; that right there would be a big boost for most people.

Other things include making a 64 bit client, utilizing the cache better, not decoding textures constantly on each fetch, and probably more things I couldn't begin to imagine.
Videogames tend to use fewer and smaller textures compared to similar content made by SL users. Compare a piece of furniture made for SL compared to a similar piece from Skyrim.

The Skyrim furniture will likely use one or two textures. About 256x256 in size.

The SL furniture probably uses anywhere from one to twenty 1024x1024 textures.

No matter what improvements LL makes, they're not magicians. There's only so much they can do to improve SL performance while people continue to create content like that.
__________________
SLGuide.com - Tips and tricks to improving your Second Life.
Penny Patton is offline   Reply With Quote
2 Users Agreed:
Old 08-19-2013, 04:58 AM   #15 (permalink)
FS Dev
 
Kadah Coba's Avatar
Limited Edition Serious Pirate CEO Cat Supreme with Rainbow Skurvy Sprinkles and Bacon
 
Join Date: May 2010
Posts: 934
My Mood:
SL Join Date: Dec '08
Quote:
Originally Posted by Darien Caldwell View Post
Well I disagree there is *nothing* they can do. Since modern games are more than capable of handling 5 orders of magnitude more textures than SL can, for some magic reason. (probably because they use DirectX or other APIs that just do the job better)
Normal games don't have fully player generated worlds and content that's all editable in runtime, they have static worlds designed to run efficiently with their engine and most of the intensive calculations like lighting and occlusions precompiled into the map. Back in Garry's Mod I ran a hammer build server for some friends to use to compile their maps. It would take that sever with 8 core (this was back when having 2 was still new) half a day to compile these simple maps. I would hate to imagine how long a similar process would take on an SL region to make it have efficient views.
Kadah Coba is offline   Reply With Quote
1 User Agreed:
Old 08-19-2013, 05:03 AM   #16 (permalink)
The Purple
 
Chalice Yao's Avatar
HEYOO!
 
Join Date: Dec 2007
Location: Somewhere purple, Germany
Posts: 8,127
My Mood:
SL Join Date: 20. January 2007
Client: NaCl
Modern games partially use texture atlases; To put it simply, huge textures that are made up of a truckload of other textures, and those texture atlases get loaded in one chunk into the GPU memory, without the game needing to worry that suddenly some random new textures will be sucked down over the internets.

There actually -is- an experimental option for SL for that, but texture atlases are -not made- for random dynamic adding of new textures the game doesn't know about before. They are not good for dynamic content, and are usually generated and stored on the game medium beforehand.

Also, most games have tiny textures. Compare the texture size of clothing items and the like in Saints Row with those of SL, and SL is 10 times worse. Modern games can handle 5 times the textures because they are also probably 10 times less wasteful.

Admittedly, games also use way more possibilities when it comes to materials and dynamic shaders to make even simple textures look good. SL had its first steps with materials now, but there are more map types and support for the avatar mesh needed.


In the end, the management of texture memory space in GPU memory is mostly controlled by the GPU hardware, so if SL stuffs it where other games easily fit in, it simply means that SL uses way more texture space. There's not much magic in that regard, and the amount and size of textures is controlled by the content creators.
__________________
"Have you ever noticed that anybody driving slower than you is an idiot, and anyone going faster than you is a maniac?" - George Carlin

Last edited by Chalice Yao; 08-19-2013 at 05:23 AM.
Chalice Yao is offline   Reply With Quote
2 Users Said Thanks :
Old 08-19-2013, 05:20 AM   #17 (permalink)
The Purple
 
Chalice Yao's Avatar
HEYOO!
 
Join Date: Dec 2007
Location: Somewhere purple, Germany
Posts: 8,127
My Mood:
SL Join Date: 20. January 2007
Client: NaCl
Also to add:

Normal games don't pull every texture dynamically over the internet, unlike SL. All the textures come with that HUEG installation you do on your harddrive.

Also, unlike SL, most games store their textures in DDS/DXTC or S3TC formats, which are GPU hardware-supported, optimized texture formats for Direct X and OpenGL that are also compressed.

'But why won't LL store the SL textures in that format on the server?'

Because this is the core reason they chose Jpeg2000: Jpeg2000 allows you to stream and display the texture in chunks. You don't need to load the whole texture over the internet to initially display it. You can load the first X bytes, and display a rough outline of the texture. Then the next, larger amount of X bytes, to display a higher resolution. Then the last X bytes, downloading the full file to display it in the full resolution.
These are the so called 'discard levels'.

If the textures were stored as other formats, you would have to download the whole image file from the internet before displaying it. Even in cache, the discard levels can be gradually decoded for display, instead of having to decode the whole file first. And if GPU or ram become too full, the textures can be switched to -lower discard levels- again (technically a higher discard level), freeing up memory. So if you see textures blur in and out, this is not SL loading them over the internet again. This is all in-cache.

And while plain JPEG also supports discard levels, it does not support transparency, unlike JPEG2k.


'But why won't the client just transform the fully downloaded JPEG2k textures to S3TC, optimizing things in cache and deleting the JPEG2k afterwards?'

That is a good question I don't have the answer for. It could very well be that loading all the textures as fullres S3TC would still make ram and GPU memory explode.


If you want a taste of SL melting down your GPU and RAM, enable the 'develop' menu at the bottom of the advanced menu, and enable develop -> render(ing?) -> full res textures. This disables discard levels and always displays and loads all textures fullres.

Go to a detailed area and watch your ram and GPU memory. This is what full res SL textures really use up. Also expect the client to crash once you hit 3.2 gigs of ram used. So basically if SL'd not blur out textures again, this would happen.

EDIT:
To add, if you want to see used-up GPU memory, you can enable the texture console with ctrl+shift+4. See http://wiki.secondlife.com/wiki/Texture_Console

Run that with fullres-only textures and be amazed. The texture consoles shows quite well how much more complex SL's texture handling is, compared to normal games.

Last edited by Chalice Yao; 08-19-2013 at 05:48 AM.
Chalice Yao is offline   Reply With Quote
2 Users Said Thanks :
Old 08-19-2013, 09:46 AM   #18 (permalink)
Junior Member
 
Join Date: Apr 2011
Posts: 9
We are working on a range of projects to improve texture handling both in the viewer and in various parts of the server side. Texture loading is already better than it was in the past, and we believe it will continue to improve as more of those changes are deployed.

Of course, efficient content is still important, as a number of other posters have pointed out here.
OzLinden is offline   Reply With Quote
1 User Said Yay!:
Old 08-19-2013, 09:58 AM   #19 (permalink)
Oddly Controversial
 
Penny Patton's Avatar
 
Join Date: Dec 2007
Location: Here and there. Kinda inbetween places now.
Posts: 4,373
My Mood:
SL Join Date: 11/30/2005
Quote:
Originally Posted by OzLinden View Post
Of course, efficient content is still important, as a number of other posters have pointed out here.
Which is why it's important for LL to provide tools that encourage efficiency. I can think of maybe half a dozen ways LL discourages efficiency off the top of my head.

As a company they need to figure out what they need to do and prioritize those efforts.
Penny Patton is offline   Reply With Quote
Old 08-19-2013, 11:28 AM   #20 (permalink)
Imp
 
Gabriell Anatra's Avatar
Who are you?
 
Join Date: Nov 2010
Location: In between.
Posts: 3,395
SL Join Date: Early '06 or late '05, not sure.
Client: Singularity, mostly.
I've been running with compressed textures enabled for some months now and it seems to work well.
Gabriell Anatra is offline   Reply With Quote
1 User Agreed:
Old 08-19-2013, 12:04 PM   #21 (permalink)
The Purple
 
Chalice Yao's Avatar
HEYOO!
 
Join Date: Dec 2007
Location: Somewhere purple, Germany
Posts: 8,127
My Mood:
SL Join Date: 20. January 2007
Client: NaCl
Quote:
Originally Posted by Gabriell Anatra View Post
I've been running with compressed textures enabled for some months now and it seems to work well.
I've disabled it once I noticed that SL's compression option is not quality-lossless. I noticed it quite harshly with some avatars and bakes.
Chalice Yao is offline   Reply With Quote
1 User Agreed:
Old 08-19-2013, 01:51 PM   #22 (permalink)
Senior Member

*SLU Supporter*
 
Darien Caldwell's Avatar
LLvangelist
 
Join Date: Apr 2008
Location: Cali
Posts: 3,890
My Mood:
SL Join Date: 10/12/2006
Business: [H]arsh Styles
Client: Always changing, and too lazy to edit.
Quote:
Originally Posted by Chalice Yao View Post
I've disabled it once I noticed that SL's compression option is not quality-lossless. I noticed it quite harshly with some avatars and bakes.
For me, enabling it caused a lot of texture corruption. but that was many months and a different video card ago. I may try it again.

People did a good job of listing why SL can't do as good as a locally installed game but did miss one reason:

Most modern games use "Zoning", in that a level is divided up into multiple zones, and as you move from zone to zone, the textures and objects for other zones get dropped from memory. SO even though the level may have literally hundreds of textures and models, only a fraction of that is in memory at any given time.

The way SL works, everything within view is in memory, more or less.
Darien Caldwell is offline   Reply With Quote
1 User Agreed:
Old 08-19-2013, 02:00 PM   #23 (permalink)
The Purple
 
Chalice Yao's Avatar
HEYOO!
 
Join Date: Dec 2007
Location: Somewhere purple, Germany
Posts: 8,127
My Mood:
SL Join Date: 20. January 2007
Client: NaCl
Quote:
Originally Posted by Darien Caldwell View Post
The way SL works, everything within view is in memory, more or less.
It's reasons like that why also level layout and design of buildings in games seldomly let you view into one side of a building, and out another. Usually there is always something in the way..walls, barriers, etc.

Things like that can also be taken into account when laying out a city sim and the like. Really, there are lots of level and asset design wisdoms that perfectly apply to SL, but most people just can't be expected to know about.
Chalice Yao is offline   Reply With Quote
Old 08-19-2013, 02:28 PM   #24 (permalink)
Senior Member
 
Draekan's Avatar
 
Join Date: Aug 2013
Posts: 113
Client: Homebrewed
I enabled the texture compression option once to see what it was like and the decrease in viewed quality of the textures was just too much. I wouldn't recommend it to anyone unless they are using SL on a graphics card that only has 256mb or 128mb etc. In the past several versions of the LL viewer, and in the current 3.6.2 release, they would have the viewer drop textures from memory that are behind the avatar shortly after they have last been viewed. Some of the TPVs disabled that behavior by default and keep the textures in memory and only start to discard from memory after hitting 95 percent. Apparently LL changed their minds about dropping the textures behind the user since that behavior no longer exists in the maintenance RC release viewer.
Draekan is offline   Reply With Quote
Old 08-19-2013, 02:33 PM   #25 (permalink)
Oddly Controversial
 
Penny Patton's Avatar
 
Join Date: Dec 2007
Location: Here and there. Kinda inbetween places now.
Posts: 4,373
My Mood:
SL Join Date: 11/30/2005
I've long since taken to making all my building interiors into skyboxes, well out of draw distance. Of course, doing that requires a lot of extra work.

You need the ability to mod any buildings you buy, gutting the interiors from the ground level model and crafting a full skybox out of them for the interior. You also need the ability to turn the doors into teleporters, which means you need to know how to script, or at least edit a script a friend has made for you.

Right there are two advanced skills most users don't have. Like Chalice said, the people with the skills to do that often don't have the design experience to apply these practices into their work.

There is so much LL could do to encourage more efficient habits, make such habits easy for any user, and also discourage excessive resource use.
Penny Patton is offline   Reply With Quote
1 User Likes This:
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On