Jump to content
Sign in to follow this  
rhumbaflappy

Just playing and learning VTP Islands

Recommended Posts

Guest

Well it only took 18 tiny winny little source files. But I think I'm getting it figured out somewhat.

Share this post


Link to post
Share on other sites

Now there's a creative outlet for ya! Looks like God writing his name in the snow!


Bill Womack

------------------------------------------------------------------------------------------------------------------------------------------------------

Visit my FS Blog or follow me on Twitter (username: bwomack).

Intel i7-950 OC to 4GHz | 6GB DDR3 RAM | Nvidia GTX460 1gb | 2x 120GB SSDs | Windows 7 Ultimate 64Bit

Share this post


Link to post
Share on other sites
Guest

Well, probably not god but certainly more pronounced in the snow.:-bluegrab Ken

Share this post


Link to post
Share on other sites
Guest

Looks promising. Looking forward to more new features. (My summer cottage is on an island near EFHN ;-) )BamceEFHN

Share this post


Link to post
Share on other sites
Guest

Very cool - how much of this was done inside LWMDraw, and how much by manual editing of .asm?Islands for Christmas is too much to hope for, but are we going to have islands for New Years? :-)Brian.

Share this post


Link to post
Share on other sites
Guest

Hi BrianThe outer part of all the letters had no editing to do. The inner islands though were done only with VTP and took two source files. One for the shoreline of the island (no editing here) and I went in counter clockwise direction to reverse the shoreline. Inside of the island shoreline is the VTPPoly which needed editing to reflect the Poly format. Taking the island within the A of BAD to make it a VTPPoly format I only changed:VTPPolyMethod2 12, 1, 0to show:VTPPolyMethod2 10, 0, 0---------------------------Then I only removed the top next 4 lines that looked like:VTPWidePoint 5239, 1, 6548, 0VTPWidePointWidth 1VTPWidePoint 5239, 1, 6548, 0VTPWidePointWidth 30----------------------------After doing that I edited the VTP point lines to the poly format using the same values. Here's how it all ended up:VTPPolyMethod2 10, 0, 0VTPPointXY2 5239, 6548 VTPPointXY2 5237, 6550VTPPointXY2 5232, 6548VTPPointXY2 5229, 6547VTPPointXY2 5225, 6547VTPPointXY2 5237, 6528VTPPointXY2 5247, 6546VTPPointXY2 5244, 6548VTPPointXY2 5239, 6548VTPPointXY2 5236, 6548-----------------------------I also removed the VTPWidePointWidth 0 from the bottom of the lines. I'm thinking that sometime I'll add a couple of selection radio buttons so the user can simply select Lines or Poly's but that'll take awhile with the Holidays upon us.I'm just a beginner with this so you can experiment from there.Catch Ya LaterKen

Share this post


Link to post
Share on other sites

Hi Ken.Yes, you can make land in a water-masked area with VTPm2 polys. VTPm2 polys act just like landclass... but with a layer > 7, that allows them to be used as land. And it has all the attributes of land.The islands could have been made as LWM polys, and that now begs a question:Is there an advantage of using VTP or LWM islands?If you define an island as a VTP poly, it will not change if the landclass changes. I see Justin Tyme is thinking of creating a landclass set for Alaska, and for Canada. As usual, the quality of his work is outstanding, but be aware, VTP polys override landclass. This might not be a big deal for a small island, but for a larger island...Also, VTPm2s will need a full set of textures for seasons and night. Not a problem if you use a landclass assignment number for the texture. An added advantage of using landclass numbers for VTP polys, is that the autogen will also be used.So, usually, I'd want to define the island as an LWM poly, to make it compatible with the underlying landclass. Just set the 'LWMPoly' bAttrib to 1 ( for land ). If you keep the order straight, you can have islands, within lakes, within islands, within lakes... all in the same LWM BGL.My habit is to make the landmass with the LWM masking, then use VTP polys to "micromanage" the landclass... so in the case of the "We Bad Islands", I'd do the islands with LWMs, then add the VTP shorelines, then paint red bullseyes with VTPm2 polys, at a layer 4, so the shorelines ( at layer 8 ) show over the the islands and water, and the bulleyes show over the default landclass.Not that there is anything wrong with VTPm2 islands!Another scenario... offshore islands, with no default landclass under them. Now the use of VTPm2s is probably the best way to go, as there is no landclass for the LWMs to mask. I'd use a layer of 8 for the VTPm2 land, and a layer of 9 for the shorelines. VTPm2 polys at layers 4-7 will display on top of LWM defined land, but not on top of water. Layers 8, and above, show on top of water, and act as land. You can have land and beaches at Layer 8, just make sure to draw the beaches last, so they display on top of the land in the datastream.Then, of course you can use CUSTOM textures for VTPm2 polys....ZZZZZZZZZZ:-beerchug Dick

Share this post


Link to post
Share on other sites
Guest

Thanks RichardI see I have allot more experimenting to do here. Setting the attribute to land for an LWM = 1, will the terrain texture to be displayed be the default for that area?-----------------------------------------------------So, usually, I'd want to define the island as an LWM poly, to make it compatible with the underlying landclass. Just set the 'LWMPoly' bAttrib to 1 ( for land ). If you keep the order straight, you can have islands, within lakes, within islands, within lakes... all in the same LWM BGL.-----------------------------------------------------It's been awhile now but I experimented with the LWM island and came up with a spikes to about 35,000 feet. Apparently I must have formated it all wrong. Maybe you could show me an example?It's comming to the point where I'll have to create a database program to keep your examples and notes in some sort of order for easier reference. Thanks for all your excellent help bro!!!LaterKen

Share this post


Link to post
Share on other sites

Hi Ken.Here's some code:include TDFMacros.incinclude TDFHeaders.inc; Island Creation N42* 39.9241 W88* 37.1610;;BGLHeader 43, 41, -87, -89, LWMHeader, TerrainHeaderStart ; ;LWMHeader label word ; LWMFileHeader 513, LWMIndexStart, LWMStart, LWMEnd;;LWMStart label word;datamark_0 label word;; LWMDataAreaDrawPolygons 3,3,1,30,20 ; setting a poly as landfill; LWMPoly2 4,0,0,-9999,0 ; Filling the area with water, and 285 elevation. LWMPoint 0,0 LWMPoint 255,0 LWMPoint 255,255 LWMPoint 0,255; LWMPoly2 4,0,1,-9999,0 ; Filling most of the area now with land, and no elevation. LWMPoint 10,10 LWMPoint 245,10 LWMPoint 245,245 LWMPoint 10,245; LWMPoly2 4,0,0,-9999,0 ; Now I'm digging a pond into the raised area LWMPoint 100,100 LWMPoint 155,100 LWMPoint 155,155 LWMPoint 100,155;datamark_1 label word;Cell_194_134 EQU LWMCellID 0, 0, 3, 194, 134;; LWMIndexStart label word; LWMIndexHeader 1, LWMIndexData; LWMIndexData label word; LWMIndexEntry Cell_194_134, LWMStart, datamark_0, datamark_1;;LWMEnd label word...and this works fine...until...When we add elevations to the elements, there are BIG problems with islands, as we start redefining land/water elevations on top of each other.Take the above example and play with the elevations, and you'll see what I mean. Changing land elevations seems worse than the water.I haven't run into many problems with this before, and here's why:When I start with an LWM project, I'll usually override the LOD13 Area's masking with...LWMDataAreaFill1x1 0,1,1,30,20 ; for Area 30,20 landfill to expose landclassNO height data line should follow this, as this is just for land ( page 30 of the SDK alludes to no height for landfilling ).From that point on in my project, I'm only concerned with the water polys, and their heights. If this is a coastal area, or has reclaimed land near a lake, then I'll use transparent elevation polys ( flattens ) to resurrect the land elevations. I never need to create islands, as I've already made everything land to begin with, and I just cut water shapes. If I have an "0" shape, I'll make 2 water polys to define the shape, "(" then ")" ... so I never get an island. And as only the water generally gets elevations, I don't have many problems with wierd hill effects.VTPs have no elevations, so they act like land LWMs with -9999,0 elevations.Many problems are avoided if you don't use elevational data with landmasking. VTPm2s are an easy way to insure that, so maybe I need to rethink my reservations about using them for islands... or landmasking in general ( for small areas ).----------------Of course, all the elevation problems with FS2002 could have been solved if the mesh were used to control all elevation. A really good LOD10 mesh ( even an LOD9 ), doesn't really need elevation correction, as long as the lakes and streams are placed correctly. MS takes a shortcut with both the water placement and the mesh, so we get the system we have. Even so, the problems with LWM elevations would be fixed, if there was a "Remesh" command, that would override all height settings, and reestablish the current mesh settings for the LOD13 Area. Then we could always return to "square one" before we play with the LWMs. ( hopefully a feature with FS2004 ).----------------Spikes are usually caused by a point count being corrupted... either by missing points, or the setup code being wrong somehow. BGLC doesn't have an advanced error checking, so it goes ahead and compiles the data anyways. Corrupted point counts also gives us odd lines or FS crashing to desktop with bad VTPs.Just avoid masking land with elevations, and avoid water 'moats'... split them into 2 or more shapes. Then you don't need to worry about islands.----------------VTPm2 polys have lots of potential to change the landclass of a small area. They can also be used to place CUSTOM textures and autogen...and they can still be poly shapes. "252" is the landclass number for CUSTOM with seasons... "253" is the number for single season. So a city could be done as CUSTOM, and just the exact polyshape of the city used ( or portion of the city ), so the countryside's landclass can show through at the edges. You could make just city blocks show, or just a ( mostly ) transparent texture sheet with autogen attached for the buildings and trees.With a layer 4-7, the city shape will still show LWM water, unlike traditional photoreal. So you can mix CUSTOM with LWMs and VTPm2 shorelines and roads. Also, nobody's done this yet, but you can use transparent effects with named textures, to cause blending or tinting of land or water... with the caution that the highest layer of VTPm2 poly controls the autogen.Dick

Share this post


Link to post
Share on other sites
Guest

Hi DickJust letting you know here that I haven't forgotten your above posts. As a matter of fact I've copied it for future reference and experiments that you'll no doubt here about at some point. Meanwhile, I hope you and your family enjoys a wonderful holiday season.Merry Christmas and Happy New YearKenPS: All this information is making gray matter ooz out my ears. *:-*

Share this post


Link to post
Share on other sites

Hi Ken.Luckily I have very little grey matter remaining. :+ Merry Christmas to you, and your loved ones. And Merry Christmas to all the designers of FS2002, and may 2003 bring all of us more fun.( Only 11 months, or so, until FS2004 is ready! )include TDFMacros.incinclude TDFHeaders.inc; Delavan Santa; N42* 38.13' W88* 37.33'BGLHeader 44, 41, -87, -90, TerrainHeaderStart, VTPHeaderVTPHeader label word VTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPStart label word; ---------------------------------------------------------------------------------------------------------; Cell_194_134datamark_0 label word VTPDataArea 1, 1, 31, 20 VTPLayer 4, 1 VTPNumTexturesInLayer 1, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0 VTPPolyMethod2 4, 0, 0 VTPPointXY2 11985 + 0 , 9180 + 0 VTPPointXY2 11985 + 254 , 9180 + 0 VTPPointXY2 11985 + 254 , 9180 + 254 VTPPointXY2 11985 + 0 , 9180 + 254 datamark_1 label word; ---------------------------------------------------------------------------------------------------------Cell_194_134 EQU VTPCellID 0, 194, 134 VTPIndexStart label word VTPIndexHeader 1, VTPIndexData, VTPStart VTPIndexData label word VTPIndexEntry Cell_194_134, VTPStart, datamark_0, datamark_1; ---------------------------------------------------------------------------------------------------------TextureStart label word VTPTextureListHeader 1, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label word VTPTextureListEntry TextureDataStart, texturemark_0, texturemark_1TextureDataStart label word texturemark_0 label word VTPTextureName "Santa.bmp;Santa.bmp;Santa.bmp;Santa.bmp;Santa.bmp;Santa.bmp" VTPTextureType 2, 0, 0, 4 texturemark_1 label wordTextureDataEnd label word; ---------------------------------------------------------------------------------------------------------VTPEnd label wordDick

Share this post


Link to post
Share on other sites
Guest

Now that's truly awesome bro!!! That means I could place my picture next to my name in the Alaskan mountains however un-realisic it would look. :)Remember, Santa only brings toys to GOOD boys and girls!!!Later BroKen

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