Tutorial Surface Tile Transparency Tutorial - Orbiter 2010P1

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,816
Reaction score
640
Points
188
Place holder for upcoming tutorial on making surface tiles, and handling transparency on them.

Stay tuned for exciting developments.

N.
 

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,816
Reaction score
640
Points
188
Good question, I will say yes, with the get-out clause that they may not look like what you want.
I'm basing this tutorial on my Corn Ranch base add-on. Its the latest, and I've still got all the files. It works in 2016, but I think that's just because the mesh in Orbiter is fairly level at that location. My Woomera base is all over the place.

I don't understand Orbiter 2016 tile and .tex structure at all, so this is only for 2010-P1
N.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
Why a placeholder thread? What are the exciting developments?

I'm sorry, but somehow I've got the voice of Cave Johnson in my head now.
 

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,816
Reaction score
640
Points
188
Had to lookl up Cave Johnson, don't get it?

I was asked by a fellow Orbinaut about this subject, and thought it would be a useful addition to the section.

Excitement may follow.

N.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,816
Reaction score
640
Points
188
For marcogavazzeni above.
I don't know if it works or not, but this is just about surface tile transparency.

Starting the "DG at Landing Pad" scenario in the Corn Ranch add-on, I got this screenshot:

http://imgur.com/Z3mQVPN

This is the level-0 tile relevant to the base location. Surface tiles are in the range 0 to 9. Zero is the largest, 9 the smallest.
When I made bases, I tried to use level 9 for areas close to the base, then larger size tiles further from the base.
So the tile above is (one of)the largest, and covers the biggest area.

If you look at the corner of the tile nearest the bottom, you can see it is "blended" or "feathered" into the Orbiter surface. Its not well done, Orbiter uses Landsat imagery(I think), I used Google Earth.
The only thing you can say about it is at least it isn't a hard edge. It also allows me to show the transparency effect.

This is the original level zero tile:

Well, its worse than I thought. My memory that is...
That image is four level 0 tiles associated with the base.
Here is the .cfg entry for those

BEGIN_SURFTILELIST
0 -149 44 3 ;Base tile 1
0 -150 44 3 ;W1
0 -149 45 3 ;N1
0 -150 45 3 ;W1 N1

rest of entries here

I'll explain what this means later, after we have done the transparency part.

Enough for today, I'll be back tomorrow after a think how to proceed.

N.
 
Last edited:

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,816
Reaction score
640
Points
188
By putting a ";" in front of the level 0 base tile entry in the .cfg file, like this.

BEGIN_SURFTILELIST
;0 -149 44 3 ;Base tile 1

That line is ignored, so that tile is not displayed, the view now looks like this:

http://i.imgur.com/easNIw0.jpg?1

As you can see the tile is not displayed, this is very useful while working with surface tiles.
Note also, the higher level tiles that are "above" that tile, and now obvious.

I've found that its best to put tiles levels in ascending order, lowest at the start, highest at the end.

While we are up here, this is a view of the level 0 tile to the West of the base tile.
I think it shows the transparency on the edge more clearly:

http://i.imgur.com/Shw9vAM.jpg?1

For these tiles, there was no way that putting transparency on the external edges helps. The difference in texture/colour is too much. I just put a soft edge on as it looked a bit better than a hard one.
 
Last edited:

llarian

Well-known member
Joined
Apr 1, 2009
Messages
578
Reaction score
159
Points
58
Location
Ottawa
Have you thought of using a series of gradation masks toward the edges to accomplish both a feathering of transparency and a colour gradation from the base terrain to the colour of the tile?
 

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,816
Reaction score
640
Points
188
Hello llarian.
Basically, the tiles are screen grabs from Google Earth. I've never altered these, just made them into .dds files compatible with Orbiter.
I'm no graphic artist, so there's no chance of me doing anything except modifying the transparency. Which leads us nicely into the next bit:)

The program used for transparency, and a good useful utility is DXTBmp by Martin Wright. It can be downloaded here http://www.mwgfx.co.uk/

The DXTBmp program is the sixth button from the left on the bottom row.

One of the things it can do is open a .dds file(Orbiter's Surface Tile format). It displays the main image in the centre of screen, and more importantly, a small image of the "Alpha Channel" at top right.
Its manipulation of the alpha channel that gives the transparency effect.

Here is a screenshot of the level 0 base tile we have been using so far, opened in DXTBmp.

Well, something wrong with my Paint Shop prog, giving gimp a go.
Away for a while, will continue next week.
Back now!
Seems the last windows 10 update has made Paint Shop Pro 9 unusable. Lots of complaints on the internet, all sorts of work-arounds that are too complicated for me.
I'll just use Gimp or Paint for this thread.

N.
 
Last edited:

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,816
Reaction score
640
Points
188
Onward and upward.

Tried to get PSP 9 working, but given up. Another prog killed off by Windows 10.

Any way, here is a screen-grab of DXTBmp after opening tile 0 -149 44 3.

http://i.imgur.com/5L8Rywv.jpg?1

The tiles main image is in the centre of frame, in the top right is a smaller image of the alpha channel. This is the one we are interested in.
DXTBmp has a nice feature that double-clicking on the alpha channel opens it in your paint program.
To set it, click on the icon half-way down the right hand column( a tool-tip shows "Select Editor"). I'm using msPaint.exe in Windows 10, its path is \Windows\System32\mspaint.exe..
If you are using something else, this is where the path to the .exe file is entered.

Here is the alpha channel opened in Paint:
http://i.imgur.com/mQ62qZa.jpg?1

As you can see, most of the image is White, the right-hand edge, and bottom are graded from White to Black with various levels of Grey between.
I used the Darken/Lighten tool in PSP 9. Its all done free-hand, that's why its wobbly...

If you look at the screenshot in #8 above, you can see what effect it has had on the composite image.
Where the alpha channel is White, the tile is opaque. Where it is not White, some degree of transparency is applied, varying to completely transparent(no main image) where the alpha channel is Black.
(going to take a break here, and do some notes on the various DDS types).

N.
 
Last edited:

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
I've used Gimp for PNGs generated by texconv.exe in the OT3 tool-chain. The alpha channel (transparency) is also preserved that way. After editing the PNG, you can use texconv.exe again to create a DDS.
However, you have to use a little trick to get those DDS compatible with 2016. Since you're focusing on 2010, though, I think it doesn't matter.

For those curious, the trick is to set the byte on position 0xA (decimal 10) to value 0x8 instead of 0xA, because the texconv.exe tool (at least in the version I was using) wrongly sets the mipmap-count flag although no mipmaps are created. Normally that's no problem, but Orbiter chokes on them.
 

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,816
Reaction score
640
Points
188
Thanks Face.

I'll persevere with Gimp, as PSP 9 is u/s. However, Paint will be ok for this thread.
Orbiter 2016 is a mystery at present, so this is only relevant to 2010.

Edit: Haven't forgotten this or given up, just in the middle of selling my flat. Strange how solicitors want paying before they even think of doing
something.

N.
 
Last edited:

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,816
Reaction score
640
Points
188
Photobucket has stopped 3rd party hosting, which it seems was something I was doing:

http://blog.photobucket.com/

Its not a moral question, seems I can still do it if I give them some money.

Not going to do that, are their any other sites that will do the same for free?

I may be complaining early, look like its just the "img" link that's affected. As far as I can tell, the "direct" link still works?

N.
 
Last edited:

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,398
Reaction score
578
Points
153
Location
Vienna
I may be complaining early, look like its just the "img" link that's affected. As far as I can tell, the "direct" link still works?

If I follow the link here:

I get this:
photobucketnotebook.png
 

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,816
Reaction score
640
Points
188
Thanks Face, looks like it still works for me, but I suppose it would.

Ho hum, have to think of something else.

N.
 

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,816
Reaction score
640
Points
188
Trying imgur.

Does this work for everyone?

http://imgur.com/a/AEyV4

Thanks Face, just have to transfer the relevant files over now!
 
Last edited:

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
I currently use imgur without problems.
If you want to embed your images in your posts, copy the "BBC link".
 
Last edited:

Notebook

Addon Developer
Addon Developer
News Reporter
Donator
Joined
Nov 20, 2007
Messages
11,816
Reaction score
640
Points
188
Thanks Ripley.
I don't want to embed the images, if the direct link works. I'm guessing it will take more room up on the Orbiter site?

N.
 
Top