Hawk Mendicant
www.hawkuk.com
Join date: 6 Jun 2005
Posts: 30
|
10-06-2005 05:12
Hi Everyone,
I was wondering if anyone knew a technique for displaying textures more quickly?
At the moment i'm using various images spread across 4 textures and using llSetTexture and llOffsetTexture to display the individual parts. Unless the image has been shown recently it usually takes a second or so for it to load. Would I be better off with an individual texture per image rather than using Offset? Would trying to decrease the file size of the texture help? Any other ideas?
Thanks for any advice. Hawk
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
10-06-2005 07:02
You'll always have the delay in loading a new texture by llSetTexture - there's one built into the function as it says here although that's only 0.2s. The rest is loading the new texture from scratch. There are various ways around that: If you make the texture smaller it loads faster 256 X 256 loads 4 times faster than 512X512 which is four times faster than 1024X1024 - at least in ball park terms, there's certainly 4X the information in each step with images of equal colour depth. That said, if you can and since you're already using it, change your offset algorithm if necessary. You can run the offset over a bigger texture, everyone takes the hit of loading it, which isn't much fun for them (but one big texture isn't too outrageous) and then it shifts around so you get almost instant change to the new part of that texture because you've already loaded the whole. If you go down this route please, please try to make it as small as possible. By all means in PS work on it bigger, then shrink it down, but you'd be surprised at the amount of detail you can get into a 512X512 image if you try. 1024X512 is better than 1024 square and so forth.
|
Harris Hare
Second Life Resident
Join date: 5 Nov 2004
Posts: 301
|
10-06-2005 09:51
I use a trick known as "z-buffering" to make switching between large textures more seemless.
What you do is actually have a cube show the first texture on its front side facing the avatar. At the same time, display the second (or next) texture on the back side of the prim and hide that side with another prim so you can't see it. When you do this, your AV will actually begin downloading both textures at the same time even though you can only see the one on the front side of the prim.
If you delay long enough, the second texture will be fully downloaded enough so that swapping it to the front side of the prim will happen immediately and without blurring.
|
Hawk Mendicant
www.hawkuk.com
Join date: 6 Jun 2005
Posts: 30
|
10-06-2005 12:10
Thanks Eloise & Harris for your suggestions. I think i'll try Eloise's idea first and combine things onto a single texture so I can just use an offset rather than another SetTexture each time. If that doesnt help i'll try the hidden surface idea.
Thanks again!
|
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
|
10-06-2005 12:26
I "preload" the different rotor textures on my autogyro by placing them on different hidden surfaces inside the engine cover. Unless you rotate your camera inside, you don't see them. Result: Zero blurry crap when the rotor texture changes.
|
Travis Lambert
White dog, red collar
Join date: 3 Jun 2004
Posts: 2,819
|
10-07-2005 09:41
I have this issue for my game show - and the prize indicator.
I have 9 images I need to toggle through. As the prize level increases, if those textures are slow to load it looks like crap, and people are confused.
What I do, is place all 9 images into a grid on a single texture. Then use llScaleTexture & llOffsetTexture to 'focus in' on only the section of the image I need.
That way, there's only one texture to load, and zero delay.
_____________________
------------------ The ShelterThe Shelter is a non-profit recreation center for new residents, and supporters of new residents. Our goal is to provide a positive & supportive social environment for those looking for one in our overwhelming world.
|