jpg problem

General discussion about Celestia that doesn't fit into other forums.
Topic author
jrr

jpg problem

Post #1by jrr » 15.02.2004, 22:08

Hi there,
Could somebody tell me why some jpg textures will load and others don't.
I downloaded some textures of mars and earth and some don't show up on the planet. I checked the ssc file and the name of the file under altsurface was correct. Please help...

Thanks

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 22 years

Post #2by granthutchison » 15.02.2004, 22:12

Do your jpg's all have sides that are a power-of-two pixels long? If not, Celestia won't show them. So you'll need to rescale to 512x256, or 1024x512, or 2048x1024, etc.

Grant

Topic author
jrr

Post #3by jrr » 15.02.2004, 22:21

Just had a look. They are ok: 1024x512, so that's not the prob.

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 22 years

Post #4by granthutchison » 15.02.2004, 22:25

Is the name of your defined alternate surface appearing in the Alternate Surface menu when you right-click on the object of interest? If not, I think you might have a syntax error in the AltSurface definition. If the alternate surface name is there but you're coming up with a white sphere when you select it, then Celestia is having trouble finding the correct texture, for some reason.

Grant

Topic author
jrr

Post #5by jrr » 15.02.2004, 22:38

The name appears in the Alternate Surface menu and yes i'm getting a white sphere. I did convert the jpg to a dss just to check, and it showed up as a texture map. But the jpg....

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 22 years

Post #6by granthutchison » 15.02.2004, 22:45

OK, where have you made the AltSurface statement, and where have you put the texture?
If you've edited solarsys.ssc with the AltSurface statement, then your texture needs to be in the main Celestia textures/medres directory. If you've created the AltSurface in a little add-on ssc, then the usual thing would be to place the associated texture in the same directory tree, so you'd have something that looked like:

Code: Select all

extras\
  myaddon\
     myaltsurface.ssc
     textures\
        medres\
            mynewtexture.jpg


Grant

Topic author
jrr

Post #7by jrr » 15.02.2004, 22:53

Great, thank's a lot that's solved!!!

Buuuuuut what is the problem when I see a black sphere after I put a high resolution map in the hires folder and switch to high resolution?

Mikeydude750
Posts: 169
Joined: 31.01.2002
With us: 22 years 9 months
Location: Wisconsin

Post #8by Mikeydude750 » 16.02.2004, 04:20

What graphics card do you have?

It's possible that you might not have enough video memory, and the texture can't be displayed...

Topic author
jrr

Post #9by jrr » 16.02.2004, 07:51

I have an old Nvidia GForce2 MX 32Mb.
But then again, why can I display the converted dss file and not the jpg?
Something to do with compression and memory ?

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #10by selden » 16.02.2004, 11:32

jrr,

The most common problem is trying to use a surface texture image that's the wrong size. It has to be a power of two on a side (e.g. 1024x512).

Also, you haven't mentioned how big the image is. A JPEG or PNG has to fit in the memory of your graphic card after it has been fully expanded along with all of the other images you've previously looked at. A 1024x512 JPEG, for example, requires 1024x512x4 bytes = 2MB of grahics memory. In contrast, a DDS texture only needs as much room in graphics memory as it occupies on disk.
Selden

Topic author
jrr

Post #11by jrr » 16.02.2004, 12:24

The file size is 4096x2048 pixels and the uncompressed file size= 24 Mb
With all the other textures loaded of Celestia I guess it's a limitation of my card ?

Thank's for your help

J?rgen

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #12by selden » 16.02.2004, 12:32

An uncompressed 4Kx2K image simply can't fit into the memory of your card. Don't forget that the memory is used for other functions, too, like the Z buffer. You can either convert the image to DDS format, or you can upgrade to a card with more memory. (A 128MB FX 5200 is about US$ 85.)
Selden

Topic author
jrr

Post #13by jrr » 16.02.2004, 14:27

Ok, thanks for the information.
We can close this thread now I think.


Return to “Celestia Users”