Sign in to follow this  
Guest

VTP Tutorial 2

Recommended Posts

Help AVSIM continue to serve you!
Please donate today!

Hi Chris.An odd shaped flatten can be made with LWM polygons, and that seems a better approach to your problem. As I mentioned in another post, LWMs anf VTPs cannot coexist in the same BGL, so you're looking at making 2 BGLs.First, what I usually do is to make a "workshop" folder, right on the desktop... let's call it 'AirField'. Inside this folder, make 2 sub-folders: 'scenery' and 'texture'. Copy the textures from the Cellgrid2 download into the texture folder. Copy TDFMacros.inc, TDFHeaders.inc, BGLC.exe, and Cellgrid.inc into the workshop. You can also place a copy of TDFCalc3 into the 'Airfield' workshop folder. My suggestion is that you make your BGLC code with notepad, and save the code as a text file ( filename.txt ). Those txt files can be drag'n'dropped onto the BGLC icon to compile. In 'C:Windowssystem32' you can find an application called 'cmd.exe'...copy that to your workshop. It is the DOS command prompt in WindowsXP. ( I don't recall the equivalent in Windows98, but there is one ). This will allow you to use BGLC in DOS if there is a compilation problem. The command is "BGLC MyFlatten.txt", for your flatten BGL. This way of compiling will display error codes from BGLC... and give the line numbers of the errors! Very handy.Now the workshop is set up.--------------------------Do you have the 'FSUIPC.dll' installed as a module in the sim? If not , do so. Then, after you enter a flight, and have the sim in windowed mode, you can doubleclick TDFCalc3's icon, and it will startup, and display your Area, Cell and Point info. You can now slew around and find exact TDF points in the sim, as well as elevation info.--------------------------Then use Cellgrid2, and install the grid over the 4 LOD13 Areas you have mentioned. The instructions are in the download zip. I've made it pretty easy to use. As long as there is only one LOD8 Cell affected, then you only need one Cellgrid. I'd name the text file as 'AirfieldCellGrid.txt', and then when you compile it, the BGL will be 'AirfieldCellGrid.bgl'... move that BGL to the workshop's 'scenery' sub-folder. Then go ahead and start the sim. Go to the Scenery Library, and add the 'Airfield' workshop. slew over your area, and you should see the cellgrid draped over your airfield, gridded in red and blue squares that define the edges of the LOD13 Areas.-------------------------Let me know if you get this far. Also give me the Cell and Area numbers of the Areas you need to work on. Then I can also work on this with you.Dick

Share this post


Link to post
Share on other sites

Hi,I have done exactly as you want me toHere is the areaEuropeDenmarkHadsundTFD area 26 , 17area point 16, 140cell 405, 94what i need now is flatten all 4 cells, becaurse i have buildings and farms in one gmax filenext i need to place my ground picture, i

Share this post


Link to post
Share on other sites

Hi Chris.The terrain of the area is fairly level, so flattening the 4 LOD areas should be fine. I'll attach the code as well as post it.I did find a bug in TDFCalc3, so I'll need to update it. It derives the LWM fractional height incorrectly ( needs to be divided by 2 ). The height of the grasy apron is 2.125 meters ( Height of 2, 16 ). The default runway is slightly elevated ( as are all FS2002 runways ), at Height 2, 17. You can alter the code to anything you like, but I'm flattening at 2, 16 here.To compile, you'll need BGLC, TDFMacros.inc, and TDFHeaders.inc, all in the folder with this code:

include TDFMacros.incinclude TDFHeaders.inc; FSTeam flattenBGLHeader	57, 56, 12, 9, LWMHeader, TerrainHeaderStartLWMHeader	label	word	LWMFileHeader	513, LWMIndexStart, LWMStart, LWMEndLWMStart	label	word	datamark_0	label	word	; transparent Area flattens at 2.125 meters		LWMDataAreaFill1x1	0, 2, 1, 25, 17		LWMDataAreaHeight	2, 16		LWMDataAreaFill1x1	0, 2, 1, 25, 18		LWMDataAreaHeight	2, 16		LWMDataAreaFill1x1	0, 2, 1, 26, 17		LWMDataAreaHeight	2, 16		LWMDataAreaFill1x1	0, 2, 1, 26, 18		LWMDataAreaHeight	2, 16	datamark_1	label	word	Cell_405_94	EQU	LWMCellID 0, 0, 3, 405, 94	LWMIndexStart	label	word		LWMIndexHeader	 1, LWMIndexData	LWMIndexData	label	word		LWMIndexEntry		 Cell_405_94, LWMStart, datamark_0, datamark_1LWMEnd	label	word

Try this out, and let me know how it works with the cellgrid2 BGL as a start for the scenery.Dick

Share this post


Link to post
Share on other sites

Hi, I will take my time to read and understand this, so i can learn it I could just compile it, but that does not improve my skills.So i will reply when i feel i got it.Chris

Share this post


Link to post
Share on other sites

Hi,Now i get it, now i see you have made the different LWM txt files for us, so we can edit them.Im still a newbie, the best way for me is to sit down and play with the different types.The only thing i dont get is the flatten 2, 16 why not 2.125.We can move onbut i assume that the VTP2 is more difficult that LWM.i have the 4 textures, but i dont know if i want to include seasons, but i will proberly stick to the 4 xxx_suIm really happy, that your are taking the time to lead me into this.A big thanks to youNow i can flatten all of Europe, without loosing any autogen..yeahBestChris

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