Jump to content
Sign in to follow this  
rhumbaflappy

Photo-tiles and Resampler

Recommended Posts

Guest luissa

Hi,I would like to make some disperse comments on the workings of the "MS SDK Resample Tools" to generate Custom Terrain.1) the first comment is that a normal 256-color bitmap also works as a photo-tile. The "alpha-color" appears as water. I tried non-mipped 8-bit bitmaps but FS creates (and shows) the MIPS. The only difference that I noticed in compairison to DXT1 is that they do not look darker as it has been reported. However, I will keep using the DXT1.2) the second comment is about the sampling of an input (large) bitmap to generate the 256x256 photo-tiles bitmaps. I noticed that only the inner 254x254 pixels of each photo-tile are displayed in the simulator. I do not know if the sub-texture is stretched to fill the entire quad or if 254x254 pixels are resampled to 266 x 256 pixels.3) I tried to generate N adjacent LOD13 bitmaps (which I call photo-tiles) from an input bitmap already "scaled" to the "4.8m/pixel" resolution. The input bitmap had 256 rows by Nx256 columns and spans exactly N LOD13 quads. I am confident about the "CellX/YdimensionDeg" parameters since what I get in quad 1 is what I get in quad N. I would expect that:1st row of quad1 would be pixel 001 up to pixel 256 of 1st row input bitmap1st row of quad2 would be pixel 257 up to pixel 512 of 1st row input bitmap1st row of quad3 would be pixel 513 up to pixel 768 of 1st row input bitmapInstead I get:1st row of quad1 is made of pixel 000 up to pixel 257 of 1st row input bitmap1st row of quad2 is made of pixel 256 up to pixel 513 of 1st row input bitmap1st row of quad1 is made of pixel 512 up to pixel 769 of 1st row input bitmapWith "is made of" I mean that 258 pixels are resized to 256. Pixel 000 is black (missing). Given my second comment above, all the pixels in the first row of my input bitamap are correctly displayed in this way.4) In consequence of 2) and 3) I gave up to make a small tool to "slice" an input bitmap bypassing the "SDK Resampler".Kind Regards,Luis

Share this post


Link to post
Share on other sites

Hi Luis.First, a 256x256 grid of groundtiles ( generated at runtime by the sim ) is defined as a assignments of a 257x257 'bounding' array of verticies by Resample. So a landclass sourc, if used to display CUSTOM textures, needs to have a 257x257 source ( numbered 0-256 ).Each generated groundtile covers an LOD13 area. Lee Steffensen had discovered all default TDF files use a Point grid of 1-255 to define the LOD13 display. Yet, input textures are 256x256 ( 0-255 ). The conclusion is that Point row '0' and Point column '0' are used as a blending overlap in FS2002.You'll see this in the pic below. This is generated from my CellGrid macro. See how the pixels are blended? That must be the '0' row overlap. if I plot it as 255x255, it leaves a 'crack', in which the underlying autogen can sprout through!So my conclusion is to use a 257x257 source for resampling, with a 256x256 celldegreedim ( as the runtime-generated groundtiles will be 256x256 ). The CUSTOM textures assigned by LandClass values #253 and #252 should be 256x256, and they will overlap and blend by a pixel to the north and west.Dick

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