New Feature: Virtual Textures

General discussion about Celestia that doesn't fit into other forums.
DBrady
Posts: 66
Joined: 14.07.2003
With us: 21 years 4 months
Location: Sydney

Post #21by DBrady » 08.08.2003, 01:14

I know netpbm can do it as i split my 32k earth texture into 32(if i remember right) 4kx4k files when colour correcting it - it turned out quite well but i forget to do some steps on some of the tiles and they looked alot different from the others.

Anyway back to the topic. Search for an image dicer. You should find something you can use to split up an image.

Just to clarify in my mind how to implement a texture for this...
With a basesplit of 0
At level '0' you could have a 2k earth.dds
At level '1' a 4k split into 4 2k dds files
At level '2' an 8k split into 16 2k dds files/ or is it 4 4k dds files?
at level '3' a 16k split into 64 2k dds files/ again is it 4 8k dds files? and so on...

Oh and will it work with normal maps?
Slan

HankR

Post #22by HankR » 08.08.2003, 02:04

As I understand it, I believe the tiles should be square, with both dimensions the same power of 2, at all levels. At each level, the complete tile set covers the entire planet. Thus, the tile set at each successive level covers the entire planet at double the resolution of the preceeding level, but using four times as many tiles (all of the same size).

So if one were to use 1Kx1K tiles, with basesplit of 0, there would be two tiles at level 0, 8 tiles at level 1, 32 tiles at level 3, and so on. Level 3 would be the quivalent of an 8K texture (32 = 8x4@1K).

- Hank

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 3 months

re

Post #23by John Van Vliet » 08.08.2003, 08:56

I'v been away for a wile and look forword to giving the new releace a try

HankR

Post #24by HankR » 08.08.2003, 17:19

Oops. In my post above, "level 3" should read "level 2".

- Hank

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 10 months
Location: Seattle, Washington, USA

Post #25by chris » 08.08.2003, 17:55

marc wrote:Chris.

This might be a long shot, is there any way to fade the textures in/out rather than just turning them on/off?


I do have a scheme in mind for making the transitions between levels smoother, but I'm going to wait until the next version to work on it. What I'll do is to render two levels of detail simultaneously and use OpenGL's multitexture to blend between them.

--Chris

Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #26by Brendan » 08.08.2003, 21:16

I made a virtual texture with this:
http://www.ngdc.noaa.gov/mgg/image/2minrelief.html
I resized each tile to 1024x1024 and used them on level 2. It worked well with the 2k version of the same map that I found somewhere else but I forget where. :oops:

Brendan

Guest

Post #27by Guest » 08.08.2003, 21:49

Another good site of satellite images is http://www.spaceimaging.com .
:wink:

Gaetan

Post #28by Gaetan » 08.08.2003, 22:17

Brendan,

I did not find your virtual texture on your website. Could you put it so that we could download it ?

Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #29by Brendan » 08.08.2003, 23:18

All 32 textures are about 9.5 mb combined and I'm on dialup. So I didn't get to it right away. I'll set up a section of my web site for Celestia so I could also post my Hill spheres addon and the planet interiors one when it's done. I also want to try combining and resizing the 32 textures to create 8 tiles for level 1 because the ones I have now are for level 2. I'll create a new level 0 because the 2k global map doesn't have some lakes such as Lake Victoria and the Great Lakes that the 32 tiles do.
I'm also new to working with textures so I'm wondering if it could it be good to convert them to dds? *edit I called dds textures dss :oops:

Brendan

Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #30by Brendan » 10.08.2003, 00:39

I'm done with levels 0, 1 and 3 of the texture and they are 11.3 mb zipped, but my website can only have 15 mb. Here's the ctx fille.

Code: Select all

VirtualTexture
{
        ImageDirectory "Bathymetry"
        BaseSplit 0
        TileSize 1024
        TileType "jpg"
}


I use it as an alternate texture.

Code: Select all

AltSurface "Bathymetry 4" "Sol/Earth"
{
   Color [ 0.85 0.85 1.0 ]
   Texture "Bathymetry.ctx"
   BumpMap "Earth-Bump.png"
   BumpHeight 4.0
}


It's the fourth bathymetry texture I have for the earth. One of the other three is a regular 2k version of the virtual texture. Level 0 of the virtual texture looks better than that texture. One is a 2k one with different coloring and the remaining one is the bathymetry one from the space graphics web site that someone here made into a dds.
What I did was to get the 32 1350x1350 tiles from http://www.ngdc.noaa.gov/mgg/image/2minrelief.html
and resized each of them to 1k and gave them the tx_y_x names. Then I put them together four at a time to make 8 1k tiles and did that again to make the 2 level 0 tiles.
Where could I put the zip file?

Brendan

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 10 months
Location: Seattle, Washington, USA

Post #31by chris » 10.08.2003, 01:12

DBrady wrote:Just to clarify in my mind how to implement a texture for this...
With a basesplit of 0
At level '0' you could have a 2k earth.dds
At level '1' a 4k split into 4 2k dds files
At level '2' an 8k split into 16 2k dds files/ or is it 4 4k dds files?
at level '3' a 16k split into 64 2k dds files/ again is it 4 8k dds files? and so on...
Not quite, because there are always twice as many tiles horizontally as vertically. So, level 0 would be 2 1k x 1k tiles, level 1 would be 8 tiles, level 2 32 tiles, etc.

Code: Select all

level 0:

+--+--+
|  |  |
+--+--+

level 1:

+--+--+--+--+
|  |  |  |  |
+--+--+--+--+
|  |  |  |  |
+--+--+--+--+


Oh and will it work with normal maps?

Yes, it will work with normal maps, specular maps, night maps--anything except cloud maps, which are not splittable.

--Chris

Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #32by Brendan » 10.08.2003, 02:52

Now I have screen shots of the texture on my web site at http://www.geocities.com/bryanhf2002/celestia/celestia.html

Brendan

Guest

Post #33by Guest » 10.08.2003, 06:03

now we can look forward to a really high res earth!

jim
Posts: 378
Joined: 14.01.2003
With us: 21 years 10 months
Location: Germany

Post #34by jim » 10.08.2003, 12:27

Can someone suggest a software that split a texture/picture into tiles? I hate to do this all with Photoshop.

Bye Jens

Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #35by Brendan » 10.08.2003, 19:04

jim wrote:Can someone suggest a software that split a texture/picture into tiles? I hate to do this all with Photoshop.


It took me a few hours to make the level 1 part of the bathymetry texture. What I did was open a new 1k square picture in gimp and resized four tiles from level 2 and copied and pasted them into the blank ones. It would be nice to have software that could do this automatically based on the t_y_x filename and also automatically make multiple levels of detail from a big texture all without opening up the images.
I also have two maps of the earth, which are of the eastern and western hemispheres. They are hundreds of megabytes each so simply displaying them takes forever. :cry:

Brendan

DBrady
Posts: 66
Joined: 14.07.2003
With us: 21 years 4 months
Location: Sydney

Post #36by DBrady » 10.08.2003, 21:18

Thanks chris i worked it out in the end.(best way to learn it is to try it)
I have a full set of 2kx2k tiles up to 32k at lowest compression jpeg now. It does work alot better then then a single 32k dds.
It's not totally smooth, especially when panning the view, but i expect it will be alot smoother with dds files. The problem is i can't get it to work with dds files. Have you actually got it to work with dds files?

Tile set up for jpeg...
level0 - 4k res with 2 2kx2k tiles
level1 - 8k res with 8 " "
level2 - 16k res with 32 " "
level3 - 32k res with 128! 2kx2k tiles

Do you know if there is an optimal tile size? I choose 2k just to limit the number of tiles at 32k somewhat.

Great news about the normal maps-hopefully they'll run quite smoothly in png format now.

A pic at 32k resolution main texture and 32k normal map...
Image

Ps. do you think the naming convention of tiles is correct? I would of put rows as the first number and columns as the second. This is also what netpbm gives as output when dicing an image-which led to alot of renaming on my part to get it to work properly.
Slan

Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Post #37by Brendan » 11.08.2003, 05:00

I put the textures into multiple zip files. Level 0 is in one 500kb zip file, level 1 in 2 1mb files and level 2 in 4 2mb files. Someone told me a simple thing to do would be get another account at Geocities and then put up a page with links to those zip files there. So now I will be able to upload the textures.

Brendan

HankR

Post #38by HankR » 11.08.2003, 05:33

Re optimal tile size:

Larger tiles generally take longer to load than smaller ones because they're larger (duh!). But you need to load fewer of them to cover the same area on screen. Also, because of less file opening overhead, larger tiles are probably faster to load than the set of smaller tiles covering the same area. On the other hand, with larger tiles the off-screen part of the tiles (loaded unnecessarily) is likely to be larger than with smaller tiles. Just how these trade-offs ultimately work out, I'm not sure. It would be interesting to experiment with different tiles sizes and see what happens.

- Hank

Avatar
HB M
Posts: 132
Joined: 26.11.2002
With us: 22 years
Location: Eindhoven, The Netherlands

Holland below seelevel

Post #39by HB » 13.08.2003, 09:10

Brendan wrote:I made a virtual texture with this:
http://www.ngdc.noaa.gov/mgg/image/2minrelief.html
I resized each tile to 1024x1024 and used them on level 2. It worked well with the 2k version of the same map that I found somewhere else but I forget where. :oops:

Brendan


If you use the above file to make Virtual textures then Holland is drown in the see again. Beside of that the different colors shows only the different hights of the earth. Icy Greenland is colored in red!!

Btw in spite of the earthview it a good example of how Virtual textures work

HB
HB

Brendan
Posts: 296
Joined: 15.07.2003
With us: 21 years 4 months
Location: Bellows Falls, VT
Contact:

Re: Holland below seelevel

Post #40by Brendan » 13.08.2003, 20:12

HB wrote:
If you use the above file to make Virtual textures then Holland is drown in the see again. Beside of that the different colors shows only the different hights of the earth. Icy Greenland is colored in red!!


Another example is the area north of Caspian sea being colored blue to show that it's below sea level, but it's really land. In the ice free map I found somewhere, that area is underwater.

Brendan


Return to “Celestia Users”