Jump to content
Sign in to follow this  
Guest

Creating forest terrain with VTP

Recommended Posts

Hi bpahe.You are omitting texture names:TextureDataStart label wordtexturemark_0 label wordVTPTextureName VTPTextureType 1, 0, 0, 4texturemark_1 label wordVTPTextureName VTPTextureType 1, 0, 0, 4texturemark_2 label wordVTPTextureName VTPTextureType 1, 0, 0, 4texturemark_3 label wordVTPTextureName VTPTextureType 1, 0, 0, 4texturemark_4 label wordVTPTextureName "3" ;Coniferous ForestVTPTextureType 1, 0, 0, 4texturemark_5 label wordTextureDataEnd label wordEven if you are not using them, you need to declare something, or the thing won't compile. Try this:TextureDataStart label wordtexturemark_0 label wordVTPTextureName "3"VTPTextureType 1, 0, 0, 4texturemark_1 label wordVTPTextureName "3"VTPTextureType 1, 0, 0, 4texturemark_2 label wordVTPTextureName "3"VTPTextureType 1, 0, 0, 4texturemark_3 label wordVTPTextureName "3"VTPTextureType 1, 0, 0, 4texturemark_4 label wordVTPTextureName "3" ;Coniferous ForestVTPTextureType 1, 0, 0, 4texturemark_5 label wordTextureDataEnd label word================You can sometimes track down BGLC errors by using a DOS window. WindowsXp hides it's window as "cmd.exe", and is found in the "C:WINDOWSsystem32" folder.I make a project folder that contains TDFMacros.inc, TDFHeaders.inc, BGLC.exe, CMD.exe, and my BGLC code files. I'll drag'n'drop the BGLC code onto the BGLC Icon to compile.But if that doesn't work, I'll open the CMD and within it's window I'll type:BGLC mycode.asmThis will now give a list of the errors, and the line numbers they are on!In WindowsXp, notepad has the view option of a status bar ( when not in wrdwrap ). Now you can easily go to the line of the error, and try to see what is wrong.Dick

Share this post


Link to post
Share on other sites

By making the change I noted above, and adding the lines at the start of the code:include TDFMacros.incinclude TDFHeaders.incThe code compiled just fine.BGLC.exe, TDFMacros.inc, TDFHeaders.inc, and your ASM file must all be in the same folder.I'm attaching the code as a txt file, that can be drag'n'dropped right onto BGLC's icon to compile.================But what it is compiling is beyond my comprehension. You're mixing widepoints with poly points, in a polygon. You probably need to review the FS2002 terrain SDK, so you have an understanding of the different data structures. The code isn't usable as it exits... and I've never seen LWMDraw produce anything like that, before.Dick

Share this post


Link to post
Share on other sites

Well, I'll be ding, dang, donkey! I didn't know about that dern status bar thingy!You-all musta been hold'n out on us'es!:-lol

Share this post


Link to post
Share on other sites
Guest

Hi HansThe first problem I see in your generated VTP source file is that you've tried to place both VTP Line format and VTP Poly format into the same file and I don't believe both formats are compatable within the same file. I probably should have put an If statement into the code of LWMDraw to deal with this issue so that a user can only select one or the other formats but I didn't even think of that although I do recall explaining about these two formats within the "Menu and User Information" menu.This is the Polygon format:VTPPointXY2 4912, 11696VTPPointXY2 4979, 11730And this is the Road/Line/Shoreline format:VTPWidePoint 4857, 0, 11819, 0VTPWidePoint 4867, 0, 11904, 0The next problem I found is again related to the "Menu and User Information" menu. Within the VTP Properties tab you'll notice one selection combo-box for Road/Lines/Shorelines and this is a required parameter for Lines or Polys. Please note that this combo-box places the selected option onto the "VTPTextureName" lines and if there is no selection then those will be blank and the file will not assemble properly.You can copy-n-paste your selection, ("3" ;Coniferous Forest), directly from the optional landclass combo-box into the upper roads/lines/shorelines combo-box and upon generation of the source file all five VTPTextureName lines will be filled in with that value or you can use Dick's suggestion and simply type "3" .I hope you've found this helpful along with Dick's excellent suggestions. I also hope you'll read and look through the text of the help files within LWMDraw as well so that you'll have a better understanding of the process as well as some of the limitations that can or can not be used within these source files.Thanks for your post.Ken

Share this post


Link to post
Share on other sites
Guest

Hi everybody!Thanks for all replies! Well, first of all, the first thing I did after downloading LWMDraw was of course to go through both the tutorial, and the quick-start guide. I

Share this post


Link to post
Share on other sites
Guest

Hello again!Ok, this is it:I followed the examples above, and now the produced VTPsource.asm looks like this - it compiles nicely and works excellent in FS2002! This is the complete sourcefile.Regards/hans; ESMK Skog By: Hans Palsson; ; FS Coordinates: 55 54.97 014 5.68; VTP Method2 Polygon; The next two files MUST be included within the same directory as; BGLC.exe when this file is assembled (compiled).;include TDFHeaders.incinclude TDFMacros.inc;;----> Begin Header Section <---- BGLHeader 56, 54, 15, 13, TerrainHeaderStart, VTPHeader;VTPHeader label word VTPFileHeader 256, VTPIndexStart, TextureStart, VTPEnd;----> End Header Section <----;;----> Start File Data <----VTPStart label word;;----> Begin Cell 414, 96 and Area 3, 30 Data Point Information 80;VTPPointXY2 4845, 11964VTPPointXY2 4819, 11973VTPPointXY2 4815, 11974VTPPointXY2 4805, 11973VTPPointXY2 4769, 11967VTPPointXY2 4725, 11959VTPPointXY2 4720, 11956VTPPointXY2 4714, 11949VTPPointXY2 4707, 11937VTPPointXY2 4703, 11937VTPPointXY2 4675, 11945VTPPointXY2 4646, 11954VTPPointXY2 4630, 11967VTPPointXY2 4618, 11973VTPPointXY2 4590, 11897VTPPointXY2 4590, 11862VTPPointXY2 4590, 11834VTPPointXY2 4595, 11832VTPPointXY2 4625, 11832VTPPointXY2 4634, 11830VTPPointXY2 4644, 11821VTPPointXY2 4646, 11809VTPPointXY2 4644, 11798VTPPointXY2 4629, 11787VTPPointXY2 4610, 11777VTPPointXY2 4603, 11771VTPPointXY2 4600, 11767VTPPointXY2 4603, 11759VTPPointXY2 4604, 11746VTPPointXY2 4606, 11730VTPPointXY2 4606, 11730VTPPointXY2 4609, 11718VTPPointXY2 4607, 11708VTPPointXY2 4597, 11684VTPPointXY2 4596, 11655VTPPointXY2 4595, 11631VTPPointXY2 4597, 11593VTPPointXY2 4593, 11569VTPPointXY2 4597, 11542VTPPointXY2 4590, 11512VTPPointXY2 4595, 11508VTPPointXY2 4605, 11510VTPPointXY2 4629, 11491VTPPointXY2 4635, 11485VTPPointXY2 4645, 11485VTPPointXY2 4664, 11482VTPPointXY2 4698, 11475VTPPointXY2 4745, 11476VTPPointXY2 4782, 11475VTPPointXY2 4817, 11477VTPPointXY2 4845, 11475VTPPointXY2 4845, 11475VTPPointXY2 4884, 11477VTPPointXY2 4922, 11477VTPPointXY2 4948, 11475VTPPointXY2 4959, 11483VTPPointXY2 4978, 11499VTPPointXY2 4984, 11504VTPPointXY2 4997, 11504VTPPointXY2 5014, 11502VTPPointXY2 5028, 11501VTPPointXY2 5038, 11508VTPPointXY2 5049, 11516VTPPointXY2 5052, 11534VTPPointXY2 5055, 11554VTPPointXY2 5057, 11563VTPPointXY2 5056, 11572VTPPointXY2 5036, 11585VTPPointXY2 5013, 11603VTPPointXY2 4997, 11615VTPPointXY2 4987, 11623VTPPointXY2 4986, 11627VTPPointXY2 4989, 11634VTPPointXY2 4994, 11650VTPPointXY2 5001, 11665VTPPointXY2 4997, 11672VTPPointXY2 4989, 11678VTPPointXY2 4985, 11677VTPPointXY2 4973, 11674VTPPointXY2 4953, 11668VTPPointXY2 4946, 11665VTPPointXY2 4933, 11677VTPPointXY2 4914, 11693VTPPointXY2 4913, 11697VTPPointXY2 4934, 11707VTPPointXY2 4959, 11720VTPPointXY2 4979, 11730VTPPointXY2 4979, 11730VTPPointXY2 5001, 11740VTPPointXY2 5016, 11748VTPPointXY2 5023, 11758VTPPointXY2 5027, 11772VTPPointXY2 5029, 11779VTPPointXY2 5018, 11783VTPPointXY2 4990, 11796VTPPointXY2 4969, 11810VTPPointXY2 4944, 11828VTPPointXY2 4918, 11846VTPPointXY2 4903, 11845VTPPointXY2 4888, 11843VTPPointXY2 4872, 11830VTPPointXY2 4861, 11822VTPPointXY2 4851, 11829VTPPointXY2 4849, 11864VTPPointXY2 4859, 11892VTPPointXY2 4869, 11904VTPPointXY2 4876, 11929VTPPointXY2 4880, 11945VTPPointXY2 4876, 11953VTPPointXY2 4858, 11960VTPPointXY2 4845, 11964;datamark_v1 label word;----> End Cell 414, 96 and Area 3, 30 Data Point Information <----;;----> Begin Cell_414_96's defination data information <---- Cellv_414_96 EQU VTPCellID 0, 414, 96;VTPIndexStart label word VTPIndexHeader 1, VTPIndexData, VTPStartVTPIndexData label word VTPIndexEntry Cellv_414_96, VTPStart, datamark_v0, datamark_v1;----> End Cell_414_96's defination data information <----;;----> Begin Texture Information <----TextureStart label word VTPTextureListHeader 5, TextureIndexStart, TextureDataStart, TextureDataEnd;TextureIndexStart label word VTPTextureListEntry TextureDataStart, texturemark_0, texturemark_1 VTPTextureListEntry TextureDataStart, texturemark_1, texturemark_2 VTPTextureListEntry TextureDataStart, texturemark_2, texturemark_3 VTPTextureListEntry TextureDataStart, texturemark_3, texturemark_4 VTPTextureListEntry TextureDataStart, texturemark_4, texturemark_5;TextureDataStart label wordtexturemark_0 label word VTPTextureName "3" ;Coniferous Forest VTPTextureType 1, 0, 0, 4texturemark_1 label word VTPTextureName "3" ;Coniferous Forest VTPTextureType 1, 0, 0, 4texturemark_2 label word VTPTextureName "3" ;Coniferous Forest VTPTextureType 1, 0, 0, 4texturemark_3 label word VTPTextureName "3" ;Coniferous Forest VTPTextureType 1, 0, 0, 4texturemark_4 label word VTPTextureName "3" ;Coniferous Forest VTPTextureType 1, 0, 0, 4texturemark_5 label wordTextureDataEnd label word;----> End Texture Information <----;;----> The next line below ENDS this file <----VTPEnd label word

Share this post


Link to post
Share on other sites

Hi bpahe.Hooray! :)Read the SDK and get some more info by reading old posts here about VTP and LWM. In a few weeks you'll be making all kinds of things.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...