Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

texture on a sphere,help,please

Joseph Brinner
Registered User
Join date: 29 Dec 2008
Posts: 81
02-06-2010 09:24
I made a very nice texture for my dance ball,but when applied its all deformed,played with repeats and such,no luck,I wanna have the texture on it,would be nice to have it scroll around ball on a horizontal plane,can anyone help me,do i need a script to do this or some magical trick in the repeats on the texture?
Peggy Paperdoll
A Brat
Join date: 15 Apr 2006
Posts: 4,383
02-06-2010 10:02
Yes, you will need a script to make your texture scroll around your sphere. But I'm reading another issue you may be having too. That has nothing to do with scripts. A flat texture wrapped around a shere will distort as it's stretched and "folded" to cover the surface of the sphere or ball. You have to create or alter your texture to incorporate that distortion...........you would need to do that with a third party imaging program. Preferrably and 3D program. Photoshop will do it and so will GIMP. I'm not sure Paint Shop Pro will but I wouldn't ge surprise if it could. I'm not expert enough to tell you how to do it.....though I can do with GIMP. However, a 3D imaging program would be the choice of the pros I think.
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
02-06-2010 10:33
How do you do it in Gimp, Peggy? Some hints?
Peggy Paperdoll
A Brat
Join date: 15 Apr 2006
Posts: 4,383
02-06-2010 10:39
In the main image editing window Filters > Distorts > Polar coordinates. The default is map from top and map to polar. Uncheck "map to polar".

That's after you've created your texture as a flat texture.
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
02-06-2010 10:50
Holy moly, that easy??? Kewl!!!

/me stares at Gimp and tries to remember ....
.
Peggy Paperdoll
A Brat
Join date: 15 Apr 2006
Posts: 4,383
02-06-2010 10:52
I was surprised too......God, I love my GIMP book. :)
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
02-06-2010 10:53
From: Peggy Paperdoll
I was surprised too......God, I love my GIMP book. :)

.... called?
Peggy Paperdoll
A Brat
Join date: 15 Apr 2006
Posts: 4,383
02-06-2010 10:55
"Beginning GIMP from Novice to Professional".........Akkana Peck. I got it at Amazon.com a couple years ago for $30 USD.
Joseph Brinner
Registered User
Join date: 29 Dec 2008
Posts: 81
02-06-2010 11:49
Peggy,I use gimp 2.6,tried the filter/distort idea,now its totally messed up,what did i do wrong
Peggy Paperdoll
A Brat
Join date: 15 Apr 2006
Posts: 4,383
02-06-2010 11:55
I hope you worked on a copy. But the undo is pretty deep..........over a hundred operations that I've noticed.

What do you mean it's messed up? The texture will look really odd when you see it as the flat image. But will put on a sphere in-world all that distortion will corrected due to the shape of the sphere. Think of all those world maps you saw in grade school. When they were cut and spread out to lay on a flat surface they were distorted and gave a unreal looking picture of how the world map actually was........on the globe this looked perfect.
Joseph Brinner
Registered User
Join date: 29 Dec 2008
Posts: 81
02-06-2010 11:57
the image is more distorted after using the filter
Peggy Paperdoll
A Brat
Join date: 15 Apr 2006
Posts: 4,383
02-06-2010 12:00
From: Joseph Brinner
the image is more distorted after using the filter


This after applying the textur to the sphere in-world?
Joseph Brinner
Registered User
Join date: 29 Dec 2008
Posts: 81
02-06-2010 12:03
yes put on a stock,fresh rezzed prim sphere
Joseph Brinner
Registered User
Join date: 29 Dec 2008
Posts: 81
02-06-2010 12:15
I passed you the stock image in full perm in SL, in state prior to trying the filter
Peggy Paperdoll
A Brat
Join date: 15 Apr 2006
Posts: 4,383
02-06-2010 12:29
Without seeing what you are experiencing I'll try to briefly outline what I would do. I'm going to make a simple text texture on a plain background saying "Dance Ball"

Start with your canvas. Open > new. Define your size.....I'll use 256 x 256 and then okay to load it into your editing window. Choose your back color on your color palet...say bright green. Use the bucket fill to color your background. Then click your text tool, choose your font and size of the font you want and the color by changing the palet color.....lets make the receprical of green which is pink. The type in "Dance Ball". That will put a floating layer above your background.........center the text on the image. Then "anchor" that layer to the background. Next duplicate that layer "Layer" menu > duplicate layer (this is insurance in case you screw up). You can hide the orginal layer to make it easier to know for sure your working on the duplicate layer and not the original (just sometime I do since I've wound up getting all wrap around the axle working a layer I did not intend to work on). Now, go to the "Filters" menu > distorts > polar coordinates. There are three boxes to check or uncheck in the dialog that opens............"map backward", "map from top", and "map to polar". The default selections are "map from top" and "map to polar". Leave the "map backward" unchecked (unless you want to flip your text to read backward), leave the "map from top" checked (again, unless you want the text to be flipped upside down), and uncheck the "map to polar" (mapping to polar gives a flat image that is made into a circle..........and in this case you don't want that). Now all you have to do is save as you normally would.......such as TGA. Make sure when the dialog pops up telling that TGA images do not support layers, offsets, etc to export instead that you check the box to "flatten image" instead of the default "merge"......... (GIMP defaults to merge if when for any reason you have added an alpha channel or started with an image already containing and alpha channel). Of course, if you need or want the transparency in your texture leave it at the default.

Upload and try it. I know it works.........quite well in fact. :)
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
02-06-2010 13:07
There are several threads on this topic in the forum's archives ---- so long as we have access to the archives... :eek: --- so you'll find some nice discussion if you search on the keyword "sphere." One of the most recent times this question came up was in , which you ought to take a look at.

As for scrolling the text around the equator of your ball..... If I were you, I would create a second prim, a squatty cylinder with a diameter slightly larger than your sphere. Center both prims at the same point. Then, create a texture that has the words of your scrolling message on it, and apply that texture to the cylinder. So far, you should have a ball that has a "belt" around its equator, with words on it. All you need to do to finish the job is animate the words. Do that by editing the cylinder (Edit that prim ONLY!), opening its contents, and dropping this script in ....

CODE
 // Don't include the 
CODE
 tag.  It's for forum formatting only  ;) 
default
{
state_entry()
{
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP , 1, 1, 1, 1, 1, 1);
}
}
// Don't include this tag either.

That's it. If you make a mistake and put the script in the ball, all is not lost. To make it stop, replace the script with this ...

CODE
 // Again, don't include the 
CODE
 tag.   
default
{
state_entry()
{
llSetTextureAnim(FALSE | SMOOTH | LOOP , 1, 1, 1, 1, 1, 1);
}
}
// Don't include this tag either.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at