Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Tutorials & Challenges
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Tutorials & Challenges Feel free to publish your tutorials, challenges, & flight scenarios in this forum.

Reply
 
Thread Tools
  #1  
Old
Notebook's Avatar
Notebook Notebook is offline
Donator


Default Surface Tile Transparency Tutorial - Orbiter 2010P1
by Notebook 06-03-2017, 08:35 AM

Place holder for upcoming tutorial on making surface tiles, and handling transparency on them.

Stay tuned for exciting developments.

N.
Reply With Quote
Views 793 Comments 13
Total Comments 13

Comments

Old 06-03-2017, 11:16 AM   #2
Abloheet
Addon Developer
 
Abloheet's Avatar
Default

Can the .DDS files generated be used in orbiter 2016 too?
Abloheet is offline   Reply With Quote
Old 06-03-2017, 11:40 AM   #3
Notebook
Donator
 
Notebook's Avatar


Default

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.
Notebook is offline   Reply With Quote
Thanked by:
Old 06-03-2017, 12:53 PM   #4
Face
Beta Tester
 
Face's Avatar

Default

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.
Face is offline   Reply With Quote
Old 06-03-2017, 12:58 PM   #5
Notebook
Donator
 
Notebook's Avatar


Default

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.
Notebook is offline   Reply With Quote
Old 06-03-2017, 01:09 PM   #6
Face
Beta Tester
 
Face's Avatar

Default

Quote:
Originally Posted by Notebook View Post
 Had to look up Cave Johnson, don't get it?
Fictional character of the Portal game. Sounds like a car seller while explaining how exciting it is to die for science tests to the player. Never mind.
Face is offline   Reply With Quote
Thanked by:
Old 06-03-2017, 02:37 PM   #7
marcogavazzeni
Addon Developer
Default

Does this not work? I do not know why I have not tried anymore ....

https://www.orbithangar.com/searchid.php?ID=5607
marcogavazzeni is offline   Reply With Quote
Old 06-03-2017, 02:51 PM   #8
Notebook
Donator
 
Notebook's Avatar


Default

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://i89.photobucket.com/albums/k2...psz5zcpjrd.jpg

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

Quote:
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 by Notebook; 06-17-2017 at 08:39 AM. Reason: update
Notebook is offline   Reply With Quote
Old 06-04-2017, 02:39 PM   #9
Notebook
Donator
 
Notebook's Avatar


Default

By putting a ";" in front of the level 0 base tile entry in the .cfg file, like this.

Quote:
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://i89.photobucket.com/albums/k2...ps3mraxxbe.jpg

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://i89.photobucket.com/albums/k2...pswltxohn3.jpg

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 by Notebook; 06-04-2017 at 11:13 PM. Reason: spelling
Notebook is offline   Reply With Quote
Old 06-05-2017, 01:11 AM   #10
llarian
Orbinaut
 
llarian's Avatar
Default

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?
llarian is offline   Reply With Quote
Old 06-05-2017, 08:34 AM   #11
Notebook
Donator
 
Notebook's Avatar


Default

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 by Notebook; 06-13-2017 at 06:10 PM.
Notebook is offline   Reply With Quote
Thanked by:
Old 06-17-2017, 08:49 AM   #12
Notebook
Donator
 
Notebook's Avatar


Default

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://i89.photobucket.com/albums/k2...pseg3wktzn.jpg

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://i89.photobucket.com/albums/k2...psizyzsxr4.jpg

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 by Notebook; 06-17-2017 at 10:22 AM.
Notebook is offline   Reply With Quote
Old 06-17-2017, 09:14 AM   #13
Face
Beta Tester
 
Face's Avatar

Default

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.
Face is offline   Reply With Quote
Thanked by:
Old 06-17-2017, 09:34 AM   #14
Notebook
Donator
 
Notebook's Avatar


Default

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.

N.
Notebook is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Tutorials & Challenges


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 12:19 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.