Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Preventing clothing distortion on the sides

Yngwie Krogstad
Registered User
Join date: 7 Jun 2006
Posts: 233
11-09-2006 07:12
Hi,

I just recently used gimp and the templates available for download from the SL website, to make a denim "jeans" jacket with a picture and some text on it, and it was fun and really cool, but I've got one problem.

On my new jacket, as well as the pants I wear which I did NOT make, I've noticed the textures get stretched and distorted as they get closer to the side of my body. For example on my pants, the back pockets are fine until you hit a certain point, then the texture gets stretched, and the edge of the pocket ends up somewhere on the side of my hip, rather than staying in back like a real pocket would. And on the jacket I made, the front pockets do the same thing, ending up underneath of my armpits.

Why is it doing this, and how do I stop it? Not only does it look wrong, but if there's text on there (such as the words "Rich Blues" I put above the front left pocket on my jacket), the letters get very badly distorted if they fall into that "stretched" area.
Johan Durant
Registered User
Join date: 7 Aug 2006
Posts: 1,657
11-09-2006 07:35
Why this is happening is relatively simple to explain, but very complex to fix, so most people just live with the stretching. Basically, the texture coordinates are set in such a way that pixels on the sides of the body are stretched. This can be accounted for, but requires a lot of painstaking distorting to squish the texture in places to correct for the stretching later.

To understand what's happening with the texture, imagine turning on a projector and projecting the image onto a statue. The image will look correct when viewed straight on, but will look stretched when you view the statue from the side.
_____________________
(Aelin 184,194,22)

The Motion Merchant - an animation store specializing in two-person interactions
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
11-09-2006 08:44
Johan pretty much as it right. It's the UV mapping of the flat clothing texture to the rounded Avatar form that is distorting things.

Best fix I know is to check out Robin Sojurner's in-world texturing tutorial, and get her free set of 'UV Map grid clothes', which are basicly her templates for clothes wrapped onto clothing. She explains very well how to cope with these distortion effects. You can also take the wonderful set of templates that Chip Midnight provides, and use those to make a set of 'test clothes'.

Now, when you wear those clothes, you'll see precisely how various areas of the template streach when worn on YOUR body shape. You can compensate for this by compressing certain areas of your texture so it works right. However, the adjustments that work perfectly for you will NOT work perfectly for the other gender or for noticably different body shapes.

Whan I am designing something new, I allow the template grid to show on a test texture, so I can clearly see what triangles and areas are being distorted, and where I may need to adjust things to make it look better. this is particularly usefurl for matching side seams and for getting shoulder straps and the cuffs of short pants to work right. You do more uploads, but you get far better results. You can also just go so far as starting the upload process, and can choose to preview the texture on a male or female shape. This isn't always accurate, and you can't always look at every angle, but you can do that without paying the upload fee, while you're getting a rough design working.

The best trick is to simply avoid placing detailing in areas of the body that tend to distort. Move the pocket a little closer to the centerline, and away from the side, and you'll be in a more stable area.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
Yngwie Krogstad
Registered User
Join date: 7 Jun 2006
Posts: 233
11-10-2006 02:49
Wouldn't it be better if we had a larger texture then, so we'd have more room to move things around and still have some left over for the side? That's basically the same as moving the pockets closer to center, except instead of moving them, adding extra fabric on the outsides that would be the side material?

Oh, duh. I just realized, the portions we don't want distorted would still fall onto the part where it's curving. So much for that idea. I wish there was a better way to render them; perhaps something similar to the Mercator projection of a globe you've probably all seen, where instead of just a flat grid, it's got kinda surfboard shaped sections put together with gaps between them?
Johan Durant
Registered User
Join date: 7 Aug 2006
Posts: 1,657
11-10-2006 07:28
Well yeah, the UV coordinates could be set so avoid distortion. However, there are two big caveats with that: one, as ceera pointed out, different shapes will interact with the UV coordinates differently, so what looks right with one shape will distort on another. Two, tweaking the UV coordinates will make them harder to understand for beginners. The tradeoff is that with the planar projection they have now it is simple for people to just take a photo of clothing and paste it into the texture, without needing to tweak the image in bizarre ways to fit the texture mapping. Using your own example, note that Mercator projection takes a skilled cartographer to do, to know how to split up the map correctly.

At any rate, this isn't an option for us anyway. The texture coordinates are built into the model and set by LL. This is for the best, to ensure that any piece of clothing will look right on any avatar.
_____________________
(Aelin 184,194,22)

The Motion Merchant - an animation store specializing in two-person interactions
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
11-11-2006 13:45
The UVs aren't exactly a projection; they are unwrapped a little, just not nearly enough on the sides. (Don't get me started on the Mesh and the UVs that go with it.)

The problem with new UVs, (which I'm sure we'll get eventually, since I'm guessing the big clothing Corporations will pretty much insist on meshes and UVs that show their product in a flattering light,) is that when the Lindens implement them, all the clothing/skins etc. currently in world will break, and no longer be usable. So it's going to cause a bit of an uproar when it happens.

All of which being said, you can smush the texture on the sides to compensate for the stretching, but be aware that when you do so, it will look blurry on the Avatar. This is because those polygons are really only a handful of pixels wide on the 512x512 image that is now used internally for all Avatar maps.

But those pixels must be stretched out to cover a polygon that's as wide as any of the ones in the front of the mesh.

So they get all blurry.

I'm afraid that the best bet really is to avoid putting anything in that area, if possible.

If it's any help, most SL residents develop a kind of selective vision that enables us to see what the designer intended, rather than what's actually in front of us. :D

Hope this helps!
_____________________
Robin (Sojourner) Wood
www.robinwood.com

"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia
Thunderclap Morgridge
The sound heard by all
Join date: 30 Sep 2006
Posts: 517
11-12-2006 01:29
That is assuming that LL can change the UVs without activating the law of unintended consquences. Breaks suck, but that is the nature of this. Enough time in the front, new templates should help. bUt when it happens I am sure that Zee will be burned in effigy again by members of furnation ( which are beginning to sound like Palistinians).

Yes, I did say again. I found them doing it earier due to the island increase.
I love this place. Thankfully noone has figured out death yet.
_____________________
Gimp:
n : disability of walking due to crippling of the legs or feet
ie. lameness, limping, gameness, claudication

secondlife://Amaro/77/130/39
Come to Thunderclap: the gospel chapel
and Thunderburst: Mens clothes and more.