Sign in to follow this  
Guest PaulL01

Preventing Resampling

Recommended Posts

Hi,Thanks to Misho, Elrond and co for providing the tools. I'm having a lot of fun creating scenery!I do have a question though:My source image is 4.8m/pixel, so there's no need for it to be resampled. However, resample.exe stretches the image in the horizontal dimension by about 30% when it creates the 256x256 tiles. (If I try pasting one of them back over my source bitmap, it doesn't fit properly).I guess resample.exe works out whether to do this based on the lat/lon values and the CellXDimension CellYDimension values. I have tried both letting Terrabuilder calculate these, and also tried calculating them myself based on known points in the image, and the answers are roughly the same.The values I get are as follows (I then use resample.exe and convim on the resulting .inf file, as I don't have FS2002 Pro to use with Terrbuilder)Lon = -2.74027Lat = 51.5305CellXdimensionDeg = 6.9237E-5CellYdimensionDeg = 4.3192E-5Does anyone know why this stretching occurs? Could it be because my image doesn't start at the corner of an LOD square? It doesn't make much difference to the visual quality of the scenery, but I'd like to put some default textures at the edges to help it blend in, and I think they won't tesselate properly if they're being stretched.Any help would be most appreciated!

Share this post


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

my impression is that no stretching occurs. If it appears to be stretched, then I'd suggest that your cellx and celly are not precise.Anyway, I know of no way to avoid resample.exe. The routine does more than slice, it assigns file names both onto the texture but also in the tmf file. Now if you crack that file, then you could do that yourself, but I haven't and I don't know anyone who has.Good luck.Bob Bernstein

Share this post


Link to post
Share on other sites

Thanks Bob.I've done some more experimenting and the following SEEMS to be the case. Please excuse me if this was mentioned elsewhere and I missed it, and obviously feel free to correct anything that I'm wrong about! On the other hand, if anyone thinks it would be useful for beginners such as myself, I'll put together a short tutorial.Each 256x256 texture covers one LOD13 quadrant, which is NOT a square, except near the equator. These quadrants correspond to the 'rectangles' in the following picture (not to scale):-http://www.ahand.unicamp.br/~furuti/ST/Car...mg/mollGrid.jpg(from www.ahand.unicamp.br/~furuti)This means that if your source photograph is 4.8x4.8m per pixel, it will still get resampled (stretched) if you're creating scenery that is not on the equator.Instead, to avoid messy resampling, your source photo should be the following resolution (I think):90/2097152 degrees per pixel in the N-S direction120/2097152 degrees per pixel in the E-W directionThis will mean that your source image may look very stretched horizontally. I think it should display correctly in FS2002, though.All comments would be very welcome.

Share this post


Link to post
Share on other sites

>Thanks Bob. >>I've done some more experimenting and the following SEEMS to >be the case. Please excuse me if this was mentioned >elsewhere and I missed it, and obviously feel free to >correct anything that I'm wrong about! On the other hand, if >anyone thinks it would be useful for beginners such as >myself, I'll put together a short tutorial. >>Each 256x256 texture covers one LOD13 quadrant, which is NOT >a square, except near the equator. These quadrants >correspond to the 'rectangles' in the following picture (not >to scale):- >>http://www.ahand.unicamp.br/~furuti/ST/Car...mg/mollGrid.jpg >(from www.ahand.unicamp.br/~furuti) >>This means that if your source photograph is 4.8x4.8m per >pixel, it will still get resampled (stretched) if you're >creating scenery that is not on the equator. >>Instead, to avoid messy resampling, your source photo should >be the following resolution (I think): >>90/2097152 degrees per pixel in the N-S direction >120/2097152 degrees per pixel in the E-W direction >>This will mean that your source image may look very >stretched horizontally. I think it should display correctly >in FS2002, though. >>All comments would be very welcome.Hi Bob,Just trying to follow you here and am going to offer what I can:You should use TB or Elronds tools to calculate your finished dimensions of your bmp based on the Coordinates of its extants in lat and lon and how it needs to fit FS2k2 Lod area based on its Lat Lon position in the modeled world then all will fit as it should.Paul

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