Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Cube with reduced topsize texture bug -- Should it be fixed?

(See image in post first.) What should be done about this long-standing bug?

Leave it be. I have made or use objects with custom textures that compensate.
2 (3.5%)

Option A (from the image) - This would match the way other textures work elsewhere in SL.
21 (36.8%)

Option B (from the image) - This would make many construction tasks easier.
13 (22.8%)

Option A or B - Either works for me. I don't depend on workarounds to the bug... Yet.
21 (36.8%)

Total votes: 57
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
03-23-2005 12:43
Example Image: topsize_options.jpg
My vote: Option B (I just can't edit my vote once placed)

This is a graphical bug that's been around forever.

If you take a cube and texture it with a image that can show distortions well, like a grid, then reduce its topsize values to, for example, 0.5 or so, the texture on the sides become distorted.


How do textures work?

Everything in a 3D scene is made up of triangles. Each square face of a cube prim is made up of two triangles. (For a total of 12 for that prim.) When you reduce the topsize and see the distortion bug, the changes to the textures on each triangle are different which is why you can see the edge between them.

Textures are applied by first defining one corner of the texture as the 0,0 coordinate and the opposite corner as 1,1. These coordinates are called U,V to keep them distinct from the X,Y,Z of 3D space. Each vertex of the triangle is given its own U,V coordinate. So an unmodified default cube face would be:
CODE
0,0 -- 1,0      1,0
| / / |
| / / |
0,1 0,1 -- 1,1
I separated the two triangles for readability, but they would be right next to each other on the cube face.

Looking at what the current behavior is compared to what one would expect, I am at a loss as to why it is the way it is. It makes no sense to me, given the way UV coordinates work, that we end up with such a mess as this. But it's wrong. Oh so wrong. And has been for YEARS.


How to get around this?

Even now, you can compensate for this bug. You can make a texture that has been skewed in the opposite way, divided along the diagonal. It would look horrible on a square face, but would look correct on a reduced topsize prim. But ONLY for a specific value of topsize. Change the topsize even slightly, and the distortion starts to return. You would have to make a completely new texture to fit the new shape.

It is rediculous to have to compensate for a bug in the rendering engine with new, specialized texture assets!


How to fix this?

(Option A)
Fix the problem, whatever it is in the render eingine, that causes correct UV coordinates (and if you note, the corners of Option A and the current behavior are the same) to look so wrong.

(Option B)
Move the U,V coordinate values with the movement of the X,Y,Z coordinate of each vertex. This would mean that a texture of a brick wall on such a face would remain still and undistorted as the topsize was reduced. Instead, portions of the texture would be cropped out along the top. With the topsize reduced to zero, the lines of bricks would still be straight and even. There would just be fewer bricks on the upper rows.


Should this be fixed?

I think very few people have made custom textures to get around this bug in the rendering code. I'm sure some people have, however, mostly in high-detail objects where any distortion would be unacceptable. Cars and other vehicles spring to mind.

But I don't know this for sure. I, myself, have never made such a custom anti-distortion texture. I knew it was a bug as was willing to wait for it to be fixed. But it's been a year and a half since I first noticed and reported this to a Linden. Now I wonder if it is too late to change, since too many people have built things and perhaps sold them with the "patch" texture technique, and those objects would loose their hard-earned prettiness if the U,V coordinates were correctly modified.

And then there is the question of which of the two options for fixing it would people want.

This is an example of the sort of features and bugs that have not been fixed for fear of upsetting people... But as more and more time passes, the number of people that would be upset is potentially increased. And yet, the number of people who are inconvenienced by the continued existence of the bug grows even faster.

This poll is to ask "Who WOULD be upset if this bug were fixed, and how should it BE fixed if not?"


EDIT: This is just once facet of a whole slew of texture alignment bugs that have never been fixed. Further example, make a 2x2x1 cube, hollow it to 50%, cut it to 25 and 75, set the Repeats Per Meter on the texture page to 1 and click Apply. It's a mess!
_____________________
~ Tiger Crossing
~ (Nonsanity)
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
03-23-2005 13:10
Tiger -- kudos to you, and a tip of my flowerpower hat because you have explained this so eloquently, in such a well-constructed way. I believe you've casually mentioned this to me before, and WHAT IS IT WITH YOU AND ATTENTION TO TEXTURING BUGS ANYWAY? ;) *smiles* I mean that in the best of ways.

In short, my personal logic regarding the issue is that since the current behavior is irrational and "wrong" as you put it, then further shaky ground should not be continued, and it should be corrected at the earliest convenience of the Lindens. You clearly stated what's likely to happen in your last few paragraphs.

I'm flexible but open to listening to the needs of others, so I went with "Option A or B". I'd be curious to see those who have made practical use of the bug post here, as to learn from their experiences.

(Ya know, this bugs me almost as much as the "cutting a shiny tube one" does... LOL...)
_____________________
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
03-23-2005 13:13
For added fun, try rotating textures. You'll be pleasantly surprised as they twist and warp to fit the shape and size of the prim!

Argh. I want it fixed so I can do UV Map imports, dammit. :D
_____________________
---
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
03-23-2005 14:07
Yeah, why HASN'T this been fixed? Almost everything else from the old days has been as of 1.6. What's left? This and maybe some alignment problems with the horizon and water and back clipping plane on edge-of-world sims?

I choose option A for consistency with the rest of the build tools, but hope, as I always do, that we'll one day have the option to texture a face as we choose.
_____________________
Need scripting help? Visit the LSL Wiki!
Omega Point - Catherine Omega's Blog
Reitsuki Kojima
Witchhunter
Join date: 27 Jan 2004
Posts: 5,328
03-23-2005 14:18
From: Tiger Crossing
I think very few people have made custom textures to get around this bug in the rendering code. I'm sure some people have, however, mostly in high-detail objects where any distortion would be unacceptable. Cars and other vehicles spring to mind.

But I don't know this for sure. I, myself, have never made such a custom anti-distortion texture. I knew it was a bug as was willing to wait for it to be fixed. But it's been a year and a half since I first noticed and reported this to a Linden. Now I wonder if it is too late to change, since too many people have built things and perhaps sold them with the "patch" texture technique, and those objects would loose their hard-earned prettiness if the U,V coordinates were correctly modified.

And then there is the question of which of the two options for fixing it would people want.

This is an example of the sort of features and bugs that have not been fixed for fear of upsetting people... But as more and more time passes, the number of people that would be upset is potentially increased. And yet, the number of people who are inconvenienced by the continued existence of the bug grows even faster.

This poll is to ask "Who WOULD be upset if this bug were fixed, and how should it BE fixed if not?"


Just to chime in, I HAVE tried to compensate for the bug. It doesn't work very reliably. At best you can get things to suck a little less.

I wouldn't mind if I had to re-texture a few things if it meant this bug was fixed.
_____________________
I am myself indifferent honest; but yet I could accuse me of such things that it were better my mother had not borne me: I am very proud, revengeful, ambitious, with more offenses at my beck than I have thoughts to put them in, imagination to give them shape, or time to act them in. What should such fellows as I do crawling between earth and heaven? We are arrant knaves, all; believe none of us.
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
03-24-2005 10:14
From: Reitsuki Kojima
Just to chime in, I HAVE tried to compensate for the bug. It doesn't work very reliably. At best you can get things to suck a little less.

I wouldn't mind if I had to re-texture a few things if it meant this bug was fixed.


Sure, it works just fine. Look at your Settlers of Second Life board, Reitsuki... I used it for the hexagons. I constructed the hexagons out of two top-sized pieces and bent them as I described here. The thing is that you have to be extremely precise, and you have to start with a much higher resolution image than you normally would because you lose detail in the compensation process. It was a pain to do, but I wrote a PSP script that bent a hexagon-shaped image to compensate for the texture bug, and that made the process much faster.

Now, even though I've released a huge product in Second Life that compensates for this bug, and fixing it would break every board out there, I'd still want to see it fixed (there was no poll option for that ;)). It's a bug, and it's nasty to try to compensate for it. All it would mean to me is to redo a few textures and rerelease really quick, no problem. I'd like to see option B, which is similar to the way cutting and cylinder ends are handled. It would require no weird compensation on my part, simply upload the hexagon-shaped texture and go.
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
03-24-2005 11:07
From: Lex Neva
I'd like to see option B, which is similar to the way cutting and cylinder ends are handled. It would require no weird compensation on my part, simply upload the hexagon-shaped texture and go.
Good point, Lex, on how Option B does have comparable objects that behave the same way. I'm going to change my choice to Option B I think. It would be more useful for many things. In essence, the texture on the face won't change at all as the topsize and top shear change.

Option A could still be done with a custom texture. I make textures like that for tops of cylinders and hollowed out faces all the time.

I think Option A is best. It reduces the distortion of textures even more. A brick should always look like a brick, never a trapezoid or rhombus! :)


Note: I've been using "topsize" in all my recent posts when I meant both "top size" AND "top shear" settings. Both are affected by this bug and others. (The 8 bit float inaccuracy issue.)

Edit: Poop. Can't change my vote. I'll get my wife and an alt to double vote B for me. One to erase my vote and one to place a new vote on B. :)
_____________________
~ Tiger Crossing
~ (Nonsanity)
Chandra Page
Build! Code. Sleep?
Join date: 7 Oct 2004
Posts: 360
03-24-2005 11:17
Option B is my choice, even if it doesn't work exactly like some of the editing tools for other shapes. It's just plain easier to work with a flat surface that doesn't twist and distort a texture you've pasted on it. I agree with Lex that simply slapping a hexagonal (or other oddly-shaped) texture on the side is the simplest way to go. It's similar to what I use for the ends of cylinders (circular texture) or prisms (triangular texture).
_____________________
Come visit the In Effect main store and café
Drawbridge (160, 81)
Particle effects, fashion, accessories, and coffee!
On the Web at SL Exchange and SL Boutique
Racer Plisskin
Rezerator
Join date: 2 Jan 2005
Posts: 147
03-24-2005 15:09
Why make people fix anything? If these 'fixes' are codeable at all, why not give users a choice on how to display their textures.

Put a couple new radio buttons in the texture edit screen.

1: 'used default triangle behavior' <- all existing items automaticaly get set to this so nothing breaks - the code for this already exists and works so why mess around with it?

2: 'use outer boundry constraints' <- what you describe as option A

3: 'use zero distortion overlay' <- what you describe as option B

Racer P.

NOTE: I have a couple of wildly distorted images used for the side windows on a car. topsized and topsheared as well. I'll edit this post to add em when I get home from work later (8:30 PM or so SL time)
Khamon Fate
fategardens.net
Join date: 21 Nov 2003
Posts: 4,177
03-24-2005 15:59
i voted B in the interest of keeping the same scale by simply cropping the photo. although it's not exactly simple...but...

nobody's voted for the first option so far.
Racer Plisskin
Rezerator
Join date: 2 Jan 2005
Posts: 147
03-24-2005 17:53
Obviously, all of us who have mangled textures to get our builds to look right would rather have an easier way to do it if that's possible. I suppose there may be someone who is a 'master mangler' who loves all the aggravation of skinning stretched prims just for the fun of it somewhere out there though.

I voted for option 4 as I already have mangled several textures and could do so again, but I'd rather there was an easier way to do it. I don't care which method is used A or B or optionaly both though.

Racer P.
Carnildo Greenacre
Flight Engineer
Join date: 15 Nov 2003
Posts: 1,044
03-24-2005 23:04
Compensating isn't that hard, while fixing the bug is. It might be possible to put the compensation code into the SL renderer.
_____________________
perl -le '$_ = 1; (1 x $_) !~ /^(11+)\1+$/ && print while $_++;'
Garoad Kuroda
Prophet of Muppetry
Join date: 5 Sep 2003
Posts: 2,989
03-24-2005 23:18
I suppose it's too much to ask for A and B? :D

If it has to be A or B: whichever's easier and causes less lag. It looks like it'll be a pain in the rear to fix, this is why I say that.

Not so sure compensating isn't that hard, though. I'm no stranger to image editing but getting any texture to look right given current behavior doesn't look easy. And at the very least, it's a waste of time when we could be doing other things that are actually *interesting*!
_____________________
BTW

WTF is C3PO supposed to be USEFUL for anyway, besides whining? Stupid piece of scrap metal would be more useful recycled as a toaster. But even that would suck, because who would want to listen to a whining wussy toaster? Is he gold plated? If that's the case he should just be melted down into gold ingots. Help the economy some, and stop being so damn useless you stupid bucket of bolts! R2 is 1,000 times more useful than your tin man ass, and he's shaped like a salt and pepper shaker FFS!
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
03-25-2005 07:52
From: Racer Plisskin
Why make people fix anything? If these 'fixes' are codeable at all, why not give users a choice on how to display their textures.

Put a couple new radio buttons in the texture edit screen.


This shoulds like giving people a gun so that they can shoot themselves in the foot with it.
Racer Plisskin
Rezerator
Join date: 2 Jan 2005
Posts: 147
03-25-2005 09:59
Sorry for the delay...

Here's the example stretched image I was talking about for car side windows:

Racer P.
eltee Statosky
Luskie
Join date: 23 Sep 2003
Posts: 1,258
03-31-2005 09:08
honestly either a or b, selectable per object would probably be idea, aka have a radio button selection, or pulldown, in the texture panel, sort of
( ) Texture Vertex Correction Off (as it is now)
( ) Scaled Vertex Correction (option A)
( ) Flat Vertex Correction (option B)

mebbe jus a pulldown dialog that most people wouldn need to know or mess with would be ideal there, etc
_____________________
wash, rinse, repeat
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
04-01-2005 10:50
I didn't make "A & B, as optional behavior" an option since that would involve adding more data to the packet that describes the object. Something I know LL should always think twice before doing, since it will impact almost EVERY object in the world, and dlow down streaming.

I still like "B".
_____________________
~ Tiger Crossing
~ (Nonsanity)
Ralphie steptoe
Registered User
Join date: 8 Oct 2004
Posts: 8
More Choices!
04-01-2005 12:03
From: Racer Plisskin

Put a couple new radio buttons in the texture edit screen.

1: 'used default triangle behavior' <- all existing items automaticaly get set to this so nothing breaks - the code for this already exists and works so why mess around with it?

2: 'use outer boundry constraints' <- what you describe as option A

3: 'use zero distortion overlay' <- what you describe as option B


Great! This would also be a good option for the ends of the "tube" shape, which wrap textures, totally unlike cylinders or semi-spheres.
Aestival Cohen
half pint half drunk up
Join date: 2 Sep 2004
Posts: 311
04-01-2005 14:33
I voted A, not because it's super nice, but because it seems it'd be easier to fake B with A than vice versa...
_____________________
=^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^=
Luverly FLICKR photos!
=^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^= =^.^=
Aspen Normandy
Registered User
Join date: 25 Nov 2005
Posts: 42
12-20-2005 09:14
http://secondlife.com/vote/index.php?get_id=259

That proposal needs a lot more votes.
Get on it!
_____________________
_____________
Aspen Normandy
Builder, Scripter
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
12-20-2005 09:31
This bug was pointed out to me just yesterday by someone who I think was trying to make a grid on a top size reduced box but wasn't able to get it to do what they wanted because of this bug.

It is still making building harder, it's time for it to go,.
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-