Page 1 of 1

Tilted planes

Posted: Sat Mar 05, 2005 3:05 am
by Luis Sa
Hi,

When I finish writing this post, I will upload:

http://www.ptsim.com/downloads/sbyyy.zip

a pre-version of SBuilder 2.05 that uses a new polygon format to support tilted planes. I made routines to convert old projects to version 2.05 but please be careful (now SB writes a backup file just in case). Before Sbuilder 2.05, LINES were sets of XYZ points defined by:

- longitude
- latitude
- width

and POLYS were sets of XY points defined by:

- longitude
- latitude

Now POLYS are sets of XYZ points defined by:

- longitude
- latitude
- altitude

Important Notes:

a) point altitudes in polygons are ignored in all cases except in polygons of type LWM.

b) LWM BGLs are now generated with "Poly3()" style commands. Therefore they will not work anymore in FS2002.

c) when you generate a LWM mask you need to press "Change" in the altitude box in order to set the altitude. "OK" is not sufficient. The idea is to make the working with "altitudes in polygons" very similar to the working with "widths in lines".

Here is a illustrated example to create a tilted plane. You can use this for tilted runways or for LWM rivers that approach the sea (altitude is 0 when the river reaches the sea but not 0 when the river is far from reaching the sea ocean).

Image

In the example I have a polygon with 9 points. I want Point 9 to have an altitude of 20 meters and point 5 to have an altitude of 60 meters. The line that contains points 9 and 5 makes an angle of alpha with the horizontal plane. I want all the remaining points of the polygon to belong to the tilted plane that passes through 9 and 5 and that makes an angle of alpha with the horizontal plane. Here is what I have to do:

Image

I start by drawing a polygon in the normal way (yellow). Then I enter the properties page and define the type of the polygon to be LWM WATER. I enter an altitude of 50 meters which will be applied to all points as soon as I press "Change". I used the value of 50 as it is a value between the extreme values of 20 and 60 that I want to define for the 2 important points - point 9 and point 5!. Then:

Image

I enter the properties of point 9 and I declare its altitude to be 20 meters as in this picture:

Image

And then I do the same for point 5:

Image

I skip the picture where I declare the altitude of Point 5 to be 60 meters and I show the what I get if I reenter the properties of the polygon. I go for the "Points" window which looks very similar to the one you get when you are setting widths in VTP lines. The main difference is that you set altitudes instead of widths:

Image

The window shows the highest and the lowest point which is in accordance to the previous settings. Now if I press "Change" in the Progressive window, points 1 2 3 4 6 7 and 8 will get the altitude that places them in the target tilted plane.

That is all. Do not press "Change" on the left as it would make all points at 40 meters! Just press OK and compile to see the result.

******** Remeshing? will it work? ********

You can set altitudes of individual points and force the mesh to your altitudes. I did not test this and will be glad to hear of any trials.

I also wish to receive feedback on this feature. I plan to use these tilted planes in conjunction with textured polygons to make photo scenery that "brakes" the 4.8 meter barrier.

Regards, Luis

Posted: Sat Mar 05, 2005 4:31 am
by Horst
Hello Luis,
Sounds great, (not finished Vtp poly import yet [:)])
I will do it with river polygons.
Before I start:
Is there any limitation on the point quantity of the polygons?
Or any limitation to the distance of the points?
(in your example: between 5 and 9)
As far as you know.
I hope there is some time left in the next days.

Kind regards
Horst

Posted: Sat Mar 05, 2005 5:11 am
by Luis Sa
Hi Horst,

There is no limit. The XY processing of LWM polygons (slicing accros LOD13 borders, etc.) remains the same.

You can append BGL tilted polygons but there is one diference, in this case, when the polygon spans several LOD13 squares. Because the polygon is divided when you compile, there is no way that can import back the tilted direction (line 5 to 9).

Regards, Luis

Posted: Sat Mar 05, 2005 5:39 am
by Horst
Hello,
Thanks, only thinking loud about merging the polygons again.
So I can do the main river, and use the information for the tributary polygons.
I will merge them in this way.
Better trying, than writing!
But I am very happy that you try this approach.
I will be back with my feedback.

Thanks again
Horst

Posted: Sun Mar 06, 2005 8:38 am
by RF
Hi Luis;
The tilted plane feature is a great addition and also the improved VTP Poly compilation. I've just tried a simple adjustment (change of 5m from one end to the other of a runway) to an airport flatten and it seems to work fine. Thanks for all your efforts.

Does anyone know of a way to set up an AFCAD file to properly display on slopes? I tried using Jabbgl to adjust height at each end of the runway but FS displays the runway at a single elevation only.

One thing I noticed about the new properties page for LWMs is that when you append existing LWMs the listed elevation is "0" instead of the existing elevation. It would be convenient to be able to see this.

Ross

Posted: Sun Mar 06, 2005 10:33 am
by Luis Sa
Hi Ross,

Thanks for the feedback! It is too late for me to test this, but I think that I forgot to read the altitude when appending old LWMs (made with Poly2 instead of Poly3). So you get 0!

I think that if you append one of the new LWMs you get the correct altitude. Is it not?

Regards, Luis

Posted: Sun Mar 06, 2005 11:54 am
by RF
Yes, that works. So not a problem, I can recompile the old LWM bgl first if necessary. Thanks.
Ross

Posted: Tue Mar 08, 2005 3:38 am
by Luis Sa
Hi,

sbyyy with date of today has this error corrected. The error was that appended LWM polygons (old style) got zero altitude. Now it should be fixed!

Luis

Posted: Tue Mar 08, 2005 6:19 am
by RF
Hi Luis;
Yes, appending old LWM files now works. Unfortunately I just discovered that unlike rbrown having deep holes I can't actually even open my old sbp projects. I get a "run-time error 5; illegal procedure or argument call" error. Do I need to chamge something in my .ini file?
Ross

Posted: Tue Mar 08, 2005 8:00 am
by Luis Sa
Hi Ross,

Thanks for testing! I will look to the "holes problem". Sorry if something is going wrong.

Edited - I read better and saw your problem is not holes! Could you send me a file by email so that I can test it here?

Thanks,

Luis