Gas giant textures by me

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
BreadMan
Posts: 12
Joined: 05.03.2002
With us: 22 years 8 months
Contact:

Gas giant textures by me

Post #1by BreadMan » 05.04.2002, 06:52

I've been doing some generic textures to add variety to the extrasolars in Celestia, and figured I might as well share them. You can view them all here http://www.ecst.csuchico.edu/~breadman/celestia/ or download them as a zip http://www.ecst.csuchico.edu/~breadman/celestia/gasgiants.zip

Any feedback would be welcome.

--BreadMan

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #2by Rassilon » 05.04.2002, 08:32

Very nice...I especially like the tidal tex...

I did one based around this artists rendition...

http://www.jtwinc.com/Extrasolar/usage/sceneuAndb.jpg

Heres mine in Celestia (Ups And)

http://cybermindtraveller.freewebspace.com/pics/upsand.jpg
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Sum0
Posts: 273
Joined: 10.03.2002
With us: 22 years 8 months
Location: Norwich, UK

Post #3by Sum0 » 05.04.2002, 13:56

On the subject of textures, is there some way in GIMP to distort a planetary texture so it looks right on a sphere? I've made some terrestial planet textures but they look squashed up at the poles.
"I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."

Mad Boris
Posts: 50
Joined: 03.04.2002
With us: 22 years 7 months
Location: Cardiff, UK

Post #4by Mad Boris » 05.04.2002, 14:59

I like all of the textures, but is there a quick way of using them ? It would be nice if the extrasolar file could pick a texture at random for certain (or all) extrasolar planets from a specific directory - I don't suppose that's possible, is it ? To be honset I'm just too lazy to go through the file replacing every single texture.... or am I being very silly and missing something obvious ?

Matt McIrvin
Posts: 312
Joined: 04.03.2002
With us: 22 years 8 months

Squashed up at the poles

Post #5by Matt McIrvin » 05.04.2002, 22:46

Sum0 wrote:On the subject of textures, is there some way in GIMP to distort a planetary texture so it looks right on a sphere? I've made some terrestial planet textures but they look squashed up at the poles.


I don't know, but a rough-and-ready procedure would be to first paint things like landmarks or cloud features with ordinary proportions, then stretch them out in the longitudinal direction by a factor of the secant of the latitude (and then retouch them manually, most likely).

Sum0
Posts: 273
Joined: 10.03.2002
With us: 22 years 8 months
Location: Norwich, UK

Post #6by Sum0 » 06.04.2002, 13:22

Sorry to sound rude, but what does that mean?
"I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #7by Rassilon » 06.04.2002, 16:46

Sum0 wrote:On the subject of textures, is there some way in GIMP to distort a planetary texture so it looks right on a sphere? I've made some terrestial planet textures but they look squashed up at the poles.


Sum0,

I do not think there is a conventional way to avoid texture squishing at the poles...Though you could try stretching the texture a bit on the tops and bottoms to see if this will reduce that effect...But then I could see it not changing it one bit due to the fact the software model renders those 'fingers' on top which will look that way no matter how the texture is manipulated...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Matt McIrvin
Posts: 312
Joined: 04.03.2002
With us: 22 years 8 months

Explaining the math...

Post #8by Matt McIrvin » 06.04.2002, 17:07

Sum0 wrote:Sorry to sound rude, but what does that mean?


The planetary textures are, I believe, specified as latitude-longitude grids. In other words, a distance on the texture in pixels corresponds to a certain number of degrees of latitude or longitude.

Now, approximating a planet as a sphere, an interval in latitude in the north-south direction always corresponds to the same distance

r * angle * (pi/180)

where r is the radius of the planet and the angle is the latitude difference in degrees.

But this is not the case for longitude. There is an extra factor. A difference in longitude in the east-west direction corresponds to a distance

r * angle * (pi/180) * cos (latitude)

where cos is the cosine, the thing that the cos button on a scientific calculator gives you.

Now the cosine is 1 at the equator, but it approaches 0 at the poles. So things get squnched together at the poles.

To compensate, you'd have to draw surface features stretched out by an inverse factor. How much is that? Well, a fancy name for the reciprocal of the cosine is the secant:

1/cos(latitude) = sec(latitude)

If your calculator doesn't have a "sec" button you can just as easily get it as 1 divided by the cosine.

If something is drawn on the texture as sec(latitude) times as wide as it is tall, then when mapped to the sphere it will look just as wide as it is tall.

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #9by Rassilon » 06.04.2002, 17:34

Thats all fine and dandy, but how can someone impliment this in something like Adobe Photoshop or the Gimp for that matter? All of that you are stating...I would have to write a C program to manipulate the texture in such a way and well frankly...too much work ;)

So is there a painting program that can use geometry to displace a texture?? If so I would be interested in it...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Matt McIrvin
Posts: 312
Joined: 04.03.2002
With us: 22 years 8 months

Manual stretching

Post #10by Matt McIrvin » 06.04.2002, 17:51

Rassilon wrote:Thats all fine and dandy, but how can someone impliment this in something like Adobe Photoshop or the Gimp for that matter? All of that you are stating...I would have to write a C program to manipulate the texture in such a way and well frankly...too much work ;)


Not necessarily-- I was imagining approximating this in any editor that lets you resize rectangles, with some manual labor. After all, if it's an imaginary planet you don't have to be terribly precise. You paint a little strip of the landscape, select a rectangle, then stretch it out and retouch it, then repeat somewhere else...

Labor-intensive, yes, but no coding is involved.

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Manual stretching

Post #11by Rassilon » 06.04.2002, 18:04

Matt McIrvin wrote:
Rassilon wrote:Thats all fine and dandy, but how can someone impliment this in something like Adobe Photoshop or the Gimp for that matter? All of that you are stating...I would have to write a C program to manipulate the texture in such a way and well frankly...too much work ;)

Not necessarily-- I was imagining approximating this in any editor that lets you resize rectangles, with some manual labor. After all, if it's an imaginary planet you don't have to be terribly precise. You paint a little strip of the landscape, select a rectangle, then stretch it out and retouch it, then repeat somewhere else...

Labor-intensive, yes, but no coding is involved.


Sorry Matt, I have a hard time visualizing it without some sort of visual example I guess...

I know your math is correct but I am wondering too, how would I go about selecting these rectangles as you state? Would it mesh with the sphere as its flattened in a perspective view? I suspect the texture would resemble something like the Rand McNally flattened atlas of the globe in the end? Well depending on how the segments of the sphere mesh together at the poles...I believe the model Chris uses is about a 32-64 segment sphere...The spines in that case that would jut out at either end when flattened would be in the count of 18-24 with a very rough guestiment...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

The Clickman
Posts: 28
Joined: 02.02.2002
With us: 22 years 9 months
Location: France
Contact:

Animated Texture for Giant Gas ?

Post #12by The Clickman » 07.04.2002, 07:26

:idea: Asking myself if it's possible to make some animated texture like some animated GIF (somethink like this, but don't know if this will be possible with GIF cause of color limitation...) for Giant Gas...

For example, to watch the red spot on Jupiter with a rotation and a movment when syncing orbit with this planet...

Or to see clouds movment, cyclone or many others atmosphere movment when looking earth and some others planets with clouds ! :-)

If something like this will be possible ?

Thanks to Chris and all others who work on Celestia, it's really beautiful ! :-))

Sum0
Posts: 273
Joined: 10.03.2002
With us: 22 years 8 months
Location: Norwich, UK

Manual stretching

Post #13by Sum0 » 07.04.2002, 09:12

Matt McIrvin wrote:
Rassilon wrote:Thats all fine and dandy, but how can someone impliment this in something like Adobe Photoshop or the Gimp for that matter? All of that you are stating...I would have to write a C program to manipulate the texture in such a way and well frankly...too much work ;)

Not necessarily-- I was imagining approximating this in any editor that lets you resize rectangles, with some manual labor. After all, if it's an imaginary planet you don't have to be terribly precise. You paint a little strip of the landscape, select a rectangle, then stretch it out and retouch it, then repeat somewhere else...

Labor-intensive, yes, but no coding is involved.

I can sort of see what Matt's getting at... so I'll try it.

As for animated gas giants, i've written about it in the topic "Animated Gas Giants" in the Development forum.
"I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."

Topic author
BreadMan
Posts: 12
Joined: 05.03.2002
With us: 22 years 8 months
Contact:

Post #14by BreadMan » 07.04.2002, 21:22

Let me try and add to the discussion:

Image
Image
Image

Now mostly all I've messed with is gas giants which are relatively simple to texture, but here's a few observations.
The top and bottom 5-10% of the texture will become "pinched" at the poles, so its best to leave these parts very simply textured if not just a flat color.
The next 10% below/above that 10%, or the top and bottom 20% of the texture, (about where the horizontal lines are in the above images) is where most of the warping occurs. Rather than try and describe it I think I'll just leave it in a "picture says a thousand words" sort of sense. Basically, you need to stretch stuff out a lot, as should be obvious. Photoshop has a "skew" tool that is particularly handy in this case, I'm afraid I don't have much experience with other software but I would think there's something similar. Anyway, I'd suggest studying some of the default textures to get a better feel for it, I would think europa and phobos are probably the best examples.

Topic author
BreadMan
Posts: 12
Joined: 05.03.2002
With us: 22 years 8 months
Contact:

Post #15by BreadMan » 07.04.2002, 21:28

Mad Boris wrote:I like all of the textures, but is there a quick way of using them ? It would be nice if the extrasolar file could pick a texture at random for certain (or all) extrasolar planets from a specific directory - I don't suppose that's possible, is it ? To be honset I'm just too lazy to go through the file replacing every single texture.... or am I being very silly and missing something obvious ?


I'm afraid not, unless someone decides to write a quick texture-replacement program. I think once I get to about 20 or so good textures (if I don't get tired of it before then) I'll go ahead and post up a whole modified extrasolar.ssc implementing all of them and maybe adding some rings and such.

Sum0
Posts: 273
Joined: 10.03.2002
With us: 22 years 8 months
Location: Norwich, UK

Post #16by Sum0 » 08.04.2002, 20:17

As for the texture stretching, in GIMP i can just paint some surface object in a 256x256 window, then change the image size to something wider/taller, which seems to work.
"I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."


Return to “Development”