New Feature: Virtual Textures

General discussion about Celestia that doesn't fit into other forums.
ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #41by ANDREA » 31.08.2003, 22:55

chris wrote:...the highest I've gone to is level 5 (albeit with 1024x1024 tiles.) I'll test out some higher levels of detail . . .
--Chris
Help! :cry: I found a very beautiful image of a portion of Vallis Marineris, at an astounding detail, so I decided to use it as Virtual Texture for Mars.
Following is how I made my attempt (negative!):
with Photoshop I obtained 2 different bigmarineris.jpg images, 8k x 8k and 8k x 4k.
I tried with both, because while Chris says the textures should be as usual in proportion 2 to 1
chris wrote:2n x n texture tiles, where n must be a power of two
somewhere else (Hankr, Brendan and others) I found that images they used are square.
I prepared a bigmarineris.ctx file as follows

VirtualTexture
{
ImageDirectory "level0"
BaseSplit 0
TileSize 8192 # and 4096 for the smaller texture
TileType "jpg"
}

and I put it in the hires folder (where is the texture I'm using for Mars,
Mars-Shaded-16K.dds.
In the same folder I put the level0 subdirectory containing the bigmarineris.jpg texture to be used.
Then I made the bigmarineris.ssc as follows

AltSurface "bigmarineris" "Sol/Mars"
{
Color [ 0.85 0.85 1.0 ]
Texture "bigmarineris.ctx"
#BumpMap "bigmarineris.jpg"
#BumpHeight 4.0

and put it first in the data folder, later on in the extras folder.
I tried both, but nothing happened :cry: . I've searched in the forum some information on the way to perform this, but I found nothing sufficiently clear (at least clear for me :!: ).
Could someone be so kind to tell me where I missed the right way? :?: Is there a dimensional limit for virtual textures, so that 4k or 8k virtual textures are not allowed? :?:
I have no problems with grphic card, it's a Nvidia GeForce Ti 4600 128 Mb.
I forgot to say that obviously I'm using Celestia 1.3.1 pre9. :!: .

Thanks a lot :D .

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 8 months
Location: Hamburg, Germany

Post #42by t00fri » 31.08.2003, 23:13

ANDREA,

there is an important information missing from your experiment: how do you think Celestia can know at which place of the Mars map it is supposed to overlay your tiny super hires tile?

The secret is to append the correct numbering to your tiles. To work out these numbers, you have to do a 'little back of the envelope calculation'...

Bye Fridger

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #43by ANDREA » 01.09.2003, 10:07

quote="t00fri"]ANDREA,
there is an important information missing from your experiment: how do you think Celestia can know at which place of the Mars map it is supposed to overlay your tiny super hires tile?
The secret is to append the correct numbering to your tiles. To work out these numbers, you have to do a 'little back of the envelope calculation'...
Bye Fridger[/quote]

Hello Fridger, thank you for your answer. I had many many doubts on the need to identify the position of my "patch" on the Mars surface :roll: , but due to the fact that it was clearly told that it's possible to put single HiHiRes images on the planets, and noone told how to do this, I supposed that there could be some minsterious software miracle that could make it automatically :wink: . So, when I'll have calculated the exact position (but how much exact has it to be?) of the four corners of the image, how can I inform Celestia of this? :?: Moreover, the image dimensional relation has to be -2 to 1- as for all the textures (I mean 8192x4096), or -1 to 1- as it seems to me that everyone is using, or there must be at least two square images one close to the other, so that the final relation is -2 to 1-? :?: Is there any limit on these images dimensions, due to the fact that noone up to now uses images bigger than 2k? :?: Regarding the numbering of Levels, having in use only the 16k Mars image, have I to put my patch in Level1 subdirectory of hires textures, or the number is in relation to the texture size, or what else? :?:
Sorry for so many doubts, but not being an English speaking man I have difficulties (and I think other people has the same ones) to understand exactly the operations to be done. Could someone be so kind to make a mini check-list on this matter :?: ?
I appreciate any help.
By and thank you :D

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

actually user SMBIKA

virtual textures and spec maps

Post #44by actually user SMBIKA » 10.07.2004, 16:58

I have seen evidence (the thumbnail images on the celestia motherlode site http://www.celestiamotherlode.net which suggest that one can use the32K bluemarble VT texture base in conjunction with a VT specular map (giving the nice shiny spot on whichever place you are focused and also the hi res of the terrain below) but have not been able to achieve it on my machine with version 1.3.1 or 1.3.2pre8. After i installed a specular map of equal size from the above site all i got was another entry in the alternate textures in the right-click dialog when selecting earth. It display the spec files instead and they are not as hi res is seems as the 32K VT from blue marble. I am obviously confused...can anyone suggest what i am missing?

Thanks!

smbika
Posts: 58
Joined: 07.07.2004
With us: 20 years 4 months
Location: Eastern Seaboard

sorry for the errant post subject: virtual textures and...

Post #45by smbika » 11.07.2004, 19:25

Hi, I am new and learning the site - i placed my previous post in a new thread and apologize for dumping it here...

Thanks!
The only show that could beat Stargate<whatever> in a fair fight is Firefly...

folks
Posts: 19
Joined: 22.07.2004
With us: 20 years 4 months
Location: Sunshine Coast, Canada

Virtual Textures as Persistent Alternate Textures

Post #46by folks » 30.07.2004, 15:56

Virtual Textures as Persistent Alternate Textures

It looks like I can only have a single alternate texture specified
at any one time.

If I specify an alternate texture for a second object the alternate
texture for the first appears to revert to its default texture.

I understand that if I modify things to make my alternate texture
the default texture by changing either the system.ssc file or the
default textures themselves then my textures will be retained.

However, with the advent of virtual textures it might make sense
to enable the option of persistent alternate textures for objects since
multiple resolutions can be defined in a virtual texture.

--Scott
Mac OS X 10.3.4 :: Celestia 1.3.1 :: Nvdia GForce 4 MX 32MB

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

Post #47by selden » 30.07.2004, 16:47

Scott,

The same AltSurface name is applied to all objects simultaneously. Only if no such surface has been defined does the "Normal" surface get shown.

If you want to use virtual textures as a "persistant alternative texture", then give all of your AltSurface virtual texture declarations the same name.

Instead of

AltSurface "VT for Venus" "Sol/Venus" {
VT specification for Venus }
AltSurface "VT for Earth" "Sol/Earth" {
VT specification for Earth }
AltSurface "VT for Mars" "Sol/Mars" {
VT specification for Mars }

use

AltSurface "DefaultVT" "Sol/Venus" {
VT specification for Venus }
AltSurface "DefaultVT" "Sol/Earth" {
VT specification for Earth }
AltSurface "DefaultVT" "Sol/Mars" {
VT specification for Mars }

Then when you use the RMB to select the popup menu option
Alternate Surfaces "DefaultVT"
all of the planets will display their Virtual Textures.
Selden

Guest

Re: New Feature: Virtual Textures

Post #48by Guest » 11.12.2004, 18:02

chris wrote: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


Return to “Celestia Users”