Jump to content
Sign in to follow this  
rhumbaflappy

LWMViewer tool for FS2004

Recommended Posts

Guest HotShot

Everything seems OK with the 'source code' feature - at last I was able to get rid of the ugly default flattens.Thanks Jim ! :)

Share this post


Link to post
Share on other sites

Hi Jim.I've e-mailed the new TDFMacros.inc to you.I'm maintaining the names as the LWM series developed:LWMPoly3 Macro PointCount, Reserved, Attrib, HeightBottom, FractionBottom, HeightTop, FractionTopLWMPoly3Ex Macro PointCount, Reserved, Attrib, HeightBottom, FractionBottom, HeightTop, FractionTop, ExPointCountLWMPoint3 Macro x, y, zAlso I've added:VTPChildPoint Macro ChildX, ChildY, WidthFlagto deal with the newer line types introduced in FS2002.The LWMPoly3 maintains the ability to set the land attribute, and maintains the reserved bit... for whatever purpose MS has for that bit.I'll post the updated macros in a few days. They do maintain backward compatibility with FS2002 and CFS2, and will be able to be used with Ground2K, Ground2K4, CoastLine Maker, Cellgrid...Dick

Share this post


Link to post
Share on other sites

Hi Jim:thanks for the new update and for incorporating my request!Here's another one ;-)I was just working on a project and running Ground2K4 and LWMViewer parallel. I wanted to place a new road as accurately as possible but needed to know the placement of the default shoreline (to avoid ending up on the wrong side of the shore). I managed by taking coordinate readings along the way but it would have been much easier if LWMViewer had an option to blend in a LOD13 grid, perhaps as a toggle. This would allow for a direct cross-reference with the Ground2K4 grid.Thanks again for an invaluable tool!Cheers, Holger

Share this post


Link to post
Share on other sites
Guest HotShot

To continue with requests...LWMViewer provides information regarding the current cell and area already ; what about displaying the corresponding 2x2, 4x4, 8x8 AreaFills coordinates ? It would make editing source code a little easier. :)

Share this post


Link to post
Share on other sites

Hi HotShot.Regarding areafills:Areafills do not work correctly in FS9... unless they are the "base" level LWM BGL, they won't display correctly in the GPS or map view.So unless you are replacing the defaults, there would be no reason for you to need the coordinates of the areafills.There are actualy only 2 good reasons to replace the default LWM BGLs:You wish to remove all flattening from the code... to do so requires a parsing program to change the code of all flattening to FS2002 LWMPoly2 style polys and set all Areafill heights to "-9999, 0", and change the version code to 201h.Or, you wish to use code that is greatly more accurate ( perhaps from TIGER data ) that covers the entire LOD5 area, in which case you don't need LWMViewer at all. You'd need a GIS program to select and crop the data, and a means of generating either a reasonable sized bitmap of the LOD5 area, or script code that will auto-generate the BGLC code from the lat-long shapes.If your code is for FS2002, then the areafills will work above the "base" level.If your running the sim, TCalc2004 ( for FS9 ) or TDFCalc2004 ( for FS2002 or CFS2 with an older version ( non-commercial ) of FSUIPC, will give you appropriate areafill code numbers.Dick

Share this post


Link to post
Share on other sites

Hi Dick:"Or, you wish to use code that is greatly more accurate ( perhaps from TIGER data ) that covers the entire LOD5 area, in which case you don't need LWMViewer at all."I understand how you mean this sentence but others might not. It's actually not quite as black and white. As you know, my approach has been to make a "master copy" of a LOD5 area, from FS2002 HYP files. Then I've edited the elevation values of those lakes I wish to retain (to conform with the new high-res add-on mesh) and removed those lakes that I completely remade in Ground2K4. For both steps, LWMViewer is a huge improvement in efficiency, as it becomes much easier to determine the LOD13 cells of the individual lakes in the master copy .asm file. And there's no need to remake an entire LOD5 area at once.Cheers, Holger

Share this post


Link to post
Share on other sites

Hi Holger.But you are making an LOD5, right? If you don't, the old flattens remain, and there is no current remesh sceme to get rid of the old flattens.One of the basic problems of scenery redesign is the residual flattens from reworked waterpolys. MS has provided a scheme to rid ourselves of these by organising the terrain scenery in LOD5 chunks. We just need to get the data.Your method does not challenge MS' poly shape data... just it's height. That will make these polys fit more accurate mesh better, but the poly shapes are still wrong.In this case, it might be better to rework the default FS9 code into FS2002 LWMs, and remake all height to "-9999, 0", and let the default cling to the mesh. Then, more accurate data can eventually be made to overlay THAT file, when the data or time becomes available. This re-replacement overlay doesn't require the deletion of the reworked LWM BGLs, as they have no height... they can just be overdrawn with smaller areas of LWMs.Dick

Share this post


Link to post
Share on other sites
Guest HotShot

Hi Dick,thanks for the info. I have never experienced such a GPS/map issue while "editing" (actually removing) some FS9 default flattens but now I see what you mean.Cheers,

Share this post


Link to post
Share on other sites

Hi Dick:I guess this is getting a bit off-topic..."Your method does not challenge MS' poly shape data... just it's height. That will make these polys fit more accurate mesh better, but the poly shapes are still wrong."It's a combination of two approaches: most of the lakes retain their old flatten and just get a new elevation, but a whole bunch of others -- those in the "core zone of my area of interest -- get removed from the default files. In other words, any lake that I make with new coastlines will NOT have an incorrect flatten in my re-compiled "master copy". So, I do challenge the default flattens.The new Canadian CDED1 1:50k data actually have small flat areas for each lake, even the tiniest ones. That's pretty impressive but also pretty unusual. With these kinds of data your suggestion about the mesh clinging lakes might work but only if the new lake polygons, however derived, exactly match those flat areas. Otherwise you'll still end up with water crawling up or down the slopes.Cheers, Holger

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.I had a request to add that a week or so ago by email. I said it was unlikely simply because there didn't seem to be anywhere obvious to put the extra data, without recreating all the status displays as a separate area in another window somewhere. Besides, it's just a case of dividing by four or whatever, right? Suggestions on placement welcome, though.LOD13 grid : I've often thought about that, and never got round to it. Good idea, though.Source export : Thanks for the updates to the include files - I'll look at them tonight. I've added VTP export and fixed a possible bug with the output of more than one file, where the number of index entries could have been incorrect. Co-ordinate export : almost there. Honest.VTP Method 1 display bug : yep, they were silently ignored. Oops. Fixed.Upload tomorrow 'cos I left my USB key at home :)Regards,Jim Keir.

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.Thanks - I've updated accordingly and made a few other tweaks: VTP source export is in, and the LOD13 grid option has also been added.I'm sure the source export will need a little adjustment yet before it's completely ready. I didn't have the new macros on me last night when I made the changes, for a start. However, I'll have them tonight and I'll double-check the exports.I notice that the CFS2 macros were also there; do CFS2 files display correctly? If not, could you send me one so I can correct it?Regards,Jim Keir.

Share this post


Link to post
Share on other sites
Guest jimkeir

Hi.Replying to my own posts again...A new update today, with fixes to source exporting, the latest TDFMacros.inc and support for CFS2 files added. And just as I thought I was about finished, they change the format to XML. Bugger.Regards,Jim Keir.

Share this post


Link to post
Share on other sites

Hi Jim.The decompilations seem to be right on the money! CFS2, FS2002 and FS9 all check out OK.Thanks for this great tool.I wouldn't sweat the XML format. These don't affect terrain design, but deal with the placement of objects and airport elements... although we do need a decompiler. ;)( As a side note... the TDFMacros.inc and TDFHeaders.inc can replace any existing copies anyone might have on their systems. These are the last update for FS9... I hope. )Dick

Share this post


Link to post
Share on other sites

Hi,I've used LWMViewer to export BGL source and it contains reference to LWMPolyV3 and LWMPointV3 both of which are missing from the inc files. However, I found LWMPoly3 and LWMPoint3 in FS2K4.inc, so I assumed that these were the macros.Unfortunately, LWMPoly3 has 7 parameters whereas the exported source uses it with only 5, I guess that the missing parameters are Pad and Attribute. LWMPoly3 calls LWMDataAreaHeight with the last two parameters which are missing and the compilation fails.Can anyone please tell me how to correct this?George

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...