Texture on a sphere
|
Ace Cassidy
Resident Bohemian
Join date: 5 Apr 2004
Posts: 1,228
|
03-15-2005 05:00
Does anyone know of any image editting techniques (I use Gimp, but if you know how to do this in PSP, I can probably map the operations) that would distort a flat image so that when it is placed on a sphere, the "sqishiness" that is at the poles is compensated for.
Specifically, how would I create a texture to place on a sphere that would be the seams on a baseball? Are there any filters that can do this?
Thnx...
- Ace
_____________________
"Free your mind, and your ass will follow" - George Clinton
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
03-15-2005 09:33
I have a baseball texture that I made. It's actually a lot easier than you think. If you want to see it, go to the NW corner of Indigo, board the Defiant, and find your way to the Captain's Ready Room (Deck 1, across the hall from the bridge). It's sitting on the desk. If you want a copy, let me know, and I'll give you one.
As for your question, the best way to compensate for spherical wrapping of a 2D texture on a 3D sphere is to think of a world map compared to a globe. Just as the map and globe are divided into sections of latitude and longitude, so must be your texture. Anything at the very top and bottom of the map (texture) is going to endup occupying no more than a single point at the globe's pole, while anything in the middle (the equator) will not be shrunk at all. Anything inbetween will be shrunk to a predictable degree, depending on its location between the equator and either pole.
A good way to make it all work is to work within a diamond shaped area of your canvas. The corners of the diamond fall at the mid points of the top, bottom, left side, and right side of the canvas. Only paint within the diamond. When you're done painting, cut the texture in half horizontally along the midline (equator) and put the 2 halfs in serperate layers (do not move them, just put them each into their own layer. Now use whatever the GIMP equivilent is of Photoshop's distort tool to stretch the texture so that the top of the diamond stretches all the way across the top of the canvas (in other words, turn the triangle into a square). Now repeat for the bottom half and you're done.
This is not an exact method, since the increase in size as you approach the pole is happening at a linear rate, whereas it should be quadratic increase, but it's close enough for SL purposes.
EDIT: Alternately, you could use a program like Deep Paint or Tattoo to paint directly onto a real sphere, and then just let the program output the 2D texture
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
Olmy Seraph
Valued Member
Join date: 1 Nov 2004
Posts: 502
|
03-15-2005 09:38
You are talking about a spherical projection onto a plane - specifically you want: http://mathworld.wolfram.com/CylindricalProjection.htmlI have a texture of Earth that maps quite nicely onto a sphere as a globe. This page looks interesting, but I'm not sure how well it would work for making a SL texture. http://www.vendian.org/mncharity/dir3/planet_globes/
_____________________
Some people are like Slinkies... not really good for anything, but they sure bring a smile to your face when you push them down the stairs.
|
Barbarra Blair
Short Person
Join date: 18 Apr 2004
Posts: 588
|
03-15-2005 09:46
Has anyone created a photoshop mesh to do this? Just asking.
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
03-15-2005 09:50
[/url] Whoa, that's too much math for me. If you can make sense of all that, more power to ya, but those who are dedicated enough to both art and trigonometry to figure out how to turn one into the other are quite rare (which is why people are still studying DaVinci centuries later). I think the average SL'er is smart enough to understand both, but combining them in practice is an entirely different story. For my part, at least, I don't have the patience for that. I'd rather just play with paint, let intuition be my guide, and hope it all works out with minimal trial and error (which it usually does).
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
Spider Mandala
Photshop Ninja
Join date: 29 Aug 2003
Posts: 194
|
03-15-2005 10:29
_____________________
"There's an old saying in Tennessee, I know it's in Texas, probably in Tennessee, that says, fool me once... shame on... shame on you. You fool me, you can't get fooled again." -George W. Bush East Literature Magnet School, Nashville, Tennessee, Sep. 17, 2002
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
03-15-2005 13:39
Spider, the polar coordinates filter works fairly well if you have a relatively uniform texture to work with, like that denim texture in you example. However, it has a tendency to lose whole sections of the image. To go back to the map/globe example, you're likely to have a country or two disappear on you as the filter redraws the map to try (and I emphasize TRY) to compensate for 3-dimensional wrapping. But, since all Photoshop really understands is 2 dimesions, it has problems. If all you've got in your map is ocean, then the filter does work well enough that you likely won't notice what's missing. Add land, trees, cities, etc. into the mix though, and you'll quickly see much of it devoured. Unfortunately there's no perfect solution.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
Spider Mandala
Photshop Ninja
Join date: 29 Aug 2003
Posts: 194
|
03-16-2005 10:04
From: Chosen Few Spider, the polar coordinates filter works fairly well if you have a relatively uniform texture to work with, like that denim texture in you example. However, it has a tendency to lose whole sections of the image. Add land, trees, cities, etc. into the mix though, and you'll quickly see much of it devoured... Unfortunately there's no perfect solution. From: Ace Cassidy that would distort a flat image so that when it is placed on a sphere, the "sqishiness" that is at the poles is compensated for. Specifically, how would I create a texture to place on a sphere that would be the seams on a baseball? Are there any filters that can do this?
Yeah.... all those trees and mountains on baseballs these days... I guess I remember the old days where the vast majority of a baseball was white.... my bad.
_____________________
"There's an old saying in Tennessee, I know it's in Texas, probably in Tennessee, that says, fool me once... shame on... shame on you. You fool me, you can't get fooled again." -George W. Bush East Literature Magnet School, Nashville, Tennessee, Sep. 17, 2002
|
Aimee Weber
The one on the right
Join date: 30 Jan 2004
Posts: 4,286
|
03-16-2005 12:22
Another solution you may want to look into is called Texture Maker. It features a lot of useful transforms including sphere wrappping. I think they still offer a trial version: http://www.i-tex.de/
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
03-16-2005 12:50
From: Spider Mandala Yeah.... all those trees and mountains on baseballs these days... I guess I remember the old days where the vast majority of a baseball was white.... my bad. Spider, calm down, buddy. No need for the sarcasm. I know you are smart enough to realize that I was using a metaphor. "Trees and mountains" were an example to demonstrate non-uniform details that WILL be lost when you use the polar coordinates filter. The point is the filter will certainly work for something with as much blank space as a baseball, but for anything complex it's not a real good idea. When I answer how-to's I try to make sure I never give a quick-fix solution that will only work in some situations, but a universally reaching answer that will work in almost every situation. To me, filters almost never fit the bill for that. If you disagree, then please educate me as to how you're able to not lose sections of your image with that filter. There are a million ways to accomplish any given task in Photoshop, and if you know something I don't, I'm all ears, but kindly refrain from the sarcastic snap-backs when I try to offer advice that may be different from yours.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
Spider Mandala
Photshop Ninja
Join date: 29 Aug 2003
Posts: 194
|
03-16-2005 21:15
you know.. i wrote about three versions of this post to defend myself.. and then I decided Im not going to feed the troll because I dont need to defend myself.
For those reading this that are actually interested in mapping spheres, I'll work on tweaking the polar coords thing to be less lossy but I doubt it will be, its a simple method for simple textures. Guess I shouldve put a warning label on it.
_____________________
"There's an old saying in Tennessee, I know it's in Texas, probably in Tennessee, that says, fool me once... shame on... shame on you. You fool me, you can't get fooled again." -George W. Bush East Literature Magnet School, Nashville, Tennessee, Sep. 17, 2002
|
Aimee Weber
The one on the right
Join date: 30 Jan 2004
Posts: 4,286
|
03-17-2005 05:31
I didn't consider Chosen's post as trolling. He was giving additional information about texturing spheres, beyond the original poster's question, and you flipped out spider.
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
03-17-2005 10:21
Thanks for the support, Aimee.
Anyway, Spider, you are correct that you don't need to defend yourself. You were never attacked.
The original poster asked for advice, and we both gave it. Our two methods differed, and then I responded simply by offering some additional information in regard to the method you mentioned. That's it. Why you felt the need to take that as a personal attack is beyond me. That was certainly not the intent.
Please rephrain from calling me a troll. Unless the definition of the word has changed in the last 24 hours, I fail to see how offering direct factual information in response to a how-to question can be referred to as "trolling". I thought I was trying to help. I'm sorry if you didn't see it that way, but I suppose it's your perogative to view whatever you want in any way you choose.
Now that that's out of the way, if you do somehow manage to figure out how to get that filter to not delete portions of the viewable image, please let us all know. On behalf of the world at large though, I must ask that if someone then responds with additional information, please do him or her the courtesy of reading it for what it is without trying to warp it into some kind of imaginary offense. I think that's enough said.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
Spider Mandala
Photshop Ninja
Join date: 29 Aug 2003
Posts: 194
|
03-20-2005 16:04
From: Chosen Few Spider, the polar coordinates filter works fairly well if you have a relatively uniform texture to work with, like that denim texture in you example. ... blah stuff... If all you've got in your map is ocean, then the filter does work well enough that you likely won't notice what's missing. See here, dont adress ME to tell me how my filter works, thanks. From: Chosen Few On behalf of the world at large though, I must ask that if someone then responds with additional information, please do him or her the courtesy of reading it for what it is without trying to warp it into some kind of imaginary offense. I think that's enough said. Yeah lemme just kneel down here and apologize. I felt offended and thus voiced my offense. My post was letting it drop in the thoughts that maybe I didnt need to defend myself. But here, again you bring it up.. so I can play flame war all you want. If you want it to de-escalate.. stop bringing it back up. Oh and aimee, you not helpin'. See I like playing "have the last word" so we can keep going back and forth forever if you want. 
_____________________
"There's an old saying in Tennessee, I know it's in Texas, probably in Tennessee, that says, fool me once... shame on... shame on you. You fool me, you can't get fooled again." -George W. Bush East Literature Magnet School, Nashville, Tennessee, Sep. 17, 2002
|
Aimee Weber
The one on the right
Join date: 30 Jan 2004
Posts: 4,286
|
03-20-2005 23:02
From: Spider Mandala See here, dont adress ME to tell me how my filter works, thanks. Yeah lemme just kneel down here and apologize. I felt offended and thus voiced my offense. My post was letting it drop in the thoughts that maybe I didnt need to defend myself. But here, again you bring it up.. so I can play flame war all you want. If you want it to de-escalate.. stop bringing it back up. Oh and aimee, you not helpin'. See I like playing "have the last word" so we can keep going back and forth forever if you want.  You can have the last word. Fine with me. Just calling it the way I see it. Have your last word now spider.
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
03-22-2005 10:45
From: Spider Mandala See here, dont adress ME to tell me how my filter works, thanks. Funny, I thought it was Adobe's filter. Sorry, did you invent it for them? Anyway, in all seriousness, I've always been under the impression that sharing additional information about techniques, tips, etc. is how we all learn and grow. The moment any of us start to believe we've got anything 100% figured out is the moment we get left behind in the dust by those who have fresher, more open minds. This is true for anything from Photoshop to athletics to engineering to communications to literally anything. We're all here on this planet to learn from eachother. Now, to address your concern about my addressing you directly, I'm not sure why it's a problem to do so, but I'm happy to explain why I did. The reason is simple; you were the one who brought it up. Here, as in all discussions, the only appropriate person to whom one should respond in regard to a particular topic is the one who introduced the topic in the first place. From my point of view, responding to you directly was the POLITE and proper thing to do. Would you really have prefered that I had just ignored you and pretended that you were not a part of the conversation? Where I come from, that would be considered the height of impolinteness. From: Spider Mandala Yeah lemme just kneel down here and apologize. I felt offended and thus voiced my offense. My post was letting it drop in the thoughts that maybe I didnt need to defend myself. But here, again you bring it up.. so I can play flame war all you want. If you want it to de-escalate.. stop bringing it back up. Oh and aimee, you not helpin'. See I like playing "have the last word" so we can keep going back and forth forever if you want.  Thank you for the apology, and let me once again apologize to you if I inadvertantly offended you somehow. Once again, that was never my intent. In the spirit of our new-found understanding, I would like to respond to something you said, "But here, again you bring it up." I believe that you are intelligent and mature enough to understand that I didn't "bring it up." You made some pretty bold accusations towards me, which to me said there must be a misunderstanding, and that I'd better try to straighten things out. I fail to understand how I could accomplish that without responding directly, and I don't think that can really be defined as "bringing it up". A much more acurate definition would be "setting the record straight", a task which is impossible without first referencing the existing record. So, you've got me really confused here. On the couple of occasions I've run into you in world, you've seemed to be a decent enough fellow, but here it seems like I have to tread on pins and needles around you. If I use your name in response to something you said, it somehow offends you to be directly addressed. If I attempt to clear up a misunderstanding by trying to explain how the things you perceived as attacks were in fact nothing of the kind, you imply I've attacked you for a second time by repeatedly "bringing it up". Maybe it's not your intent, but the message you're sending shouts, "When Spider posts, all shall listen. Direct responses will not be tolerated. Additional information is unwelcome, as Spider's word is perfect." I really hope that's not the message you're intending to send. I doubt that it is. I know you're better than that. However, it is the message that's being received, and I'm hoping that making you aware of that will be of benefit. I'm sincerely hoping you'll take what I've said to heart. It would be a shame to think that we can't communicate like rational adults. Let me state one more time for the record, I never attacked you, I have no wish to attack you, I have absolutely no desire to "play flame war", and if you can't see that then I sicerely feel sorry for you. Now, if you feel compelled to "play have the last word", then that's you're perogative. I just hope you'll make something positive out of it.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
Spider Mandala
Photshop Ninja
Join date: 29 Aug 2003
Posts: 194
|
03-23-2005 09:49
From: Chosen Few Funny, I thought it was Adobe's filter. Sorry, did you invent it for them?
Here, as in all discussions, the only appropriate person to whom one should respond in regard to a particular topic is the one who introduced the topic in the first place.
Thank you for the apology, and let me once again apologize to you if I inadvertantly offended you somehow. Once again, that was never my intent.
No I didnt invent the filter obviously, but the method is more then just applying the Polar coordinates, I havent seen another tutorial quite like this online therefore I claimed it. As for why I felt it innapropriate for you to adress me directly, yes, the thing to do is to reply to the person who introduced the topic. I didn't start this topic. If you had made that post in the tutorial's thread my response would have been: "yeah my bad, I should have mentioned that". Now, anyone going to use that tutorial wont have the commentary you made unless they also check this thread. The way you posted it in this thread made it feel like a dismissal which I consider more rude than ignoring me. Anyway, now Ill give a real apology for being defensive with the hopes that you can understand why I was offended.
_____________________
"There's an old saying in Tennessee, I know it's in Texas, probably in Tennessee, that says, fool me once... shame on... shame on you. You fool me, you can't get fooled again." -George W. Bush East Literature Magnet School, Nashville, Tennessee, Sep. 17, 2002
|
didier Dragonfly
Registered User
Join date: 2 Sep 2004
Posts: 6
|
03-24-2005 10:53
From: Barbarra Blair Has anyone created a photoshop mesh to do this? Just asking. i found a FREE PS plugin to adjust the square texture for a sphere mapping: http://photoshop.pluginsworld.com/plugin.php?editor=adobe&software=photoshop&plugin=224&plug=sphericalmappingcorrectorHave fun
|
Spider Mandala
Photshop Ninja
Join date: 29 Aug 2003
Posts: 194
|
03-24-2005 17:17
Well, hot damn awesome, thanks didier.
_____________________
"There's an old saying in Tennessee, I know it's in Texas, probably in Tennessee, that says, fool me once... shame on... shame on you. You fool me, you can't get fooled again." -George W. Bush East Literature Magnet School, Nashville, Tennessee, Sep. 17, 2002
|