Jump to content
Sign in to follow this  
Hans_Petter

Megatile error

Recommended Posts

Hi Hans,Maybe you are saving the file as a compressed image?I use the GIMP for final saves. Make sure your tile is 4096 X 4096 and saved uncompressed.The other possibility is that something is wrong with the palette you are using.Cheers :-wave Bruce H

Share this post


Link to post
Share on other sites

This is what I did:After reworking and touching up the maps as BMPs I converted them to TGA and applied the Seattle palette. This reduced the images to 250-something colors, yet according to my PSP the targa file format required millions of colors. I saved the images with "millions of colors" but a count disclosed that I still had no more than 254. Makes sense -- a reduced image doesn't get intermediary hues restored by expanding the palette. Now, it may not be a good idea to apply the Seattle palette before GenQuadrant does. It shouldn't really make a difference but I could try to feed GenQuadrant targa files that really have the full rainbow of colors.I haven't got Gimp but I did try IrfanView. That is, I opened the files in IrfanView and resaved them to check whether that made a difference. I believe a TGA image of a megatile weighed in as a 16 MB file. I'll check when I get home. Provided Gimp is a must I'll obtain a copy.I'm quite sure that I chose the Seattle palette rather than the SanFran palette in GenQuadrant. I'll try to sort this out tonight and right now I'm just looking for feedback that will lead me in the right direction.I know that there are at least two kinds of targa files and I may have ended up with the wrong kind.

Share this post


Link to post
Share on other sites

Hi Hans,The palette should be 256 colors (8 bit format). If you save the file with greater than 8 bit format, even though there are less than 256 colors, the .tga header is the incorrect size and Genquadrant will not work with it correctly.A good way to make sure the palette is right is to load a known good .tga file (4096 X 4096) with the Seattle palette, then copy and paste your new (4096 X 4096) file into the good one. Then save with the correct tile name.That should convert the colors to closest match, and retain the correct palette.I'm not sure how Genquadrant handles the palette, but for sure FU will not render anything correctly if the palette is not matched.GIMP is a free download from http://downloads.sourceforge.net/gimp-win/...-i686-setup.exeCheers :-wave Bruce H

Share this post


Link to post
Share on other sites

I got Gimp. Last night I didn't have enough time to fix this but I noticed that Gimp has a check box / tick box for the starting point of a targa. The thing is, when I converted the L0.bin I had created back to TGA to check it out I found it was flipped vertically. Moreover, the colors were all strange. Hence, the problem may be that the TGA format comes in two versions regarding starting point and palette order. While any image editor will display any TGA correctly the "left or right handedness" is critical for GenQuadrant. At any rate, I'll paste my new TGA files (or, their BMP corresponding versions) into a stock megatile TGA and check what I get.By the way, Gimp seems to be a very powerful image editor. All the tabs and windows are a bit confusing but I'll try to familiarize myself with these A.S.A.P.

Share this post


Link to post
Share on other sites

Hi Hans,When you save in GIMP, untick both boxes so that the file is uncompressed and origin is top left.In Genquadrant, don't select a palette, it will work it out OK from your .tga file. Just load your file and click "Save from original map all maps as uncompressed bins"CheersBruce H

Share this post


Link to post
Share on other sites

I got the orientation right. While PSP and IrfanView both seem to create targa files that are flipped vertically Gimp provides the option of saving the images the "right" way. My colors still leave something to be desired. It's not a SanFran versus Seattle palette issue since either choice produces different aberations.I have now pasted a full color bmp unto a targa version of a stock Seattle megatile and saved it in Gimp. It looks fine and I'll see how it works out tonight. However, a color count reveals that the image has retained all of the original hues. Here's today's question: It seems impossible to make a targa in 8 bit color. While I have been able to reduce the colors to the Seattle palette's 256 colors the images are not 8 bit. (As mentioned, PSP claims that a targa has to be a full color image). Will GenQuadrant take a millions-of-colors image? Since the application is supposed to save the BINs in either FU3 palette the conversion should take place within GenQuadrant. Thus, it should not be necessary to apply any FU3 palette before an image is being processed by GenQuadrant. My problems might stem from the fact that I have applied the palette twice.Whether I get this right tonight or later I'll be happy to zap you a copy.

Share this post


Link to post
Share on other sites

Hi Hans,Sorry for the delay, I've been away for a couple of days.I use PSP as well, and find that I have to use GIMP for the final save, as there is something odd about PSP targa format which makes it incompatible with GenGuadrant :( After finalising the map, and resizing to 4096 X 4096 proceed as follows:Import the scenery palette using Image>Palette>Load Palette.Both Seattle and Sanfran palettes are attachedThis will reduce the image to 8 bit (256 colors)Save the file as targa using File>Save As. Select image type tga and click options to save as 8 bit, uncompressed. Load GIMP and open the file.Save file again using File > Save As. Click Save. When the options panel appears, untick both options.Then proceed to GenQuadrant :-) Hope this works.CheersBruce H

Share this post


Link to post
Share on other sites

I thought that I'd get it right when I read your PDF instruction. I found the PSP option of defining 8 bit and no compression as I saved the targa with the Seattle palette. Then I launched Gimp and resaved the image with both boxes unchecked. Result: Same as always -- a fine-grained brownish texture rather than the real thing. Do you change any default settings in GenQuadrant? There's resample with mean rgb, pure colors only etc.I may be out of options. Could I send you a 16 MB targa as an email attachment or would that exceed your quota?

Share this post


Link to post
Share on other sites

Now back from the south of Portugal http://forums.avsim.net/user_files/189766.jpgand now to the solution.As mentioned above the 256 color tga file must have been created with the Seattle palette as top-down version -> first pixel is in the upper left corner.The easy way is to use another tga tile as template and copy /paste the new tile in it, then save it with a new name.When you use the old Microsoft Office Photo Editor the correct tga file format is created as default. Since 2001 I have used this way to build hundreds of tiles for FU3. Other graphic programs will modify the palette during conversion making the result unusable.Most of you don't have Photo Editor and have difficulties in generating the tiles, so forget Genquadrant and use GenBinTile as distributed with the Channel Islands region. Look at the script and convert your 24bit color picture to the SanFran or Seattle palette tga file by using the new command line utility TileCut and GenBinTile Use: TileCut x0 y0 wx wy xp yp xxyyx0 y0 upper left corner start in mega.tgawx wy size of area used in mega.tgaxp yp upper left corner insert into tilexxyy as tile nameFiles L0blank.tga must exist in same folderIf your tile is ready in 24bit color as tga thenTileCut 0 0 4096 4096 0 0 xxyyThis will convert the 24bit color targa file into a palletized 256 color file ready for conversion with GenBinTile. The selected palette depends on the used L0Blank.tga file located in the same workfolder.Hope this will help :-):-wave Andre

Share this post


Link to post
Share on other sites

Hi Hans,I don't change any settings in Genquadrant, they are mainly a legacy from the CPD files generation. Just load and click "Save all maps as uncompressed.."Very odd. If you want to send me a zipped tga file via yousendit.com then I will have a look. My email is bch.hannahgmailcom.Maybe you should try Andre's new method and see how that goes.Cheers :-wave Bruce H

Share this post


Link to post
Share on other sites

Great, I'll try that A.S.A.P. :-)Regarding MS Photo Editor, if it's useful I guess I could install it from my MS Office 97 CD. If so, it would be nice to get this application only rather than the entire suite. I'm quite happy with Open Office these days. Further, since I've spent so many nights trying to get this right with the image editors I've got (PSP 6, Corel 8, IrfanView and Gimp) I remain curious what went wrong. It could be that PSP writes something to the file that is carried through the entire conversion process even when Gimp does the final save. Let's hope my original PSP-generated BMPs aren't "infected".

Share this post


Link to post
Share on other sites

With Photo Editor 97 it's very simple, you can install this without all office stuff. Open an original Seattle tga tile, open your bmp 24bit color file with IrfanView, then copy the Irfanview image change to Photo Editor and paste it into the opened original Seattle tile and select save at...at this moment the color conversion is done and after a while you can save it with a new name.Do not use Genquadrant better use GenBinTilegood luck:-wave Andre

Share this post


Link to post
Share on other sites

I'm sorry that I'm quite illiterate when it comes to DOS or batch files. I tried: TileCut 0 0 4096 4096 0 0 acajGenBinTile.exe acajWell, nothing happened :-(I need a full string of commands for my acaj 24 bit 4096 x 4096 targa file to get this right :-)I installed Photo Edit from my Office 97 disk. It opened an 8 bit targa all right but went "out of memory" on a 24 bit version. I got "The image is too large (too many bytes)" when I tried to open a 24 bit file or when I tried to paste a 24 bit file over an 8 bit image. Thus, it may seem that the Office 97 version of Photo Edit is incapable of processing a 24 bit targa or bmp covering an entire FU3 megatile.

Share this post


Link to post
Share on other sites

As I did in for the generation script of Channel Islands you have first to create a work folder with the tga, bmp , exe and the batch file using the both command lines:TileCut 0 0 4096 4096 0 0 acajGenBinTile.exe acajpauseexitPause is to hold the DOS windows open at the end so you can see what happens.Photo Editor, yes you can't load the 24bit bitmap larger than 36mb that's why you have to open the bitmap using IrfanView, copy from IrfanView and paste into the opened Tile in Photo Editor.This will work :-):-wave Andre

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