New Feature: Virtual Textures

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

Moderator: selden

New Feature: Virtual Textures

Postby chris » Tue Aug 05, 2003 10:23 am

As of 1.3.1pre9, Celestia supports a feature I've been calling virtual textures. This message is a plea for you texture artists to test this feature out . . .

Virtual textures consist of multiple levels of detail, each one four times
the size of the previous (twice the width, twice the height.) Every level
of detail is composed of 2n x n texture tiles, where n must be a power of
two. Celestia chooses the level of detail to use based on the size in
pixels of the object to be textured. The levels of detail do not need to
be fully populated; if a tile at the requested level of detail is not
available, Celestia will fall back to a lower level of detail that is
available. This allows you map planets with very high resolution at
particular locations without forcing you to map the entire planet at such
a resolution. In fact, since 1km/pixel maps of planets are cumbersome to
distribute online, I expect these detail tiles will be the main
application of virtual textures.

A virtual texture is identified by the extension .ctx. A ctx
file is actually just a text file in the familiar ssc-like format. There are
several fields describing the layout of the texture tiles. Here's my test
example:

Code: Select all
VirtualTexture
{
        ImageDirectory "tiles"
        BaseSplit 0
        TileSize 256
        TileType "jpg"
}


The image directory gives the location of the individual texture files.
BaseSplit determines the number of tiles in the lowest level of detail
(2^(baseSplit + 1) tiles wide, 2^baseSplit tiles high.) TileSize gives
the number of pixels in each dimension of the texture tiles. This value
is used to figure out what level of detail to use. It is not enforced,
and it could be very useful to have a higher resolution tile at the
highest LOD (though it's not recommended elsewhere.)

Code: Select all
foo/
    foo.ssc
    textures/
        medres/
            foo.jpg
        hires/
            foo.ctx
            tiles/
                level0/
                    tx_0_0.dds
                    tx_1_0.dds
                level1/
                    tx_0_0.dds
                    tx_1_0.dds
                    tx_2_0.dds
                    tx_3_0.dds
                    tx_0_1.dds
                    tx_1_1.dds
                    tx_2_1.dds
                    tx_3_1.dds
                level8/
                    tx_300_59.dds


In the above example, the planet is fully mapped at resolution levels 0 and 1, and there's one high detail tile at level 8. A few quick calculations . . . The base split here is 0. Let's assume that the tiles are 256x256. That means that the effective resolution at level 8 is 256*2*2^8 x 256*2^8, or 128k x 64k. For Earth, that's approximately 300m/texel. The general formula for the effective height of a virtual texture level is:

TileSize*2^(Level + BaseSplit)

The width is always double the height. I suppose that I should really make some sort of JavaScript calculator to compute sizes and the latitude and longitude ranges of tiles. :)

The main problem that I've had with creating virtual textures is finding high resolution data. I've got the 32k Earth texture split up into tiles, but I've been unable to find any higher resolution data. If anyone has some good links, please share them. Or better yet, go ahead and use it to create a virtual texture.

--Chris
User avatar
chris
Site Admin
 
Posts: 4166
Joined: Mon Jan 28, 2002 12:21 pm
Location: Seattle, Washington, USA

Postby selden » Tue Aug 05, 2003 1:10 pm

Chris wrote:I've got the 32k Earth texture split up into tiles, but I've been unable to find any higher resolution data.


Maybe you're looking in the wrong places. Wouldn't those high resolution images be called "aerial photography" ? :)

Supposedly TerraServer has about 3.3TB of USGS aerial maps. The U.S. is about 10^7 square kilometers. The surface area of the whole Earth is about 5x10^8 square km. That means it'd take about 150TB of surface texture images to do the whole planet at high resolution.

I wonder how long it'll be before Mars is mapped to that resolution? :)
Selden
User avatar
selden
 
Posts: 9075
Joined: Tue Sep 03, 2002 7:21 pm
Location: NY, USA

Postby Paolo » Tue Aug 05, 2003 1:16 pm

This new feature sounds very good. :D
It is very interesting also because will give the basic for the implementation of high resolution 3D landscape mapping.
But I think that soon Celestia will need a CD distribution.
Bye - Paolo
Remember: Time always flows, it is the most precious thing that we have.
My Celestia - Celui
User avatar
Paolo
 
Posts: 502
Joined: Mon Sep 23, 2002 8:55 am
Location: Pordenone/Italy

Postby -Shadow- » Tue Aug 05, 2003 1:32 pm

8O

Eye Circumference: 1.5 cm
Layer 2: 6 cm
Layer 3: 24 cm
Layer 4: 96 cm
Layer 5: 384cm
Layer 6: 1536cm

Now you know how wide my eye's just opened after reading that!
Keep it going and you'll lose some users, I'm on 56k! lol
Though I'm getting high speed again soon. Oh how this reminds me of Factorial :roll: Very interesting feature chris :wink:
A few more years of development and we'll be leaving TeraBytes behind,
I wonder what they'll think of next? TetraBytes? lol

- Shadow
Image

"Certain it is and sure: love burns, ale burns, fire burns, politics burns, but cold were life without them." - Romulan proverb
-Shadow-
 
Posts: 156
Joined: Thu Apr 17, 2003 5:06 pm
Location: Warbird D'Kara - Recreational area

Postby JackHiggins » Tue Aug 05, 2003 2:10 pm

When can we try this out?!!

What pre version will this be in, or will it be in the final version?
- Jack Higgins
Jack's Celestia Add-ons
And visit my Celestia Gallery too!
JackHiggins
 
Posts: 1034
Joined: Mon Dec 16, 2002 1:47 pm
Location: People's Republic Of Cork, Ireland

Postby chris » Tue Aug 05, 2003 2:17 pm

User avatar
chris
Site Admin
 
Posts: 4166
Joined: Mon Jan 28, 2002 12:21 pm
Location: Seattle, Washington, USA

Postby Mikeydude750 » Tue Aug 05, 2003 6:15 pm

Is that the whole program, or just the .exe file?
Mikeydude750
 
Posts: 169
Joined: Wed Jan 30, 2002 8:00 pm
Location: Wisconsin

Postby chris » Tue Aug 05, 2003 6:15 pm

It's the entire program . . . A number of data files have changed, so I didn't bother making an EXE-only release for pre9.

--Chris
User avatar
chris
Site Admin
 
Posts: 4166
Joined: Mon Jan 28, 2002 12:21 pm
Location: Seattle, Washington, USA

Postby Mikeydude750 » Tue Aug 05, 2003 6:28 pm

Darn...I was hoping it would be an EXE only because I don't want to have to change all my settings every new release.

Oh well...
Mikeydude750
 
Posts: 169
Joined: Wed Jan 30, 2002 8:00 pm
Location: Wisconsin

Postby Don. Edwards » Tue Aug 05, 2003 8:53 pm

Selden is right. I found some very good data.
Look here is my apartment complex.
Image

It is in the upper right corner.

Don.
CPU- Intel Core 2 Qua Q6700 2.66GHz
RAM- 4Gb DDR2
Motherboard- Intel DG33TJ
Video- Nvidia GeForce 9800 GT 512Mb
Hard Drives- 4 = to 1.14TB
OS - Windows 7 Ultimate 64bit - Mac OS X 10.5.6 x86 Intel
User avatar
Don. Edwards
 
Posts: 1502
Joined: Sat Sep 07, 2002 4:54 pm
Location: Albany, Oregon

Postby selden » Wed Aug 06, 2003 5:58 am

Another source of high resolution images of the US is the landsat server at http://mapus.jpl.nasa.gov/

http://viewer.digitalearth.gov/ doesn't seem to be able to generate extremely high resolution images, unfortunately.
Selden
User avatar
selden
 
Posts: 9075
Joined: Tue Sep 03, 2002 7:21 pm
Location: NY, USA

Re: New Feature: Virtual Textures

Postby don » Wed Aug 06, 2003 8:49 am

chris wrote:As of 1.3.1pre9, Celestia supports a feature I've been calling virtual textures.

Congratulations Chris! Great new feature! Should make for some very interesting add-ons, like country, state, and county boundary line maps, highway maps, city maps, low-altitude textures / aerial photos, and all kinds of fun stuff <smile>!

I'm sure the texture guru's know where to look for free and royalty free hires images.
-Don G.
My Celestia Scripting Resources page

Avatar: Total Lunar Eclipse from our back yard, Oct 2004. Panasonic FZ1 digital camera (no telescope), 36X digital zoom, 8 second exposure at f6.5.
User avatar
don
 
Posts: 1709
Joined: Sat Jul 12, 2003 4:34 pm
Location: Colorado, USA (7000 ft)

Postby HankR » Wed Aug 06, 2003 2:57 pm

It might be more convenient if the .ctx file was itself a directory, so that only one file would have to be moved to download or install the texture. The configuration information could be in a text file inside the directory. Or possibly the configuration file could be eliminated altogether. This would be possible if the ImageDirectory were required to be named "tiles", BaseSplit were forced to 0 (but level directories could be omitted), TileSize were ignored (or determined by the actual size of a tile image), and TileType were determined by the tile filename extensions.

- Hank
HankR
 

Postby Guest » Thu Aug 07, 2003 12:54 am

I had a try of it using some dummy textures with patterns and the filenames on them. (ill put up some screenshots when i get home next)

I can get plenty of sattelite photos and i know the Lat/Long of the four corners of each image. Knowing this information it should be easy to mark the the four corners on the tile(s), and then paste and scale image in.
I even have color ariel photos of my home town and house, that would be cool...

Is there a way to quickly chop up a big texture so we can use it as the background of a detail tile?

What is the maximum resolution of the tiles?

The dummy textures worked well except for this possible bug.
Just before level 8 appears the entire planet (i used io) dissapears. It re-appears when I get a little closer.

I tested level 0,1,6 and 8 using 256x256 png images.

Code: Select all
Vendor: Intel
Renderer: Intel Brookdale-G
Version: 1.3.0 - Build 4.13.01.3442
Max simultaneous textures: 4
Max texture size: 2048

Supported Extensions:
GL_ARB_multitexture
GL_ARB_texture_border_clamp
GL_ARB_texture_compression
GL_ARB_texture_cube_map
GL_ARB_texture_env_add
GL_ARB_texture_env_combine
GL_ARB_texture_env_dot3
GL_ARB_texture_env_crossbar
GL_ARB_transpose_matrix
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_blend_color
GL_EXT_blend_func_separate
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_clip_volume_hint
GL_EXT_compiled_vertex_array
GL_EXT_cull_vertex
GL_EXT_fog_coord
GL_EXT_packed_pixels
GL_EXT_packed_pixels_12
GL_EXT_rescale_normal
GL_EXT_secondary_color
GL_EXT_separate_specular_color
GL_EXT_stencil_wrap
GL_EXT_texture_compression_s3tc
GL_EXT_texture_env_add
GL_EXT_texture_env_combine
GL_EXT_texture_filter_anisotropic
GL_3DFX_texture_compression_FXT1
GL_IBM_texture_mirrored_repeat
GL_NV_texgen_reflection
GL_WIN_swap_hint
Guest
 

Postby marc » Thu Aug 07, 2003 12:59 am

Oops, that was me.

Can we go higher than level 8?

here are the screenshots.

Image
Image
Image
Image
Image
marc
 
Posts: 426
Joined: Wed Mar 13, 2002 6:13 am
Location: Outback Australia

Next

Return to Celestia Users

Who is online

Users browsing this forum: No registered users and 1 guest