Sign in to follow this  
arno

trying to display vtp1 poly over custom resample type t

Recommended Posts

seems like this must be impossible, but I want to check with the forum. I've created a terrain of 54 LOD13 custom terrain textures using resample.exe. I have begun experimenting with VTP polygons. My first thought was to create a vtp1 polygon for tarmac, on the assumption that I could make it show "over" the custom imagry. No luck. I've tried some limited experiments, tried three polygons at different layers, layers 1, 3, and 7. None would display over the phototerrain.when I removed the custom phototerrain textures the polygon on layer 7 was displayed, but setting the layer at 1 or 3 made them not appear at all.is this known behaviour? I'm just in the first stages of exploring what I can do with vtp. Bob Bernstein

Share this post


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

Hi Bob.Photoreal, as placed by the BGL produced by resample, overrides all LWM and VTP polys and lines.The individual 'slices' ( uniquely named CUSTOM textures ) can be placed as VTP polys ( either as VTP1 or VTP2 ).VTP1 allows you to control the orientation of the texture. Ground2K uses this feature to flip textures vertically, so they display properly in the sim, and "fills" the entire LOD13 Area with the 256x256 texture. VTP1 textures are referenced by name only, and must have a full seasonal and night set for FS2002.VTP2 polys cannot orientate ( vertically flip ) a texture at runtime... this needs to be done to the texture itself. But VTP2 properly uses textures that are numbered, as well as named, allowing the use of landclass numbered textures, and their seasonal-night variations.Ground2K doesn't "fill" whole LOD13 Areas with VTP2 polys, but tiles the textures to the poly shape, which can span large distances if needed. If a uniquely named photoreal texture ( slice ) is to be used with VTP2, you can designate #252 landclass ( CUSTOM with seasons ) or #253 ( CUSTOM without seasons ). You'll need to flip the textures vertically before mipping and converting to DXT1 or 8 bit with alpha.So CUSTOM 'slices' can be displayed as VTP1 or VTP2 polys. The layer to use is usually 4. Displayed this way, means the BGL made by resample would be discarded.=========================Layers 0-3 will display on water areas only, and are masked off at the land ( so they won't display on land ). These would only be used to color or tint LWM water masked areas.Layers 4-100 will show as land. In fact, a Layer 4+ will behave as land when placed over LWM water!Layer 8 is used for default shorelines ( beaches ) in the sim. So generally speaking, land polys used as ground terrain texturing will use Layers 4-7. All airport backgrounds in the sim are Layer 4... so they are the first land layer, and all higher numbered layers will display over them.Dick

Share this post


Link to post
Share on other sites

thanks Dick, part of the reason I'm just digging into it now, is the number of variations of objects make it a bit confusing.When you say ground 2k can produce vtp2 using resample type textures and span a distance, that now promises that I can display a vtp1 over a vtp2, yes? is there any way to produce an agn file to add autogen over those vtp2 polygons?Bob B

Share this post


Link to post
Share on other sites

Hi Bob.VTP1 and VTP2 are different ways of displaying polys. VTP1 is only included for backward compatibility in FS2002 ( it was developed for CFS2 ).Ground2K uses VTP1's texture orientation capabilities to display CUSTOM 'slices' with the correct visual orientation ( vertically flipped ). Christian Fumey may have more detailed information on this usage.I do not like VTP1. They are much larger code than VTP2, and they cannot be used to display autogen. Christian could have easily included a routine to display "Area filling" with VTP2, but chose not to do that. ( Offhand, not to my knowledge ).But you can still draw a poly that covers tiny to huge spans with VTP2. The only restriction is that the textures will be vertically flipped. This is true of landclass textures, and of the special landclass designations of #252 and #253 as well. Because these are landclass designations, #252 and #253 will display autogen if properly located and named. You're well aware of the special naming conventions of CUSTOM textures, and that the name locates the texture's placement in the sim. Other than the vertical flipping, there is one restriction you need to know. This CUSTOM named texture ( and it's autogen ) needs to be located in the "C:Program FilesMicrosoft GamesFS2002SCENEDBWORLDTexture" folder, just like all the default landclass and autogen. It cannot be accessed as #252 or #253 when it is in a "local" texture folder.VTP2 polys, using #252 or #253 texture numbers, can be drawn over by other VTP polys or lines. If those overdrawing VTP polys are landclass numbers with associated autogen, their texture and autogen will overdraw the first drawn VTP poly and autogen. They will also overdraw polys with lower Layer numbers.===============================For example, you could use CUSTOM texture #252 to draw an irregular, multiArea spanning poly shape, as VTP2. It can have autogen of your design, and seasons, as well as night texturing. All properly named. Make sure you flip the texture vertically, after you make the autogen. The shape can be as irregular as you like, and the poly cuts a shaped "window" that displays the tiled CUSTOM textures.If the textures are properly named and vertically flipped, and properly located in the Global folder with their autogen, then they will show just fine. If they are Layer4, they will cling to the mesh, be masked by LWM water poly designations, and can have shorelines, roads, streams or specially named VTP2 lines or polys drawn over them.In addition to roads, streams, lakes, etc... you might want to add a "fenceline" common in bordering fields in the US midwest. Fencelines ( or "treelines" ) often surround fields, as old fenced areas have trees and brush growing along them for decades. You could add this fenceline over your CUSTOM named VTP2 polys, by making a thin line-like poly where the trees would grow, and selecting a texure number that has autogen trees. Make it as Layer5, and it will show up over the normal Layer4, and trees will pop up along that area.You could even make a VTP line that uses a landclass number, with it's autogen, but Christian's program doesn't have that capbility built in... so you'd have to hack the ASM files before compiling.=====================In answer to your original question:You can display VTP1 over VTP2, or vice versa. That depends on the Layer number, and the drawing order in the datastream, if the Layer numbers are the same. Only VTP2 will have autogen capability, and that requires placing textures and autogen alongside the default landclass and autogen in the "C:Program FilesMicrosoft GamesFS2002SCENEDBWORLDTexture" folder. As you can imagine, that folder could end up being quite large if all our CUSTOM textures are placed in it.You can use Ground2K's Area filling with VTP1 to properly display CUSTOM textures, but they cannot use autogen.=====================I'm hoping these 2 "bugs" will be addressed in FS2004. We shouldn't need to flip the textures, nor need to place them in the default Global folder, for the autogen to work. What we are doing with VTPs was never fully developed in FS2002. They have airport background polys as VTP2 and some 'nph' files... but they apparently never knew the textures had the wrong vertical orientation, or thought the textures and autogen should have been in a local folder... because they never envisioned we'd be making VTPs with CUSTOM designations, or special texturing and autogen. I'm also hoping we'll get a level ( or two ) finer than the 4.8 meter/pixel restriction we now have. Who knows. :)====================I'm a little afraid of our placing CUSTOM textures and autogen inside the "C:Program FilesMicrosoft GamesFS2002SCENEDBWORLDTexture" folder. It isn't the safest of practices if we want to distribute our sceneries. I'd much rather "fake" photoreal with small landclass VTP2 polys , and a "palette" of the default landclass with autogen.Here's some pics of Whitewater Wisconsin. The default, and some reworked with a landclass "palette", and properly placed roads, streams, raillines, and polys.Dick

Share this post


Link to post
Share on other sites

One little addition. For our NL2000 we have the same sort of idea as Dick described. We make a new LandClass scenery and place all details (cities, etc) on top of that with VTP/LWM.The only problem we still have is that autogen does not display on your own textures if placed as VTP polygon. Only for the MS ones (with the landclass numbers) it seems to work fine. Might be something to keep in mind as well.Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Share this post


Link to post
Share on other sites

Hi Arno.Yes. If you have new textures that are referenced by name, they cannot have autogen. So if we make a texture set named "LowBushesSu.bmp", there can be no autogen for it. ( I hope they change this in FS2004, and MS has indicated autogen is going to be developed further in this next version ).In this instance, there is a valid use for VTP1 polys, as the autogen won't be available anyways. I see there is a way to create a shaped VTP1 poly with Ground2K... Christian might have some input on this. The texture application interface seems a bit awkward, but I'm not sure how else he could have done it.Ground2K constantly surprises me... as soon as I declare something is not possible with it, I soon find out it is possible!In using a new texture, you're forced to use something like the newer buildings ( SCASM's Advanced Buildings ) instead of autogen buildings. Vegetation will need objects from something like Gerrish's Tree library. These shouldn't lower framerates any more than the autogen, but will require individual placement, unlike autogen.If we had a way to "stamp" buildings and vegetation on an irregular area, but tied to the placement of the VTP1 texture orientation, we'd have an autogen replacement. A program like Ground2K might not be far from this possibility. Then the placement of a named non-landclass texture to a VTP1poly would also be able to "tile" objects properly to the texture... just like autogen ( pseudo-autogen? ).But for now, it would be best to load your bitmap as a background into Airport or FSSC, and place objects as APIs on that if needed. I can imagine the headache of placing thousands of objects on top of non-landclass polys in a large project, like the NL2000 group is working on. :(Dick

Share this post


Link to post
Share on other sites

I haven't yet figured out yet how to apply to a large vtp2 poly the set of texture slices acheived thru resample. I have made a tiling of the same texture, which would be useful for water areas. But I've not yet found a way to replace the tiling acheived thru resample using vtp. The only reason I wanted to do this was to use vtp1 as the tarmac over my resample slices. I'm unable because I can't put vtp over the slices. But...not being able to use autogen is a serious limitation. I may not be able to make use of vtp.Bob Bernstein

Share this post


Link to post
Share on other sites

Hi Bob,I don't think VTP works well for tarmac. I prefer to use the normal polygons (just SCASM poly made with GroundMaker/FSSC/Airport). I think the resolution of the VTP polygons is to low to look really nice for on an airport. I don't see much advantage in using VTP for them thus.Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Share this post


Link to post
Share on other sites

Hi Bob.Yes. Unfortunately, the BGL made by resample prevents the use of VTP or LWM polys over that Area.Dick

Share this post


Link to post
Share on other sites

So could it be that if you want to use photo real textures that the resample method is the only logical approach for more than a simple airport area?Bob B

Share this post


Link to post
Share on other sites

Hi Bob.I would think VTP2 would be a good way to display CUSTOM slices.There's no limitation to the size covered, or to what shape or shapes of the "window" revealing the photoreal texture tiling would need to be.You would need to make autogen for photoreal either way. The only difference with VTP2, is that the textures need to be vertically flipped, and the textures and autogen need to be in the "C:Program FilesMicrosoft GamesFS2002SCENEDBWORLDTexture" folder. And, of course, to get water, you'd need to create LWM masking polys.In exchange, you get to apply other VTP polys and lines over the Layer displaying the CUSTOM textures.. and they can have their own autogen if default landclass is used. You can also create LWM watermasks wherever you like, and even color, or tint the water with VTP2 polys( White in winter? or brownish runoff ponds in spring? ).But, the same drawbacks exist when using CUSTOM textures, regardless of using resample's BGL or a VTP2 BGL. A single US county could need 6000+ CUSTOM textures, and 1000+ CUSTOM autogen. 25Mb or better.============================By comparison, using photos or georeferenced line bitmaps as a drawing template, a program like Ground2K can create a correctly positioned set of VTP2 lines and polys for that county at an expense of about 300Kb. And because you'd use the default landclass and lines as a palette, there's few problems blending the scenery into the default, at the edges of the scenery. Many times that's not even an issue, as the edges of towns are usually well defined, and different crop textures are usually ended at roadlines.That's one reason I'm experimenting with this method. Arno knows the process as well or better than I. His group has a very talented bunch of programmers that have been able to translate georeferenced data directly to LWM and VTP data structures. That simplifies things a lot. So the process is to make a good landclass bgl, then tweak it with smaller VTP2 polys to define terrain shapes, then add the roads, rails, shorelines and lakes.The problem his group runs into, is that the "palette" of default landclass is too restrictive for their tastes and location, and by creating their own grass or crop or town textures, the autogen is voided for those texture sets. Then they need to place trees or buildings as objects, instead of using autogen. When their work is released, it should be very accurate, and much more compact than photoreal. But it's had a lot of work invested in it... perhaps more work than just using a good colored set of photoreal textures.In the above Whitewater jpeg, if I chose to develop the town to photoreal-like placement of trees and buildings, it would be a real chore, as the small town needs about 2000+ buildings, and 10000+ trees! That's a lot of objects to place... but it would be very accurate.Just the single LOD13 Area that represents my neighborhood in nearby Delavan, Wisconsin, would need about 300+ buildings and 1000+ trees. Fortunately, if your level of commitment to detail is not that great, VTP2 allows you to just use the default landclass with it's own default autogen. :)=======================Another approach is to use a program like Terrascene to generate pseudophotoreal. But the same size problems exist for the massive amount of textures. Those 'slices' can be displayed by resample's BGL or by VTP2 as well.======================As an example, I could redo Niagara Falls or Oshgosh as VTP2. It would look exactly the same as the default "resample" examples, but you could LWM mask or place VTP polys and lines over them. That may or may not be important to a designer, but the option is there if you need it.=====================If you like the look of photoreal, and are skilled at coloring the photos and blending the edges to the default textures, resample's BGL would be a good choice... especially if there's no need for overlying VTPs. Flattened areas would still be OK for the older FS2000/FS98 textured ground polys.Dick

Share this post


Link to post
Share on other sites

Hi Dick,You describe our problems correct :), but CUSTOM textures is no option for us. We have done a simple calculation and with seasons it would require about 5 GB of textures to cover the area we are designing with CUSTOM textures. Of course it is clear that this can't be distributed to the users anymore.Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

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