New add on, more n00bish problems

Post requests, images, descriptions and reports about work in progress here.
Topic author
Hunter Parasite
Posts: 265
Joined: 18.09.2005
With us: 19 years 6 months
Location: CT

New add on, more n00bish problems

Post #1by Hunter Parasite » 10.09.2006, 01:18

i am making another solar system to go along with my book, and i cant display my own textures. I can show other textures but not ones i made. Trying to fix the problem, I made my textures to the same parameters as the others, in this case, jupiter. I made them the same size, same filetype, but it just won't work. If there is a problem with my coding, im too much of an idiot to see it.



Code: Select all

"Serynyx" "Xarynyx"
{
Class "Planet"
Texture      "Serynyx.*"
Radius 1700

EllipticalOrbit {
   Period   4.9
   SemiMajorAxis   0.9
                 }

RotationPeriod   30
Albedo      0.40

HazeColor [ 0.5 0.35 0.2 ]
   HazeDensity 0.35
   Radius 6052

   Atmosphere {
      Height 60
      Lower [ 0.0 0.9 0.9 ]
      Upper [ 0.8 0.8 0.8 ]
      Sky [ 0.0 0.7 0.7 ]
CloudHeight 30
      CloudSpeed 300
      CloudMap "SerynyxCloud.*"     
                }
}

Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 7 months

Post #2by Malenfant » 10.09.2006, 01:51

The code looks OK... I suspect the problem is that you're putting the textures in the wrong place. What directory are you putting the textures into? Does the celestia.cfg file point to the right Extras directory?

I think the default texture directory for Celestia (in windows) is C:/Program Files/Celestia isn't it? In there should be a folder called Textures. If you store your textures in there then they should be in the Medres folder.

However, it's generally better to store your own custom addons in the Extras directory. On line 153 of celestia.cfg (which is in the Celestia root directory, and can be edited with notepad) you should see an entry called ExtrasDirectories - that's where you define where your own textures and custom sscs and so on are.

For example, my extras directory is on my D:/ drive, in a folder called d:/celestia/extras, so in my celestia.cfg file this line says:

Code: Select all

 ExtrasDirectories  [ "d:/celestia/extras" ]


So you could make a folder within this called "MyAddon" and put your textures in there. I think you need any sscs and stcs in the root Extras directory, but someone else can correct me there if I'm wrong.
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Topic author
Hunter Parasite
Posts: 265
Joined: 18.09.2005
With us: 19 years 6 months
Location: CT

Post #3by Hunter Parasite » 10.09.2006, 01:58

what i usually do is in the folder for the addon, I have another folder for textures, then one for medres textures.

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 19 years 3 months

Post #4by Chuft-Captain » 10.09.2006, 11:02

Wherever your extras folder is (as advised above)....

1. create a folder called say "MyAddons"
2. create a folder called say "MySolarSystem"
3. Put the SSC in this folder.
4. Then... create subdirectories "models", "scripts", "textures", etc also in this directory.
5. Create a folder in "textures" folder called medres.
Put the textures here (and make sure they're powers of 2 in size, and check that they have the right file extension .JPG, .JPEG, .BMP, or .PNG)

The general rule is the SSC should be at the same level as the "models", "textures", etc folders.

Whenever you create a new addon, create a new folder for it in "MyAddons" and follow the same structure as above.

Also, check you haven't got any conflicts. ie. Make sure it's not created in a second SSC somewhere else which is also being loaded by Celestia. If so, disable one of them.


Code: Select all

extras
.....MyAddons
     .....MySolarSystem (put SSC here)
          .....models (put models here)
          .....scripts  (put scripts here)
          .....textures
               .....hires
               .....lores
               .....medres  (put textures here)

       .....My2ndSolarystem
            .....models
            etc....

"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

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

Post #5by selden » 10.09.2006, 12:45

Chuft-Captain wrote:Put the textures here (and make sure they're powers of 2 in size, and check that they have the right file extension .JPG, .JPEG, .BMP, or .PNG)


BMP should not be used.

My understanding is that BMP is an extremely complicated standard and Celestia's BMP interpreter implements only a very tiny fraction of it.

Also, Celestia's wildcard feature does not look for any BMP files. It only looks for CTX, PNG, JPG and DDS surface texture image files, in that order. (CTX files are proprietary to Celestia. They contain pointers to tiles for implementing Celestia's Virtual Textures.)
Selden

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 19 years 3 months

Post #6by Chuft-Captain » 10.09.2006, 13:58

selden wrote:BMP should not be used.
Sound advice. I don't mean to advocate use of BMP's. (They're too large for a start off). Just trying to give some file extensions which would at least work! :)
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

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

Post #7by selden » 10.09.2006, 14:04

CC,

not a problem :)

Unfortunately, quite a few 3D modellers use BMP format for the surface textures of models intended for markets other than Celestia.

Celestia can give you some idea of what such models might have been intended to look like, but they certainly won't be shown to their best advantage.

However, surface textures should be designed using some non-lossy image format like BMP, TIFF, TGA or PNG, but only this last can be used by Celestia. The others have to be converted first (which is easy enough to do). Images stored in JPG and DDS formats have had their resolutions damaged (reduced) in order to minimize their file sizes. Those two formats should only be used for the final images. If they're used for intermediate "working" images, a lot of detail will be lost along the way.
Selden

Topic author
Hunter Parasite
Posts: 265
Joined: 18.09.2005
With us: 19 years 6 months
Location: CT

Post #8by Hunter Parasite » 10.09.2006, 15:44

i usually do this,

Code: Select all

Celestia
..Extras
....Xarynyx(Name of the addon)
......STC/SCC files
........Textures
..........Medres


And i put all my textures in medres.
I did this exact same thing for my torzhakt system and that one works fine.

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 19 years 3 months

Post #9by Chuft-Captain » 11.09.2006, 00:17

I note that your folders are capitalized...I don't know what OS you use, but this may be significant.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Topic author
Hunter Parasite
Posts: 265
Joined: 18.09.2005
With us: 19 years 6 months
Location: CT

Post #10by Hunter Parasite » 11.09.2006, 22:55

Thats just how I write, but the Textures folder is capitalized. I'll try changing it. Though I did the same thing on my other mod...


Return to “Add-on development”