__________________________________________________ |
_ |
[back to Contents]
0.0 Introduction.
|
Sidebar 0
I've made this "How-To" for Virtual Textures as brief as I can.
I like to read and I like to write.
Using VTs depends on lots of details in the many features
that Celestia provides. As a result of these three influences,
my description of VTs in the
Textures document is long and complicated.
Many people would rather not read about all of the variations:
they want a quick and short introduction.
This is my attempt at
providing brief descriptions of two different approaches to
Virtual Textures: one that's minimal
and one that's
more complex.
|
[back to Contents]
1.0 A Minimal VT Addon Framework.
This Addon only shows you how to use a single hires virtual testure for
the Earth. If you want more, you'll have to do a little work: Read on.
|
Sidebar 1.0
A Virtual Texture is specified by
- a Texture declaration specifying the image file name
- a
.ctx file taking the place of a JPG or PNG
image (the CTX file is in an appropriate textures
subdirectory),
- a directory for this VT containing
level
directories,
- up to 13
level directories containing
all of the tiles (small images)
that make up the Virtual Texture image.
|
[back to Contents]
1.1 A VT Addon Framework.
-
MinimumVTFramework.zip (4KB, 4Mar07)
This Zip archive contains a minimum VT structure:
a CTX file to define the Earth's VT
and Level sub-folders to contain the tiles used to draw it.
To use this framework, first download the Zip file above.
Then "explore" in it to find the files listed below.
"Extract all files" won't do the right thing.
- Copy the file
earth.ctx into the folder
Celestia/textures/hires
- Copy the folder
earth-levels
and all of its contents (folders named level0
to level12 -- level zero through level twelve) into the folder
Celestia/textures/hires
- Copy the tiles from the Virtual
Texture Addon of your choice into the framework's
folders
level0 through level12
- Run Celestia
- Type Capital-R several times
- Enjoy the view!
Note: Celestia v1.6 will replace the keyboard shortcuts "r" and "R" by
selections in the Render menu.
|
Sidebar 1.1
Too many Addon authors have provided VTs consisting of Levels but with
no way to use thim.
This document describes a way for you to enjoy those orphaned virtual surface
textures.
This VT defines only a structure for a virtual high resolution surface texture
image for the Earth. It allows you to augment the Earth image that
Celestia provides by using your own or someone else's Level tiles.
This framework can be modified to apply to other planets
or to provide additional enhancements to the Earth's image.
You'll have to give the CTX file a different name (e.g. mars.ctx or
earthnight.ctx), you'll have to edit the CTX file itself so it points
to a corresponding directory of levels, and you'll have to provide that
directory of levels.
Please take the time to peruse the readme file that's included
in the .zip archive.
- The
.ctx file describes the structure of the Virtual
Texture. Like a JPG, PNG or DDS image file, it needs to be in one of the
textures subeirctories.
- The folder
earth-levels contains many sub-folders.
They're named level0 through level12 .
Make sure they
stay inside the folder earth-levels .
They should not appear within the hires folder itself.
-
This Framework does not contain any images. If you try to use it without
providing the necessary images, the Earth will look quite strange.
You can find Virtual Textures for the Earth (and Mars) on the
MotherLode.
You do not have to populate all of the level
sub-folders. Only the very first one, level0 must
contain files. If you want, you can leave all of the others empty,
or you can populate some of them with just a few images of your favorite
regions on the planet.
- When Celestia starts, it automatically takes you to the Earth.
-
Typing a Capital-R (R) several times tells Celestia to display its higher resolution
surface texture images (lores -> medres -> hires), so
you can view the Virtual Texture you've just installed.
Typing a lower-case-r (r) several times tells Celestia to display its lower resolution
surface texture images (hires -> medres -> lores), so
you can compare them with the Virtual Texture you've just installed.
Note: Celestia v1.6 will replace the keyboard shortcuts "r" and "R" by
selections in the Render menu.
|
[back to Contents]
1.2 Required Components of a Minimal VT.
A drastically simplified Virtual Texture (VT) consists of
- Giving the VT the same name as the Texture that Celestia is looking
for.
- Placing the VT in Celestia's hires folder
/textures/hires
- Providing a CTX file to define the VT's virtual image
- Providing several Levels of tiles for improved closeup quality
The MinimumFramework Addon above provides all but the tiles.
|
Sidebar 1.2
This VT structure provides a virtual CTX image named earth.ctx
As a result, it improves only the base surface coloration of the Earth
when you type the capital-R command.
This minimal VT does not necessarily provide improved specular
reflections. It does not improve night lights or mountain shadows.
If you happen to provide level tiles which include an alpha
channel, that alpha channel will be used for specularity. For more
information about alpha channels and specularity, see the
Textures document.
You can improve the
night lights by providing a separate
VT named earthnight.ctx with its own tree of levels named
earthnight-levels.
To add shadowing for the Earth's mountains and valleys, you have to
provide a different SSC catalog. See
section 2 below.
|
[back to Contents]
1.3 Minimum Framework Details.
- The name: Celestia's
solarsys.ssc
specifies
Texture "earth.*"
so the Virtual Texture .CTX must be named
earth.ctx
- The location: Celestia looks in its
textures
subfolders medres , lores and
hires for surface texture images.
hires is empty: put the VT's CTX and its levels there.
- The VT's CTX file defines the levels and tiles that compose the Virtual
Texture. See textures.html#2.5.2.
- Each progressivly higher numbered
level folder contains tiles
to be used for progressively higher resolution surface textures:
level0 must contain 2 tiles: the eastern and western hemispheres.
level1 can contains as many as 8 tiles: the eastern and western
hemispheres, each split into 4 equal quadrants: two north of the
equator and two south of the equator.
- etc.
If you use this framework, you must copy the tiles from the Virtual
Texture Addon of your choice into the Level folders.
|
Sidebar 1.3
-
Celestia's
solarsys.ssc catalog uses wildcards (.*) to
specify the filetypes of the Textures that it wants. Celestia
recognizes four different image file types: .CTX (virtual textures),
PNG (Portable Network Graphics images), JPG (JPEG compressed images)
and DDS (Direct Draw Surface texture images).
By using the same name that Celestia wants, you don't have to create
your own SSC catalog to tell Celestia the name of the Virtual Texture.
-
Celestia assumes that the
textures
subfolders
lores ,
medres and
hires contain progressively higher resolution surface
texture images. Because of their size, no hires textures are included
with Celestia. They're only available as Addons.
Celestia's keyboard commands lower-case-r and Capital-R let you select
images from among these three folders. "r" selects lower resolution
folders. "R" steps to the higher resolution folders.
Celestia v1.6 will replace the keyboard shortcuts "r" and "R" by
selections in the Render menu.
-
The details of the declarations used in a CTX file are too complicated
to include here. Please read textures.html.
-
Detailed descriptions of the sizes and names of the tiles are in
textures.html. That document also provdes
links to tools that can be used to create the appropriate small tiles
out of the individual gigantic images that these Virtual Textures
replace.
The major advantage of VTs is that the various levels don't have to be
fully populated, which saves a lot of disk space.
Only level 0 has to contain tiles. The other,
higher resolution, levels
must be present but can be empty. You can provide just one or two tiles
in the final and highest resolution level folder,
level12
|
[back to Contents]
2.0 A Full Function VT Addon Framework.
|
|
[back to Contents]
2.1 A VT Addon Framework.
|
Sidebar 2.1
This "full function" Addon provides a complete framework for VTs for both the Earth and
Mars, but only the framework.
Detailed surface image tiles are not included, but the
level directories for them to be put into are here.
You can populate as many as 13 Levels in each of this framework's six VTs
to provide more details on the surfaces of both the Earth and Mars.
You must provide tiles at least for level 0 of each of the six VTs.
- Restoring the Zip archive using your favorite unZip program should
restore all of the files and directories in their correct nested
structure.
- Like the Minimum Framework, you'll need to copy into this Framework
the Levels of tiles from a Virtual Texture that you've created or downloaded.
- Since this Addon uses AltSurface declarations in its SSC catalog,
the RMB popup menu is used to select the high resolution Virtual
Texture. The R command used by the Minimal Framework is irrelevant for
this Framework.
|
[back to Contents]
2.2 Required Components of a VT.
A Virtual Texture (VT) consists of
- An Addon directory containing the VT
- An SSC Catalog specifying the VT Texture
- A textures folder containing the VT's image
- A CTX file defining the VT's virtual image
- Several Levels of tiles for increased closeups.
The Framework Addon above provides all but the tiles.
|
Sidebar 2.2
A complete VT Addon for Celestia has to include all of these components.
Too often, however, Addon authors take shortcuts and provide only part of what
Celestia needs to describe their Addon. They expect the user to be able
to add the missing components or to put the VT into an appropriate
directory.
Unfortunately, there are many interactions that you have to
understand in order to make a VT addon work correctly.
- This Full-Function Addon Framework includes a directory explicitly
for the Earth and Mars suite of Vitrual Textures.
The Minimum Framework above makes use of Celestia's own Texture directories.
Intermediate frameworks are possible, too. E.g. one might provide
a separate Addon directory for each planet.
- This Framework includes an SSC catalog which defines two
AltSurfaces -- one for the Earth and one for Mars. These AltSurface
definitions each specify several high resolution Virtual Textures, for
surface colors, specularity (reflections), night lights (cities, forest
fires, etc), and shaded mountain sides.
The Minimum Framework above makes use of Celestia's own
SSC catalog, data/solarsys.ssc . It cannot provide
enhancement VTs for any texures that aren't mentioned there.
- This Framework defines a
textures/hires folder
which is used to contain all of its Virtual Textures.
The Minimum Framework above makes use of Celestia's own
hires texture folder, textures/hires .
- This Framework provides six CTX files which are used to define
six Virtual Textures.
See Section 2.4 for a list.
The Minimum Framework above only needs to provide
a single CTX file. It provides a hires VT that
is an alternative for only the Texture image map of the planet's surface.
- The six corresponding
*-levels directories each contain
13 empty levels* directories. Those are the directories
that you have to populate. level0 must contain two
image tiles: one for the eastern hemisphere and one for the western.
The others can be full, empty or contain only the tiles which portray
the areas that you are most interested in.
See the
Textures document for a complete description of all of the
levels and their tiles.
|
[back to Contents]
2.3 Optional Configurations of a VT.
There are several different ways VTs can be installed
into Celestia.
Section 1 above describes the simplest method.
This second Framework Addon uses AltSurfaces:
Right-Mouse-Button-Click pops up a menu which lets you select
among several different Alternate Surfaces.
See the Textures document for more information
about Alternate Surfaces.
|
Sidebar 2.3
A VT could be put into Celestia's own textures/hires directory
and the VT could be given the same name as is specified in Celestia's
own SSC file. Then you can use r and R keys to select it.
(See Section 1 above.)
But then you're stuck with that one VT hires choice.
You have to do a lot of renaming of files to try a different VT.
This second Framework Addon is much more general than the first. It defines an
AltSurface that you can select using the Right-Mouse-Button.
You can augment its structure to include other textures for Earth and
Mars or to define textures for other planets, too.
If you have a single-button-mouse on a Mac, you can use
Ctrl-Mouse-Click to emulate the right mouse button. However,
you really should consider upgrading to a 3-button wheel mouse.
Too many software packages expect you to have a full-function mouse.
You don't need a fancy one: a usable wheel mouse costs $10 or less.
|
[back to Contents]
2.4 Framework Details.
To install this Addon, extract the Zip file into your Extras or Addons
directory. It will create the catalog EarthMarsVT.ssc , textures
directories and six
.CTX files within the Addon's directory /textures/hires/
Then you should copy some other Addon's VT Level directories into the
appropriate directories within this Addon's textures/hires directories.
You must provide Levels for all six folders (at least level0)
- earth (basic coloration)
- earth-spec (water reflections)
- earth-night (city lights)
- earth-normal (mountain shadows)
- mars (basic coloration)
- mars-normal (mountain shadows)
In each case, copy the level0 through levelwhatever directories into
the *_levels directory.
|
Sidebar 2.4
Yup. That's a lot of files to populate all the levels of all the
textures: close to 2 GigaBytes. Or more.
I hope you tried the drastically simplified version described
in Section 1.0 first.
|