Sign in to follow this  
Guest knnygar

Transparent VTP2 and autogen?

Recommended Posts

I have tried to make a photoscenery with Ground2k and VTP2 polys.I have used 8-bit tiles to get a smooth transfer to the original scenery.But I'm having trouble adding autogen :(I have used annotation tool and put the .agn files in the same folder as the BMP.

Share this post


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

Did you use the CUSTOM option for the textures (253). I have seen other sceneries where the autogen then only works if you place the textures in the sceneryworldtexture folder. This was in Fs2002, but it could be that it still is the same. If you make the CUSTOM scenery with resample (so no autogen) the autogen does work in your local folder.

Share this post


Link to post
Share on other sites

For this project I have used Photoscenery maker, Ground2k, Paintshop and Imagetool.I used Photoscenery maker to make the phototiles, then I used Ground2k to make VTP2 polygons with Custom texture 253 and the tiles.For the alpha transparency I used Paintshop pro 8.I put the .bgl file in a scenery folder without a texture folder, and the .bmp and .agn I put in scenery/world/texture (FS2004).Initially I tried the photoscenery maker with DXT-1 and autogen and that worked.But to get the transition smooth I switched to VTP2 and 8-bit, and then the autogen disappeared.

Share this post


Link to post
Share on other sites

That is interesting. I have never heard of the texture format having an influence on this. If this is the case I am afraid that you can only use the DXT format.But why does the transition not look smooth with DXT images? I would have expected no big difference there. Most default textures are also DXT.

Share this post


Link to post
Share on other sites

When I convert to DXT-1 the alpha channel becomes black and white(loses gradient) and the transparencies doesnt work in FS.Whith 8-bit it looks great except for the autogen :(I noticed that in Ground2k the "253 custom texture" is not marked as "active autogen".I will try later on today from the start, and see if I can get some result.

Share this post


Link to post
Share on other sites

Knnygar, I've just been doing my first project in the same way. As Arno assumed, I also imagined the texture format would be best at dxt1, but alas...as you know...the transparency of the alpha channel is defeated. Using 8 bit imagry mipped, with an alpha channel is working great now. Autogen is next for me, but several threads exist discussing it. I'm putting my scenery calling my vtp2 polygons and textures in my local dir....the autogen file will be made from an unflipped version of the texture, and then the "main" image will be substituted for a completely transparent one...then the agn file and the transparent texture will together be put in a main texture folder, like you've used...Bob Bernstein

Share this post


Link to post
Share on other sites

Hi all.The autogen needs to go into:C:Program FilesMicrosoft GamesFlight Simulator 9SceneryWorldtexture...offhand I don't know if the CUSTOM named textures must go there, but it would do no harm to place them there.Dick

Share this post


Link to post
Share on other sites

Now I have tried from the beginning to end with no luck :(The .bmp and .agn is placed in ..sceneryworldtexture.Anybody had any luck placing autogen on VTP2 polygons with 8-bit textures?

Share this post


Link to post
Share on other sites

Hi knnygar.First, autogen is not flipped, so it must be made for an unflipped texture ( or a reflipped )... that texture is just a guide and may be deleted after the autogen is made. The autogen MUST go into:C:Program FilesMicrosoft GamesFlight Simulator 9SceneryWorldtexture... or wherever your Worldtexture folder is. ALL VTP2 placed CUSTOM groundtiles' autogen must go into this folder.The poly must be VTP2, with texture #253 or #252 ( seasonal ).The poly's layer must be on top of all the other layers, or it will not show the autogen... autogen is always shown on the higher layer. You can have a road over the poly, but the autogen will be excluded in the proximity of the road.It makes no difference what format the CUSTOM texture is, either DXT1 or 8-bit with alpha for transparency.Here's a VTP2 poly that places CUSTOM that is a street map:http://forums.avsim.net/user_files/41443.jpghttp://forums.avsim.net/user_files/41444.jpghttp://forums.avsim.net/user_files/41448.jpgDick

Share this post


Link to post
Share on other sites

Hi knnygar,Yes I confirm. Here is one 8-bit bitmap with alpha:http://forums.avsim.net/user_files/41467.jpgand here is a shot where the bitmap (was vertically flipped) appears on the right side. Note the blending at the center and the small red roofs of litle autogened houses on top of the bitmap (right side):http://forums.avsim.net/user_files/41468.jpgThe bitmaps (with "custom" names) and the agns go the main texture folder of the sim. The VTP method 2 polys are in layer 5. I get the same results in FS8 and FS9.Kind Regards, Luis

Share this post


Link to post
Share on other sites

I have now tried everything I can think of but no luck :(I'm beginning to wonder if there is something else that blocks the autogen.But when I removed this scenery the autogen reappeared so I dont think it is the problem.Here are the .asm code from G2k;--------------------------------------------------; Ground2K Polys VTP2 : Generated on 08.10.2003 00:05:40;--------------------------------------------------include TDFMacros.incinclude TDFHeaders.incBGLHeader 63, 60, 7, 4, TerrainHeaderStart, VTPHeaderVTPHeader label word VTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPStart label word datamark_v0 label word VTPDataArea 1, 1, 0, 0 VTPLayer 7, 0 VTPNumTexturesInLayer 2, 0 VTPTextureId 0, 0 VTPPolyCount 1, 0;;; VTPPolyMethod2 4, 0, 0 VTPPointXY2 11985, 4845 VTPPointXY2 12240, 4845 VTPPointXY2 12240, 5100 VTPPointXY2 11985, 5100 VTPTextureId 1, 0 VTPPolyCount 2, 0;;; VTPPolyMethod2 4, 0, 0 VTPPointXY2 11986, 5100 VTPPointXY2 12240, 5100 VTPPointXY2 12240, 5355 VTPPointXY2 11985, 5355;;; VTPPolyMethod2 3, 0, 0 VTPPointXY2 11986, 5100 VTPPointXY2 11985, 5355 VTPPointXY2 11985, 5100 datamark_v1 label word VTPDataArea 1, 1, 0, 0 VTPLayer 7, 0 VTPNumTexturesInLayer 2, 0 VTPTextureId 2, 0 VTPPolyCount 1, 0;;; VTPPolyMethod2 4, 0, 0 VTPPointXY2 4080, 4845 VTPPointXY2 4335, 4845 VTPPointXY2 4335, 5100 VTPPointXY2 4080, 5100 VTPTextureId 3, 0 VTPPolyCount 1, 0;;; VTPPolyMethod2 4, 0, 0 VTPPointXY2 4335, 4845 VTPPointXY2 4590, 4845 VTPPointXY2 4590, 5100 VTPPointXY2 4335, 5100 datamark_v2 label word;----------------------------------------------Cellv_396_79 EQU VTPCellID 0, 396, 79Cellv_397_79 EQU VTPCellID 0, 397, 79;---------------------------------------------- VTPIndexStart label word VTPIndexHeader 2, VTPIndexData, VTPStart VTPIndexData label word VTPIndexEntry Cellv_396_79, VTPStart, datamark_v0, datamark_v1 VTPIndexEntry Cellv_397_79, VTPStart, datamark_v1, datamark_v2;-----------------------------TextureStart label word VTPTextureListHeader 4, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart 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_4TextureDataStart label word texturemark_0 label word VTPTextureName "011200332211133su.bmp" VTPTextureType 0, 0, 0, 4 texturemark_1 label word VTPTextureName "011200332211311su.bmp" VTPTextureType 0, 0, 0, 4 texturemark_2 label word VTPTextureName "011200332300022su.bmp" VTPTextureType 0, 0, 0, 4 texturemark_3 label word VTPTextureName "011200332300023su.bmp" VTPTextureType 0, 0, 0, 4 texturemark_4 label wordTextureDataEnd label word; ------------------------------VTPEnd label word

Share this post


Link to post
Share on other sites

Hi,If you want to compare here is the code to generate 9 Areas in 3 different Cells using vtp method 2.Kind Regards, Luisinclude TDFMacros.incinclude TDFheaders.incVTPm2CUSTOM Macro AreaX, AreaY, Layer, bReplace, TextureID WORD ( AreaY * 800h ) + ( AreaX * 40h ) + ( 1 * 20h ) + 1 BYTE ( bReplace * 80h ) + Layer BYTE ( 0 * 80h ) + 1 BYTE ( 0 * 80h ) + TextureID BYTE ( 0 * 80h ) + 1 BYTE ( 0 * 40h ) + ( 0 * 20h ) + 4 WORD AreaX * 255 + 4080 WORD AreaY * 255 + 4080 WORD AreaX * 255 + 4335 WORD AreaY * 255 + 4080 WORD AreaX * 255 + 4335 WORD AreaY * 255 + 4335 WORD AreaX * 255 + 4080 WORD AreaY * 255 + 4335EndMBGLHeader 34, 32, -15, -18, TerrainHeaderStart, VTPHeaderVTPHeader label wordVTPFileHeader 256, VTPIndexStart, TextureStart, VTPEndVTPStart label word;Cell_348_162 Area Datadata_start_0 label wordVTPm2CUSTOM 2, 26, 5, 1, 0VTPm2CUSTOM 3, 26, 5, 1, 0VTPm2CUSTOM 4, 26, 5, 1, 0 data_end_0 label word; Cell_347_163 Area Datadata_start_1 label wordVTPm2CUSTOM 26, 0, 5, 1, 0VTPm2CUSTOM 27, 0, 5, 1, 0VTPm2CUSTOM 28, 0, 5, 1, 0data_end_1 label word; Cell_348_163 Area Datadata_start_2 label wordVTPm2CUSTOM 0, 0, 5, 1, 0VTPm2CUSTOM 1, 0, 5, 1, 0VTPm2CUSTOM 2, 0, 5, 1, 0data_end_2 label wordCell_348_162 EQU VTPCellID 0, 348, 162Cell_347_163 EQU VTPCellID 0, 347, 163Cell_348_163 EQU VTPCellID 0, 348, 163VTPIndexStart label wordVTPIndexHeader 3, VTPIndexData, VTPStartVTPIndexData label wordVTPIndexEntry Cell_348_162, VTPStart, data_start_0, data_end_0VTPIndexEntry Cell_347_163, VTPStart, data_start_1, data_end_1VTPIndexEntry Cell_348_163, VTPStart, data_start_2, data_end_2TextureStart label wordVTPTextureListHeader 1, TextureIndexStart, TextureDataStart, TextureDataEndTextureIndexStart label wordVTPTextureListEntry TextureDataStart, texturemark_1, texturemark_2TextureDataStart label wordtexturemark_1 label wordVTPTextureName "252"VTPTextureType 1, 0, 0, 4texturemark_2 label wordTextureDataEnd label wordVTPEnd label word

Share this post


Link to post
Share on other sites

Hi knnygar.The only way you will get CUSTOM autogen is to use the texture name '252' or '253'. Those numbers will place the CUSTOM textures as well, providing they have the right name... the name locates the texture.As Luis' code indicates, the CUSTOM can be placed byusing a macro and BGLC code to place them covering a whole LOD13 Area... or you can use a program like Ground2K to place them as any shaped poly... and the sim will tile the textures, and mask them to the shape you draw.I noticed the version of Ground2K you are using is a bit dated. Christian has uploaded a new version ( Ground2K4_v5 ) to the library here at AVSIM.Dick

Share this post


Link to post
Share on other sites

I just tried the newest version of Ground2k and custom testures, but no autogen :(I have tried with different other textures marked "y" in G2k and they show autogen.I think it's the 252/253 custom texture that destroys the autogen.I've ran out of ideas so I think I will abandon this autogen for the time being :(

Share this post


Link to post
Share on other sites

252/253 does show autogen ( verified for both FS2002/2004 ) when both .BMP and .AGN files are placed in WORLD/TEXTURE directory and there is NO texture directory in the scenery itself.Some other ways are also possible, but this one is verified.

Share this post


Link to post
Share on other sites

With 8-bit transparency ?I placed the 8-bit .bmp with alpha together with .agn in world/texture.And there is no texture directory in the scenery.But i can not get the autogen to show ;( I'm sure i'm doing something wrong but I can't seem to find the problem.

Share this post


Link to post
Share on other sites

Hi there:the "funny" thing is that I can't get my autogen to stay away...I have large blocks of custom textures (DXT1, with alpha=water), with both textures and the enabling .bgl (compiled by resample.exe) in a local scenery/texture folder. I also have custom .agn files for a few of the textures from an earlier experiment with VTP2 placement. These were placed and left in the ...worldtexture folder.Now everytime I activate the local folder with the photoreal scenery the custom autogen shows up as well. That's not a bad thing at all, I'm just surprised because I thought custom autogen would need to be enabled via a scenery .bgl file as well (I have removed the VTP2 .bgl file). And this "phenomenon" doesn't occur in FS2002, only in FS9.BTW, if the photoreal scenery is deactivated, the custom autogen doesn't show either (which is a good thing, and expected).Cheers, Holger

Share this post


Link to post
Share on other sites

Thanks for your help, Dick. Its a bit confusing, seems like a couple of different places to put a texture name, without a clear reason to use one over the other.Knowing that your way works, Seeing your way is the best path to success. Just so I know, if using the "other textures" block is wrong in this screen...what is that section for?The buttons on the main screen of ground2k offer an ability to select a texture also, which brings up still another opportunity to enter a texture name. Too many options! LOL I must say, when I found out vtp1 wouldn't work for fs2k4, I was somewhat pleased as I no longer had to try to decide which to use!Do we never enter the name of the texture if we're using the correct coded name for a given lod13 grid?Bob B

Share this post


Link to post
Share on other sites

Hi Bob.If you have a CUSTOM named texture, you never need to use it's name in either Ground2K or in a handmade ASM file. Why have those other (6) texture blocks? What if you have a texture called "Yards"... you have 6 variations for each season and night. You want to use it as a grassy texture under another poly. The other poly is city streets... just the grey streets, and transparent everywhere else. Those streets might be CUSTOM with autogen houses and trees... but the grassy poly will show up from underneath. The end result is streets, houses, & trees on grass.Your "Yards" texture will have no autogen, as only landclass textures can have autogen!CUSTOM is landclass. You can place CUSTOM tiles with a landclass file comprised of #254 ( transparent ) and #253 non-seasonal landclass value. Or use #252 for CUSTOM seasons.Refering to a texture by name will display the texture, but it will have no autogen.================By the Main Screen, I think you mean the "Area Creation" screen getting called. Christian made the ability to place a VTP1 poly that would cover an LOD13 Area. This was a quick way to use VTP1 to tile the ground. We don't need to worry about that as VTP1 is gone in FS9.The Area Creation Screen allowed us a choice to make 1x1 areafills or VTP1 polys. Either method would cover an entire LOD13 Area. Christian could have included 2x2, and 4x4, and 8x8, and 16x16 AreaFills.. as well as a CellFill. He mercifully left that out. But truthfully, I handmake my own areafills, as I can't stand clicking hundreds of 1x1 squares.================Marky Parky has been experimenting with the terrain.cfg file, and adding autogen to non-landclass textures... but there are distribution problems with this approach. We can have only one terrain.cfg, and authors would be competing for the same numbers.Perhaps the XML format used in the Autogen folder will yield autogen for non-landclass textures, but for now, only landclass ( of which CUSTOM is a subset ) allow autogen.Dick

Share this post


Link to post
Share on other sites

Thank you, Rhumbaflappy.These two posts explained alot :)I mistakingly thought that I had to choose texture :(When I tried only custom texture it all fell into place.Some small adjustments left and then I can go on to the next step in the process :)

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