Jump to content
Sign in to follow this  
rhumbaflappy

Help! with multi-poly VTP area

Recommended Posts

Guest

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest

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.

Share this post


Link to post
Share on other sites

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

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...