Sign in to follow this  
Guest

LWMDraw4 beta 2

Recommended Posts

Hi AllAlthough I don't have any new documentation ready yet I thought someone might want to try out LWMDraw4 beta 2. The new features include:1. A new tabbed form interface using less screen area yet provides more space for future additional options.2. Selectable LWM Land or Water Mask.3. Selectable VTP Road/Line/Shoreline mode " OR " VTP filled Polygon mode.4. Selectable VTP LandClass texture values. (draw a forest or a city or whatever with autogen effects)5. File menu option to Save and Open a project file. (works nicely but could use a little tweaking)6. I replaced the Cell and Area display Labels with editable textboxes so you can adjust to adjoining areas much easier without having to re-adjust coordinates.There is more I'd like to do in time but until that time comes I hope someone finds LWMDraw helpful and educational as well. I have a feeling TDF files are going to be around awhile in future FS versions and being this is the default FS graphic language we should study and experiment to greater lengths so we can squeez out all the lwm and vtp possibility's.Again I have to say how greatful I am to all the helpful visitors at this forum. The knowledge they freely give to others is truly an inspiration to the entire FS community. With some special emphisis, I want to again THANK Richard for helping me put his knowledge to use within LWMDraw. This tool is already beyond what I thought was possible when I began this project. And now, without further ado, Here's a download link if your interested. Have Fun! (LWMDraw3 and LWMDraw4 can both reside in the same folder if you wish)http://www.flightsimnetwork.com/webads/lwm/LWMDraw4b2.zipI hope you find it helpfulKenPS: Experiment and have fun!

Share this post


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

Absolutely fantastic. Sounds like a dream-come-through. I have been working extensively with LWMdraw3, adding roads, coastline, and VTP polygons in a total of more than 100 LOD13 areas for my EFHN VFR scenery project. Quite a bit of hand-editing of the asm files produced by LWMdraw... I have been longing for the features you are implementing in version 4, so I will download it straight away and give it a run later tonight!Below is a comparison picture where you can see the default MSFS area (with the FinnClass addon from http://fisd.fsnordic.net) and the current status of my EFHN VFR scenery. The shorelines are still missing in this picture but the coastline is finnished and most roads, fields and other area polygons have been added. The area in the works is a total of about 20 km x 12 km.BamceEFHN

Share this post


Link to post
Share on other sites

Hi, Ken! Congratulations, looks like it's coming along nicely. Funnily enough, I had exactly the same problem with my program. I needed to expand the interface so I could add more buttons and stuff without getting too crowded, and to make room for future expansion. So I tried to add a tabbed interface, but I couldn't get it to work so far - partly because I have a limited version of VB5 (Control Creation) with no online help on the CD and no compiler! I've settled on a slightly different solution. I now have a group of buttons that select different forms. It works pretty well. Trouble is, it'll be a lot of work to fill up all that extra form space! Best regards, Chris

Share this post


Link to post
Share on other sites

As an added note I'll be out of the house most of this week because I'm in the middle of teaching my class so I won't be able to get much PC time until next week. Also, I want to note that upon saving a project with LWMDraw I did not include to save the 3rd tab window which includes your opened image along with both ListBoxes for LWM and VTP data points. My thinking here is that if one wants to reopen a project, it's probably because he/she wants to tweak or redo that part of the project. All else does save nicely :)Again, I hope you find LWMDraw helpful.Ken

Share this post


Link to post
Share on other sites

Hi,I'm new in this forum but enjoy your work from the beginning. Thanks a lot for what you've done.I tried your beta to create VTP poly. It works, except I have a very little problem with the generated code. Here is a sample of what I obtain :TextureDataStart label word texturemark_0 label word VTPTextureName VTPTextureType 1, 0, 0, 4 texturemark_1 label word VTPTextureName VTPTextureType 1, 0, 0, 4 texturemark_2 label word VTPTextureName VTPTextureType 1, 0, 0, 4 texturemark_3 label word VTPTextureName VTPTextureType 1, 0, 0, 4 texturemark_4 label word VTPTextureName "120" ;Small City Suburban Non Grid Dry VTPTextureType 1, 0, 0, 4 texturemark_5 label wordTextureDataEnd label wordAs you can see, the textures 0 to 4 have no VTPTextureName attribute. I just copy and paste "120" after each of them, and it solves the issue.I do not know if the problem comes from LWMDRAW or my TDF Macros, as I'm not very familiar with all this stuff. Perhaps could you tell.Thanks again for your great great work. :-)

Share this post


Link to post
Share on other sites

Hi Ken,>Again, I hope you find LWMDraw helpful. Thanks a lot for the update. I'm using it over your previous version now. Great!The only thing that I'm still missing is the option to draw more than one VTPPoly (or road / coastline) in one project. Hopefully you can implement that in the next version 'LWMDraw5' maybe (?). It would result in less BGL files for one scenery project.I still haven't had any luck putting two VTPRoads into one file. BGLC compiles it but FS locks up when loading the scenery. Only VTPPolys seem to work.In LWM it's not a problem.Keep up the good work!Rainer

Share this post


Link to post
Share on other sites

Hi krysst The upper combo-box is NOT optional if your going to place a VTP line or poly. You must place a value there or you'll get the four empty textures within the output source file. The selectable landclass combo-box is optional and if no value is selected then all five texture values will be filled with the upper selected texture value.Note the image above on my original post and you'll notice that I placed a landclass value into both combo-boxes.I hope this helpsKen

Share this post


Link to post
Share on other sites

Hi RainerI'm just beginning to work on updating the documentation for LWMDraw and will include the information how to manually combine multiple VTP lines and polys but in the meantime here's some notes I've copied from our excellent and talented friend. I'm sure this will help you out.How to group multiple Area VTP Lines and Poly's from within a single Cell into one VTPSource.asm file. By: Richard Ludowise-- -- -- -- -- -- -- -- -- -- -- -- -- --The way we have accepted, as a convention, is to place all of a single cell's info into a structure bounded by a set of "datamark" labels. All of the first cell's info will be found between datamark_0 and datamark_1. It's a naming convention that has worked well. All polys or lines that exist within the cell, should then be between the appropriate datamarks.Here's an example of 5 polys, with a Layer of 8:;------------------------------------datamark_0 label word;VTPDataArea 1, 1, 0, 0VTPLayer 8, 0VTPNumTexturesInLayer 1, 0VTPTextureId 0, 0VTPPolyCount 5, 0VTPPolyMethod2 5, 0, 0VTPPointXY2 10160, 11154VTPPointXY2 10221, 11150VTPPointXY2 10226, 11162VTPPointXY2 10196, 11163VTPPointXY2 10160, 11154;VTPPolyMethod2 5, 0, 0VTPPointXY2 10221, 11150VTPPointXY2 10287, 11153VTPPointXY2 10259, 11163VTPPointXY2 10226, 11162VTPPointXY2 10221, 11150;VTPPolyMethod2 5, 0, 0VTPPointXY2 10287, 11153VTPPointXY2 10298, 11161VTPPointXY2 10265, 11167VTPPointXY2 10259, 11163VTPPointXY2 10287, 11153;VTPPolyMethod2 5, 0, 0VTPPointXY2 10298, 11161VTPPointXY2 10296, 11247VTPPointXY2 10264, 11210VTPPointXY2 10265, 11167VTPPointXY2 10298, 11161;VTPPolyMethod2 5, 0, 0VTPPointXY2 10296, 11247VTPPointXY2 10241, 11247VTPPointXY2 10236, 11210VTPPointXY2 10264, 11210VTPPointXY2 10296, 11247;datamark_1 label word;------------------------------------Note in the above code, that the VTPPolyCount is 5, to reserve space in the datastream for 5 polys in the structure. The rules for grouping lines are the same as polys. Here's an alternate method of grouping the polys:;-----------------------------------datamark_0 label word;VTPDataArea 1, 1, 0, 0VTPLayer 8, 0VTPNumTexturesInLayer 1, 0VTPTextureId 0, 0VTPPolyCount 1, 0;VTPPolyMethod2 5, 0, 0VTPPointXY2 10160, 11154VTPPointXY2 10221, 11150VTPPointXY2 10226, 11162VTPPointXY2 10196, 11163VTPPointXY2 10160, 11154;---------------------------------VTPDataArea 1, 1, 0, 0VTPLayer 8, 0VTPNumTexturesInLayer 1, 0VTPTextureId 0, 0VTPPolyCount 1, 0;VTPPolyMethod2 5, 0, 0VTPPointXY2 10221, 11150VTPPointXY2 10287, 11153VTPPointXY2 10259, 11163VTPPointXY2 10226, 11162VTPPointXY2 10221, 11150;-------------------------------VTPDataArea 1, 1, 0, 0VTPLayer 8, 0VTPNumTexturesInLayer 1, 0VTPTextureId 0, 0VTPPolyCount 1, 0;VTPPolyMethod2 5, 0, 0VTPPointXY2 10287, 11153VTPPointXY2 10298, 11161VTPPointXY2 10265, 11167VTPPointXY2 10259, 11163VTPPointXY2 10287, 11153;--------------------------------VTPDataArea 1, 1, 0, 0VTPLayer 8, 0VTPNumTexturesInLayer 1, 0VTPTextureId 0, 0VTPPolyCount 1, 0;VTPPolyMethod2 5, 0, 0VTPPointXY2 10298, 11161VTPPointXY2 10296, 11247VTPPointXY2 10264, 11210VTPPointXY2 10265, 11167VTPPointXY2 10298, 11161;-----------------------------------VTPDataArea 1, 1, 0, 0VTPLayer 8, 0VTPNumTexturesInLayer 1, 0VTPTextureId 0, 0VTPPolyCount 1, 0;VTPPolyMethod2 5, 0, 0VTPPointXY2 10296, 11247VTPPointXY2 10241, 11247VTPPointXY2 10236, 11210VTPPointXY2 10264, 11210VTPPointXY2 10296, 11247;datamark_1 label word;--------------------------------Here, I used 5 separate data structures, each with a VTPPolyCount of 1. This code produces the same effect as the first example. The structures still must reside between the appropriate datamark labels, so they are assigned correctly into the right cell. Of the 2 methods, the first would be preferred, as it is more code efficient, and follows the SDK's datastream explanation more closely. Note that the first method requires the grouping according to the Layer number. The second example lends itself better to cut'n'paste editing. I also like the greater modularity of the code, as I can add or delete lines without worrying about keeping track of my VTPPolyCount numbers. Since each poly exists as a separate structure, you can change Layer numbers, or texture IDs, easily, with each poly. Your choice.Dick

Share this post


Link to post
Share on other sites

Thanks a lot Ken. I'll whip myself two times for not reading carefully. ;-)It is working perfectly this far!

Share this post


Link to post
Share on other sites

KrysstYour more than welcome. In an experiment that took less than a minute, I placed a VTP landclass poly, value "4" that's shown in first post in this thread, having to click only four points that covered 9 LOD 13 Areas. I used layer 7 so the LWM water mask would cut through it and used layer 8 on the shoreline. The result is a nice lake with shoreline within a forest of autogen conifer trees. Here is a screenshot showing the same area and I'm wondering what other possibilities we can all come up with after more experimenting.Have FunKen

Share this post


Link to post
Share on other sites

Hi, Ken. The new version is the first one that works on both my machines! The new interface is very good and simplifies the work quite a bit. One thing I noticed was that when you clear the VTP list the program does not reset the counter and start from one next time you add a point. I ended up with a correct file for my first area, but my last area had a file with only 6 VTP poly points but 31 points + 76 ex-points in the headers... Didn't look at the numbers while I was working...And then one more small wish. When switching back and forth between various LOD13 areas (which is much easier now!) I would like to keep track of what I actually wrote in the boxes while I am in the bitmap view. Look at my suggestion below. Would it be possible to add this feature? At least a display of the current area, but if it could be combined with arrow buttons to move around to the neighbouring areas it would be even better...?BamceEFHNSuggestion only:

Share this post


Link to post
Share on other sites

I actually considered making my own tool some time back, but is too lazy to do it. Anyway, my idea was to do the following:1) Load bitmaps directly in any size (as long as they are not "stretched"). The user can then define the exact position of two points on the bitmap and it will be rotated and scaled into place. On top of it the user could select alpha transparency (as several bitmaps could be loaded at the same time, for example to overlay a map scan on top of a FS screenshot). Just for the fun of it, I added gamme correction, brightness and changing to monocrome (any color, so one bitmap could be red/black, while the other was green/black).2) Allow drawing across the cells (and even areas). After all, each polygons can easily be clipped to the individual cells at the time the source code is compiled.3) All polygons and lines should saved in the project, and it should be possible to load the project, move points in the polygons and then regenerate.Any chance some of this makes it into LWMDraw? There is not much point in sitting creating competing programs just because we want slightly different feature sets, and I could use my time on other stuff (like improving EditVoicepack). I guess 1) might be a bit difficult if you are stuck with legacy development environments like VB6, Delphi, or C++. In .Net, it's extremely easy. 2) should be easy to implement, and it is more important than 1) in my opinion.

Share this post


Link to post
Share on other sites

Hi lmoelleb!I am thinking about the same things as You do in first 3 points of Your post but it is not so easy to do programm all of this, especialy if You remember, that Ken actually started programming in VB with this programm. I think he did a lot of work here and I must say (as a programmer) that his work is really impressive. I also thought of making a program similar to LWMDraw and AutoASM (together) because right now I have a problem with roads. Roads in Slovenia in FS are way of reallity and they should span many kilometers and I really need a program, that would make a straight line (for example) across let say 5 LOD13 quadrants with only few points. Falko's program is really helpful here but the problem is, that for 20km long road it uses 120 points... I was thinking about making such software and as an open source project where some of us could join and make universal program for making roads, shorelines, LWM, VTP polys etc... And if I remember that I made a whole 40km of Slovenian coast with LWMDraw and spent whole day making it and how much faster could it be if the LWMDraw could span across some LOD13 (maybe also LOD8) quadrants...Unfortunatelly I am allmost whole day at work, so I have a big lack of time to make such a program on my own. So I would rather propose to make an open source project to make it (named for example FS Land Creator). Regarding development environment I would not bother if it is done in .net. For many of users this would mean downloading 20MB update for .net and I think that for such a programm time has not come to make it in .net although this would make a really universal project. This means that if some of us would join this way, some of us could write parts in Delphi, others in VB, C... I would prefer Delphi, because for end user it would mean, that he or she does not need to download any VBRunxx.dlls and other updates and of course, I programm with it for some years now. :) Anyway, I think we should gather and together produce some kind of universal program to make these things. Ken and CWright are on the way to do it and RhumbaFlappy is master of LWM/VTP art :)Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Hi Ken,Thanks for your quick reply.>How to group multiple Area VTP Lines and Poly's from within >a single Cell into one VTPSource.asm file. By: Richard >Ludowise This was the original reply from Dick to my question:-)Unfortunately Dick's example covers VTPPolys only. Doing exactly the same with VTPLines (roads/costlines) results in the error that I get when loading such a compiled scenery file.Am I the only one?Rainer

Share this post


Link to post
Share on other sites

Hi Ken,I love the new interface! I was playing with it last night and it's really coming along, feature-wise. This is turning into a very helpful tool. I did notice one problem on install that I've never had before. When I unzipped the program and tried to run it for the first time, I got an error stating that "tabctl32.ocx" wasn't registered on my system. I'm not sure if it's a problem with my system or what, but I hacked into my computer at work and found it there and just registered it on my home computer and all was well. I have Visual Studio installed at work, so I figured that's where it came from. Strange that I didn't have it on my home computer...thanks,

Share this post


Link to post
Share on other sites

Hi Ken,Same problem with "tabctl32.ocx" error for me.I have W98 se,not XP ,and LWMdraw 3 is quite OK.ThanksDaniel

Share this post


Link to post
Share on other sites

>Same problem with "tabctl32.ocx" error for me. >I have W98 se,not XP ,and LWMdraw 3 is quite OK. I forgot to mention it, but i also had that problem. I made a search on Google and found this site:http://www.ascentive.com/support/new/suppo...me=TABCTL32.OCXFrom there, I downloaded just the dll into my Windows/system32 directory, renamed it from TABCTL3N.OCX to TABCTL32.OCX and finally manually registered the file in the Windows registry (just read the explanation on how to do it on that download site...very simple procedure). That solved my problem and LWMdraw works fine!BamceEFHN

Share this post


Link to post
Share on other sites

Thank you for the tip Bamce.LWMdraw4 works fine now.Daniel LFNA

Share this post


Link to post
Share on other sites

>Hi lmoelleb! >I am thinking about the same things as You do in first 3 >points of Your post but it is not so easy to do programm all >of thisI have been fooling a bit arround in the .Net frameworks 2D drawing functions, and so far it looks like it should be VERY easy to program these three points. It's repeating all Ken's code to generate the BGL source code that really sucks. :)>, especialy if You remember, that Ken actually >started programming in VB with this programm. I think he did >a lot of work here and I must say (as a programmer) that his >work is really impressive. Yes, no complains there, but still, I think he will start to have too much a strugle with VB to keep driving the userinterface forward - I hope he proves me wrong.>I also thought of making a program similar to LWMDraw and >AutoASM (together) because right now I have a problem with >roads. Roads in Slovenia in FS are way of reallity and they >should span many kilometers and I really need a program, >that would make a straight line (for example) across let say >5 LOD13 quadrants with only few points. Falko's program is >really helpful here but the problem is, that for 20km long >road it uses 120 points... I was thinking about making such >software and as an open source project where some of us >could join and make universal program for making roads, >shorelines, LWM, VTP polys etc... And if I remember that I >made a whole 40km of Slovenian coast with LWMDraw and spent >whole day making it and how much faster could it be if the >LWMDraw could span across some LOD13 (maybe also LOD8) >quadrants... As far as I can see, the problem with spanning larger sections is not really when you cross areas and cells (I prefer the official MS terms). It is that sooner or later, the fact that the earth is round is going to effect the projecttions of the images used as background. I have no idea if this becomes a problem over 20km or 2000km, but suspect it is somewhere inbetween. :)>Unfortunatelly I am allmost whole day at work, so I have a >big lack of time to make such a program on my own. So I >would rather propose to make an open source project to make >it (named for example FS Land Creator). >Regarding development environment I would not bother if it >is done in .net. For many of users this would mean >downloading 20MB update for .net and I think that for such a >programm time has not come to make it in .net although this >would make a really universal project. This means that if >some of us would join this way, some of us could write parts >in Delphi, others in VB, C... I have been forcing people do do it for EditVoicepack, and very few people are actually complaining (to me at least). When they do, I simply tell them that even though it might take them some hours to download it over their modem, it is nothing compared to the time it would take me to program it in a legacy environment... It helps a bit that they have nowhere else to go for updateded callsigns, so take it or leave it. :)>I would prefer Delphi, because for end user it would mean, >that he or she does not need to download any VBRunxx.dlls >and other updates and of course, I programm with it for some >years now. :)I am not aware of how powerful Delphi is on the graphics side. If it is using GDI (the native Windows drawing functions as it has been since Windows 95) compared to .Net's GDI+ I would not even consider starting.I know I would not join the project if it's Delphi, but that should not stop the rest of you from making a program I can use. :)> Anyway, I think we should gather and together >produce some kind of universal program to make these things. >Ken and CWright are on the way to do it and RhumbaFlappy is >master of LWM/VTP art :) I am currently working on some basic stuff I would need for other purpose anyway. It should be able to render the background bitmaps as mentioned. It is taking quite a while, as I am doing it "the right way", with XML serialization, multithreaded repaints, full Undo/Redo functionality in the data model, all other time consuming stuff that is nice to have later. It's a pain to do, but if it isn't done from the start it will be even worse to add it later.When I am done with this (if I don't get distracted and move on to something else), I will take a look arround to see if Ken (or someone else) has some code that can generate coastline over larger areas, and with save/load/edit. If it exist, I will use it (photoshop can do the image manipulation anyway) and move on with my project. If it isn't available I will consider if it's worth it to put into my own code, or make it possible for other people to start contributing. I guess I will be ready for this step sometime between tomorrow and the year 2135 around noon (you are welcome to send an email at that time if I forgot to post here that I'm done). :)/Lars

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