SDK Question trying to understand higher level texturing

ncc1701d

Member
Joined
Aug 9, 2009
Messages
204
Reaction score
6
Points
18
maybe i am missing something and this maybe simple. I want to understand making higher rez texture making.
I downloaded the Earth-Level-11-and-14.zip and unziped as a study point.

I end up getting
couple other things but basically
Earth_tile.bin (tile set)
and
Earth_tile.tex

When loading the Earth_tile.bin into Tile Manager and I look at all the squares some greened and others not. They all seem to be 256x256. I dont understand at this point. How can you tell what is level 11 quality and level 14? They all have names like "Earth_9_0823.dds" 9 indicating process with 9 setting in pltex which is just adding to my confusion. 9, 11 ,14? But i understand pltex can do level 10 so why use 9? so thats adding more to my confusion. What am I looking at? How did all these 11 and 14 qualitys get in this one Earth_tile.bin?
I get so confused when trying to understand this.
gerrrrrrr
thanks
 
Levels are as follows:
8 - 8192 by 4096
9 - 16384 by 8192
10 - 32768 by 16384
11 - 65536 by 32768
n - 2^(n+5) by 2^(n+4)
 
Do you use the tile manager from Orbiter 2005 (the one you were asking for a year ago)?

If so, then it will load up to level 9 tiles, hence you have "Earth_9_0823.dds" and similar 256x256 px size tiles.

BTW. I think Pyromaniac605 was asking what "^" character means. ^ means power.

---------- Post added at 12:01 ---------- Previous post was at 11:50 ----------

But i understand pltex can do level 10 so why use 9? so thats adding more to my confusion. What am I looking at? How did all these 11 and 14 qualitys get in this one Earth_tile.bin?
You don't understand this. Textures aren't made with only one level which is indicated when you download them or someone tells about them. Standard resolution textures, for example level 8 contains also level 1, 2, 3, 4, 5, 6 and 7 in the file. Similarly level 14 textures, contain levels 9, 10, 11, 12 and 13, but high resolution textures don't have to cover whole planet. Level 11 + 14 Earth textures contain: level 9, 10, 11 for all lands (no only water tiles are needed), and level 12, 13 and 14 for Florida. And pltex can do level 14, by the way. Tiles are in the .tex file, and .bin contains only information about them.
 
It is possible i am still using old one. I dont have a version number in the "about" area. I dont see a new one in orbiter 2010 folders. Where is the latest one?

As far as pltex goes. Do i just run say level 14 processing for a limited long lat max and min values and when its done by default all the other tiles that make up the world become 9 ,10 11,12,13s?
I am not using any masks.
 
It is possible i am still using old one. I dont have a version number in the "about" area. I dont see a new one in orbiter 2010 folders. Where is the latest one?
There is no new one. It wasn't updated to be used with level 10 and higher, so it was removed from the Orbiter 2006 and later distributions.

As far as pltex goes. Do i just run say level 14 processing for a limited long lat max and min values and when its done by default all the other tiles that make up the world become 9 ,10 11,12,13s?
I am not using any masks.
No. You create a limited long and lat range of level 14, only for that region textures are created, and then you need to merge it with the whole world's lower level textures to make all included there - there is an option to merge textures in pltex.
 
for even more clarity.
ok so to create a .tex and .bin for L14 quality for that limited long lat range to be merged later, do I have to process using pltex a whole world bmp that is 524,288 x 262,144 just to get the .tex and .bin that i want to merge later?


or am I doing something in tile manager?
 
ok so to create a .tex and .bin for L14 quality for that limited long lat range to be merged later, do I have to process using pltex a whole world bmp that is 524,288 x 262,144 just to get the .tex and .bin that i want to merge later?
No. You just need a bitmap for the region you're creating, and eventually lower resolution textures for lower texture levels.


or am I doing something in tile manager?
You do nothing in the tile manager, as it isn't meant for Orbiter 2010 nor level 14 textures.
 
Orb,

i've made it one time and it's far away in the past. So my memory...But i remember i think that i've had to specify the long lat of the local tile in pltex ( the left and bottom corner of it...here also, my memory...) and, by the way, to load the tile mamager to take informations in it ( for sure, relatively to a level 9 ) and find from there the coordinates that it was possible to give to the tile.

I suppose that it was possible to find them directly through some calculus but...

Is that right ?
 
I suppose that it was possible to find them directly through some calculus but...
Actually it's relative to level 8, as level 9 has simply 4 times as much tiles globally.
Number of patches in a column per texture level is constant, so calculating latitude for a tile or from a tile is simple - there are 16*2^(level-8) or 2^(level-4) tiles in a column (-90 to 90 lat), or 8*2^(level-8) or 2^(level-5) per hemisphere (-90 to 0 or 0 to 90 lat).

The number of patches in a row (-180 to 180 long) per latitude is divided on 7 (actually 8, but here it's simplified) regions per hemisphere. The calculation is actually relative to level 8:
  • Between 0 and 22.5 (or for equal distance between latitudes - 0 to 11.25 as also the same for 11.25 to 22.5) degrees North or South, there is place for 32*2^(level-8) tiles in a row.
  • Between 22.5 and 33.75 degrees North or South, there is place for 30*2^(level-8) tiles in a row.
  • Between 33.75 and 45 degrees North or South, there is place for 28*2^(level-8) tiles in a row.
  • Between 45 and 56.25 degrees North or South, there is place for 24*2^(level-8) tiles in a row.
  • Between 56.25 and 67.5 degrees North or South, there is place for 18*2^(level-8) tiles in a row.
  • Between 67.5 and 78.75 degrees North or South, there is place for 12*2^(level-8) tiles in a row.
  • Between 78.75 and 90 degrees North or South, there is place for 6*2^(level-8) tiles in a row.
This is how it looks, though I don't know if it's understandable enough. Right now I can write it simpler as a C++ code, if you want, or direct you to TileManager::GlobalInit function in TileMgr.cpp of D3D7Client, but I'd need to think a little to make a single mathematical formula for a simple long/lat to x/y or vice versa conversion.
 
Thank you orb,

i've never really made an investigation in the distribution of tiles for a tex files, if i've seen, at different times, the global geometry of the "thing" in the tile mamager, wich look different of the one for surftile ( and i've begin to learn projections when i was beginning to made the nightlights, compiaring the Yahoo, Google, Worldwind/Virtual Earth one's ...but it' another subject) and take a look also at the doc concerning levels for tex files.

I've take a look at the TileMgr.cpp ( that i see for the first time ), following your link, and i will read it.

I'll try to understand what it says, as the informations that you give in your last post. It takes a certain time to digest that and i've not an immediate need of it but that could help for a next try. My level in maths is not very high but i think that the calculus, in that case, are not too difficult.

Concerning the last part of your message: i don't see, at first sight, why i will have to know a position in terms of x/y for a tile. I use some simple formulas ( trigonometry ) for that when i want to put an object or a meshe on a base, but i've not such choice for a tile...or do i miss something ?

I suppose that, for say, a level 10, i take the long/lat values of a/the level 8 near my added tile and i divide ( i do not speak english easily and it's difficult to explain...) that values by 4 to obtain a sort of grid in wich one i find what it's more convenient with regards to where i want to put the tile, in a similar manner that in the surf tile calculator made by Pablo Luna.

Maybe it's a little bit more complicate...or really different...

x/y values...
 
Last edited:
x/y values...
I meant x as a number of horizontal tiles from 180 degrees west, and y as a number or vertical tiles from 90 degrees north. This way you could easily get beginning and ending geographical coordinates for that tile from formulas I posted above, when you provided only a longitude and latitude of a point you're interested in. In other words, it's like counting number of horizontal tiles from left and vertical tiles from top on the Tile Manager.
 
Last edited:
Ah...a number of tiles. This effectively can save some calculations rather than to count the squares one by one :)

So, enter the level and the coordinates of the point of interest, to obtain the long lat of the area/tile in a tex file wich can contain your tile.
 
To be honest, ^ could also mean negation. One could use ** to denote exponentiation (at least that's the way in FORTRAN, and I still use it).
 
fort,
where can i get this "surf tile calculator made by Pablo Luna."


Orb,
Could you clarify your definitions of what a "patch" is verses a "tile" especially with respect to the resolution of the starting .bmp as i am trying to digest all that info.

Am i correct your saying that the tile pattern i see in the tile manager when i open that program is the pattern for a level 8 tile arrangement not 9?

---------- Post added at 05:32 AM ---------- Previous post was at 04:19 AM ----------

my specific example:
i started with a 8192 x 8192 24bit bitmap that i wanted to
cover long range [min max] -5.625, 0
and
cover lat [min max] -5.625, 0

i assume possibly incorrectly(I dont know yet) that 64 squares horizontally (like shown in the tile manager when its first opened) multiplied time 8192 would give me 524,288 which is the width of a Level 14 world size bitmap width.

Using that reasoning I assumed by bitmap should have been 8192x8192 for at least the equatorial areas.

I have tested it and it appears possible to be correct but now i am having doubts when I just saw your post. So here is where i get unsure of what happen.
So question: did i figure right? Was the 8192x8192 converted/chopped to patches? was my image reduced in resolution to create smaller patches like 256x256 or something? When in orbiter am I looking at someting other than 8192x8192 resolution?
 
Last edited:
ncc1701d,

Made, written, for a part with a translator ( and supervised by me- i hope that it's visible, because, you know, the translators, most generally, it's not that :))

All terrain views are made of dds files,meaning: bmp compressed.

These dds can be showed under two forms:

- contained in .tex files with a geographical distribution that the tilemanager figure. Tex files dedicated to cover an entire body of a planet. Present in the textures folder or textures2 folder ( for high resolutions ).

- presented as such (single dds single, independent of tex files), generally called "surftiles" or "tiles" (but the word tile is rather a generic term designating all the "independent" dds as those contained in .tex files), this to to cover small portions of land (sometimes an entire continent ... Australia, Europe ...), which may be in textures or textures2 folder, positioned geographically by reference to the name given to them ( Earth_0_w0001_n0073.dds example), and whose interest is to provide levels of resolution that . tex files can not currently achieved, except at the cost, for example, of significant weight.

Those surftiles are called to disappear as soon as tex files, under reasonable conditions, may reach equivalent resolution levels.

What is called patch generally refers to local high resolution tiles embedded in files. tex, using pltex, like, for now, Florida at level 14 (but which - Florida - also share, for a part, independent surftiles, on KSC).

But patch but could also agree to designate a surftile: it is also something as a patch, an addition, but external.

The geographical distribution of the tiles is different depending on whether they are contained in a .tex file or independent.

The tile manager is the tool to determine the position, at the level of resolution wished, of dds for tex files.

The surftiles can be positioned ( and named ) by calculation or by using, for example, the surftile calculator made by Pablo Luna.

The surface tile calculator and others addons from ar81

[ame="http://www.orbithangar.com/searchid.php?ID=2752"]Surface Tile calculator v5.0a[/ame]
http://www.orbithangar.com/searchauth.php?search=ar81
 
Last edited:
where can i get this "surf tile calculator made by Pablo Luna."
Search is your friend. I have found it in about 10 seconds after I read your post. I'm sure you could find it in no more than a minute, but it's easier to ask people, and then wait 6 hours for answer.


Could you clarify your definitions of what a "patch" is verses a "tile" especially with respect to the resolution of the starting .bmp as i am trying to digest all that info.
In this case patch = tile. Could you clarify the "resolution" of starting .bmp? This could be density in px/degree (or degrees/px), px/km (or km/px), or simply dimensions of the image in pixels. And dimensions of the image depend on the area you want to cover and patch level.


Am i correct your saying that the tile pattern i see in the tile manager when i open that program is the pattern for a level 8 tile arrangement not 9?
If you count tiles shown you'll see the level. It's level 9 IIRC. If you calculate from formulas I provided, there should be horizontally 12 tiles near poles, and 64 near equator, and vertically 32 tiles.


my specific example:
i started with a 8192 x 8192 24bit bitmap that i wanted to
cover long range [min max] -5.625, 0
and
cover lat [min max] -5.625, 0

i assume possibly incorrectly(I dont know yet) that 64 squares horizontally (like shown in the tile manager when its first opened) multiplied time 8192 would give me 524,288 which is the width of a Level 14 world size bitmap width.
Yes, that's level 14.


Using that reasoning I assumed by bitmap should have been 8192x8192 for at least the equatorial areas.
No. It doesn't need to be 8192x8192 pixels large. It can be 4096x4096 if you want to cover an area of a half of degree squared (horz. x vert.) there, 2048x2048 for a quarter, and down to 256x256 pixels large for 0.17578125 of a degree squared (for areas between -22.5 and 22.5 latitudes).


I have tested it and it appears possible to be correct but now i am having doubts when I just saw your post. So here is where i get unsure of what happen.
So question: did i figure right? Was the 8192x8192 converted/chopped to patches? was my image reduced in resolution to create smaller patches like 256x256 or something? When in orbiter am I looking at someting other than 8192x8192 resolution?
It was converted to 256x256 patches/tiles. If you gave 8192x8192 bitmap for lat -5.625..0, lon -5.625..0, it wasn't rescaled for level 14, but it was downsized for lower levels. When it's rendered as level 14, you're looking at 1024 patches of 256x256 size, and if you created lower levels for it, and when it's rendered as level 9, you're looking at 1 256x256 tile.
 
Last edited:
Back
Top