Sign in to follow this  
rhumbaflappy

VTPPolys

Recommended Posts

Hi everybody, just another question concerning VTPMethod2 polys, that are _not_ lines. The SDK says something that they should be fan-shaped, but I do not know exactly what is meant by this. Does it mean that there is a restriction on the shape of such polys? Do we have to split up more complex shapes into triangular ones, especially if the shapes are concave? The question interest me because I would like to tranform poly's drawn for FS98 in the procedural section with the SCASM Poly( ... ) instruction to VTP poly's because I think they would merge much better with the surrounding territory and they cling to the mesh, so that I do not have to bother about flattening the terrain for their display. This could be automated more or less the same way as SCM2VTP apparently works for lines, it would require just a little bit math in the program to transform between the two different grid systems. But if I have to split up polygons the program would become a bit more complicated.Thanx in advance for any advice- osman

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi osman.Although the terrain engine is pretty forgiving, the rule of thumb is that shapes should be convex, or 'fan shaped'. The only way to see if a shape requires splitting, is to try it.I've found very large shapes, with shallow angles are fine. Smaller shapes with more acute angles may cause problems... but not always.Dick

Share this post


Link to post
Share on other sites

I don't know what you call big or small Dick :), but when I for example made an airfield grass polygon that is about 1 x 1.5 km with a most corners around 90 and 60 degrees I found out that one of the corners was skipped.As in our NL2000 scenery we still have a lot of polygons that completely don't display because their shape is to complex.To solve that (and also because I use it in my Bumpy tool) I made a triangulate algorithm. If someone is interested I can share it (at the moment I have it as a VB module and as a discription of the steps I took).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Hi Arno,having been away for a week I found your message on return. I would be very interested in your triangulate algorithm, because "trial and error" would not be the best approach if you want to transform a large number of fs98 type polygons to vtp polygons. A VB6 module would do fine, because you could easily convert it to VisualC, the language I am used to program in. A descriptions of the steps you took would probably be fine too, but why do work twice?If you want to cantact me privately, here is my eMail: winfriedorthmann@yahoo.com.Sincerely yoursWinfried

Share this post


Link to post
Share on other sites

There is a method for the best triangulation : the Delaunay method.In a point cloud, take 3 points : if in the circle going thru the 3 points there is no point, you have your triangle.This method is recursive.Seems easy, but if you have imbricated polygons to tranform in triangles, there is a lot to do, because we must use the segments of the polygons as sides for the triangles. There is always a solution.Christian

Share this post


Link to post
Share on other sites

Hi All.There aren't many default VTP polys in FS2002, oither than the airport backgrounds. But there are some.pkp*.bgl and nph*.bgl are VTPm2 polys. You can get a sense of them with TMFViewer. And TMFViewer will show the triangulation MS used.Dick

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this