Sign in to follow this  
arno

VTP Method2 Polygons

Recommended Posts

Hi all.Here's some code for a VTP Method2 polygon. A simple oval shape in the desert that I made into a park. The poly is mesh clinging, and the etsxture is assigned to Layer 4, so just about everthing else will go over it ( including a watermask ). Drawbacks? VTPm2 polygons cannot be 'feathered' by an alpha channel mask, or blended into the default scenery ( as far as I can tell ). Also, these textured polys are just like repetitive landclass tiles, in that you cannot control orientation or positon.Notice the autogen is assigned automatically to the VTPm2 polygonAmazing what a little irrigation can do. :)include TDFMacros.incinclude TDFHeaders.inc; N31* 25.86' E26* 2.97'; VTPm2Poly1BGLHeader 33, 29, 28, 24, TerrainHeaderStart, VTPHeader VTPHeader label word VTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPStart label word datamark_v0 label word VTPDataArea 1, 1, 0, 0 VTPLayer 4, 0 VTPNumTexturesInLayer 1, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 12, 0, 0 VTPPointXY2 8747, 8900 VTPPointXY2 8779, 8908 VTPPointXY2 8797, 8925 VTPPointXY2 8800, 8950 VTPPointXY2 8793, 8974 VTPPointXY2 8775, 8986 VTPPointXY2 8753, 8991 VTPPointXY2 8724, 8985 VTPPointXY2 8708, 8969 VTPPointXY2 8700, 8950 VTPPointXY2 8709, 8920 VTPPointXY2 8730, 8905 datamark_v1 label word; --------------------------------------------------------------------Cellv_439_166 EQU VTPCellID 0, 439, 166 VTPIndexStart label word VTPIndexHeader 1, VTPIndexData, VTPStart VTPIndexData label word VTPIndexEntry Cellv_439_166, VTPStart, datamark_v0, datamark_v1; --------------------------------------------------------------------TextureStart label word VTPTextureListHeader 1, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label word VTPTextureListEntry TextureDataStart, texturemark_0, texturemark_1TextureDataStart label word texturemark_0 label word VTPTextureName "1202" ; Forest Park VTPTextureType 1, 0, 0, 4 texturemark_1 label wordTextureDataEnd label word; --------------------------------------------------------------------VTPEnd label wordThe texture number, "1202" was found in 'terraintextures.cfg', in the main FS2002 folder. VTPm2s can also be assigned to custom textures, and can show seasons, with the proper coding, and effects.

Share this post


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

We (NL2000 Scenery Team) have also been working on this type of polygons. I have placed an example here that looks like the one above, but it has two polygons in it, each with another texture assigned to it.Now we get this working on this small scale, we are building it into are own tool (VE2) and then we hope to have the entire country filled with thousands of polygons (cities, forests, lakes, etc) with a simple mouse click :).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a][tt]; The Netherlands 2000 scenery ; Generated by VE2 V2.0 update 06;; Copyright The Netherlands 2000 scenery design team;; Filename: nl2k_5132_328.asm;; Lod 8 Latitude: 51,328125 51,6796875 ; Longitude: 3,28125 3,75 ;; RD x: 8220 41758 ; RD y: 373007 411269 ;include VTPMacros.incdata_base label word; DATABASE HEADER dw 1 ; World set number (must be 1) dd 5743025 ; North Bound dd 5703957 ; South Bound dd 44739242 ; East Bound dd 39146837 ; West Bound dd 0 ; VOR data dw 0 ; lowest VOR freq dw 0 ; highest VOR freq dd 0 ; seeds level 8 data dd 0 ; seeds level 9 data dd 0 ; seeds level 10 data dd 0 ; seeds level 11 data dd 0 ; seeds level 12 data dd 0 ; seeds level 13 data dd 0 ; minimum safe altitude data dd terrain_data - data_base ; terrain mesh data dd 0 ; object data dd 0 ; library data dd 0 ; facilities data dd 0 ; anchor point data dd 0 ; com radio data dd 0 ; adf data dd 0 ; dynamic object paths data dd 0h,0h ; minimum library id dd 0h,0h ; maximum library id dd 0 ; miscellaneous data dd 0 ; title and description data dd 0 ; magnetic variation data dd 0 ; exception and exclusion data dd 87654321h ; magic number dd 0 ; spare dw 0 ; spare dd 0h,0h,0h,0h ; GUID dd 0 ; product id dd 0 ; product build number dd 0 ; data pointers count dd 0 ; facility2 name list data dd 0 ; facility2 latband list data dd 0 ; facility2 object list data; TERRAIN MESH DATABASEterrain_data label word; TERRAIN MESH HEADER dd terrain_header_end - terrain_data ; end of terrain header dd 514 ; version dd 0 ; reserved 1 dd 0 ; reserved 2 dd 0 ; reserved 3 dd 0 ; reserved 4 dd 0 ; reserved 5 dd 0 ; reserved 6 dd 0 ; reserved 7 dd 0 ; reserved 8 dd 0 ; reserved 9 dd 0 ; reserved 10 dd 0 ; reserved 11 dd 0 ; reserved 12 dd 0 ; offset LMW Header dd decal_header - terrain_data ; offset VTP Header dd 0 ; reserved 13 dd 0 ; reserved 14 dd 0 ; reserved 15 dd 0 ; reserved 16 dd 0 ; reserved 17 dd 0 ; reserved 18 dd 0 ; reserved 19 dd 0 ; reserved 20 dd 0 ; reserved 21 terrain_header_end label worddecal_header label word VTPFileHeader 256, decal_list, decal_textures, decal_enddecal_data label worddata_start_0 label word VTPDataArea 1, 1, 0, 0 VTPLayer 4, 0 VTPNumTexturesInLayer 2, 0; aantal objecten: 634 ;; Object: 3 15662 378423 ; VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 20, 0, 0 VTPPointXY2 5830, 8192 - (5143 - 4080) + 4080 VTPPointXY2 5848, 8192 - (5151 - 4080) + 4080 VTPPointXY2 6033, 8192 - (5240 - 4080) + 4080 VTPPointXY2 6103, 8192 - (5279 - 4080) + 4080 VTPPointXY2 6123, 8192 - (5293 - 4080) + 4080 VTPPointXY2 6111, 8192 - (5295 - 4080) + 4080 VTPPointXY2 6081, 8192 - (5286 - 4080) + 4080 VTPPointXY2 6064, 8192 - (5283 - 4080) + 4080 VTPPointXY2 6052, 8192 - (5280 - 4080) + 4080 VTPPointXY2 6016, 8192 - (5268 - 4080) + 4080 VTPPointXY2 5942, 8192 - (5247 - 4080) + 4080 VTPPointXY2 5940, 8192 - (5250 - 4080) + 4080 VTPPointXY2 5925, 8192 - (5247 - 4080) + 4080 VTPPointXY2 5918, 8192 - (5243 - 4080) + 4080 VTPPointXY2 5897, 8192 - (5239 - 4080) + 4080 VTPPointXY2 5853, 8192 - (5231 - 4080) + 4080 VTPPointXY2 5847, 8192 - (5228 - 4080) + 4080 VTPPointXY2 5841, 8192 - (5203 - 4080) + 4080 VTPPointXY2 5835, 8192 - (5174 - 4080) + 4080 VTPPointXY2 5830, 8192 - (5143 - 4080) + 4080 VTPTextureId 1, 0 VTPPolyCount 1, 0 VTPPolyMethod2 4, 0, 0 VTPPointXY2 6500, 11000 VTPPointXY2 6500, 12000 VTPPointXY2 7500, 12000 VTPPointXY2 7500, 11000data_end_0 label wordCell_391_109 EQU VTPCellID 0, 391, 109decal_list label word VTPIndexHeader 1, decal_groups, decal_data decal_groups label word VTPIndexEntry Cell_391_109, decal_data, data_start_0, data_end_0 decal_textures label word VTPTextureListHeader 2, texture_groups, texture_data, texture_end texture_groups label word VTPTextureListEntry texture_data, texture_start_0, texture_end_0 VTPTextureListEntry texture_data, texture_start_1, texture_end_1 texture_data label wordtexture_start_0 label word VTPTextureName "nl_centr.bmp" VTPTextureType 1, 0, 0, 4texture_end_0 label wordtexture_start_1 label word VTPTextureName "0127" VTPTextureType 1, 0, 0, 4texture_end_1 label wordtexture_end label worddecal_end label word[/tt]

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