Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help! with multi-poly VTP area

Featured Replies

Hi all,I am attempting to produce a VTP file with multiple coastline polygons, but am not sure of the proper structure for files with multiple polys. I have attempted to copy the examples here, but (although the file compiles with BGLC) FS hangs up on loading.I've tried two methods, creating a single VTPdataarea with polycount>1, and also multiple VTPdataareas each with polycount=1, but I get the same result:FIRST METHOD ---------------------------------------- VTPDataArea 1, 1, 0, 0 VTPLayer 8, 0 VTPNumTexturesInLayer 1, 0 VTPTextureId 4, 0 VTPPolyCount 2, 0 VTPPolyMethod2 6, 1, 0 VTPWidePoint 7934, 1, 7505, 0 VTPWidePointWidth 1 VTPWidePoint 7934, 1, 7505, 0 VTPWidePointWidth 60 VTPWidePoint 7934, 0, 7505, 0 VTPWidePoint 7939, 0, 7492, 0 VTPWidePoint 7950, 0, 7460, 0 VTPWidePoint 7957, 0, 7441, 0 VTPWidePointWidth 0 VTPPolyMethod2 11, 1, 0 VTPWidePoint 8001, 1, 7411, 0 VTPWidePointWidth 1 VTPWidePoint 8001, 1, 7411, 0 VTPWidePointWidth 60 VTPWidePoint 8001, 0, 7411, 0 VTPWidePoint 8002, 0, 7411, 0 VTPWidePoint 8034, 0, 7401, 0 VTPWidePoint 8043, 0, 7398, 0 VTPWidePoint 8065, 0, 7397, 0 VTPWidePoint 8076, 0, 7397, 0 VTPWidePoint 8095, 0, 7410, 0 VTPWidePoint 8116, 0, 7420, 0 VTPWidePoint 8122, 0, 7428, 0 VTPWidePointWidth 0SECOND METHOD --------------------------------------- VTPDataArea 1, 1, 0, 0 VTPLayer 8, 0 VTPNumTexturesInLayer 1, 0 VTPTextureId 4, 0 VTPPolyCount 1, 0 VTPPolyMethod2 6, 1, 0 VTPWidePoint 7934, 1, 7505, 0 VTPWidePointWidth 1 VTPWidePoint 7934, 1, 7505, 0 VTPWidePointWidth 60 VTPWidePoint 7934, 0, 7505, 0 VTPWidePoint 7939, 0, 7492, 0 VTPWidePoint 7950, 0, 7460, 0 VTPWidePoint 7957, 0, 7441, 0 VTPWidePointWidth 0 VTPDataArea 1, 1, 0, 0 VTPLayer 8, 0 VTPNumTexturesInLayer 1, 0 VTPTextureId 4, 0 VTPPolyCount 1, 0 VTPPolyMethod2 11, 1, 0 VTPWidePoint 8001, 1, 7411, 0 VTPWidePointWidth 1 VTPWidePoint 8001, 1, 7411, 0 VTPWidePointWidth 60 VTPWidePoint 8001, 0, 7411, 0 VTPWidePoint 8002, 0, 7411, 0 VTPWidePoint 8034, 0, 7401, 0 VTPWidePoint 8043, 0, 7398, 0 VTPWidePoint 8065, 0, 7397, 0 VTPWidePoint 8076, 0, 7397, 0 VTPWidePoint 8095, 0, 7410, 0 VTPWidePoint 8116, 0, 7420, 0 VTPWidePoint 8122, 0, 7428, 0 VTPWidePointWidth 0---------------------------------------------------Thanks for any wise words on why both the above code segments do not work for me!Cheers,Iain.

  • Author

Hi Iain.It's a little hard to tell just why the sim is crashing, as you've given us just a fragment of the code... we can't see any of the Cell or Texture indexing.But there is a problem I'm seeing with how you end your line definitions:VTPWidePoint 7957, 0, 7441, 0VTPWidePointWidth 0With this ending, you haven't told the terrain engine that you are going to use a new point width, so it probably starts creating the next line at that point, instead of finishing the first line. Because the code is now out of sync, it crashes the sim. That's my guess.I would suggest you use this:VTPWidePoint 7957, 1, 7441, 0VTPWidePointWidth 0and this:VTPWidePoint 8122, 1, 7428, 0VTPWidePointWidth 0...to end the line segments.Dick

Hi Dick,Thanks for that - that fixed it! I had been trying to generalise from some of the examples, and hadn't noticed the "1" at the end there.So the method with the polycount>1 works, if you remember the "1"!Many thanks,Iain.

  • Author

Hi Iain.The terrain engine just gets lost if it loses pointcount somehow, and that's what happened. The BGLs usually compile, but they are nonsense, or crash the sim.Anytime you switch the width, you need to flag the bit in the preceeding 'VTPWidePoint' code.Dick

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.