Sign in to follow this  
rhumbaflappy

Maybe we can use 512 or 1024 textures.

Recommended Posts

I was messing around with TB and some scenery yesterday, and I had a wild idea. I wondered if a texture would show up if it was 512x512 instead of 256x256. I created a 512x512 texture of a red and white checkerboard pattern and named it the same as one of the summer textures in the Niagara Falls tutorial. I replaced the 256x256 texture with my 512x512 checkerboard and flew over it. The complete checkerboard exactly filled the replaced texture.I am going to experiment with some high res photos to see if I can see a difference in texture quality using the higher res textures.If anyone else has done this and knows if there is a difference in quality let us know.I am also just about finished with a program that takes the output files from Ladislav Laszlo's "Slicer" program and renames them to the correct LOD13 texture names. I am hoping to have it completed next week.Now if someone can come up with a method to generate the bgl, we may be able to bypass "resample" comepletely. We could generate the textures in two or three resolutions, keep the low res textures for general areas, and replace them with high res textures at airports or other locations where we want high resolution. (I am sure we need to restrain ourselves or our frame rates will go to zero.)Let me know if I am completely crazy, or if I happened on to something here.Frank Smith

Share this post


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

I did a little testing, and I can't see any difference between the 256 res and the 512 or 1024 res textures. It looks like that was a bit premature,However, I have developed a spreadsheet (in excel using visual basic macros) that will provide the information needed to rename files produced by Slice to the correct LOD13 photoreal texture names. I want to convert it to a runtime program so you don't have to paste the results into a .bat file and then run that, but at least I have worked out the algorithm. Give me a week or so.Frank Smith

Share this post


Link to post
Share on other sites

Hi Frank.You'd still need resample to create the BGL. Nobody's come up with a way to avoid this. You can use resample to create a landclass BGL, with #254 as transparent, and #252 for seasonal/night texture placement. We also can place images as CUSTOM using VTPm2 polygons ( but they need to be vertically flipped, and do not show the alpha-channel as water ).I had a similar idea a few weeks ago, but abandoned the idea. I have found the OLD resample actually does a very good job, when given good images and the correct coordinates. It just doesn't like "hair-splitting" concerning the bounds... just give it an image that has a slight 'overhang' ( and the correct coordinates ), and it works perfectly. I found that out when first investigating Terrascene-derived images. When using 4.8 meter/pixel textures from FS2002, Terrascene gives a very good image. When OLD resample slices it, it maintains that quality, and is hard to tell from the default textures.That tells me OLD resample is not too bad, so I then abandoned the idea.In theory, by using an alternative slicer, you can avoid resampling the image, and thereby maintain a tighter control over the image. In reality, you still need to resample ( fit ) with a paint program. Now, you'd need to assume a paint program resamples better than what OLD resample.exe does ( as all images need some kind of stretching or fitting to slice exactly to the LOD13 bounds ). I had assumed that commercial paint programs would do a better job than OLD resample. After my Terrascene image experiments, I'm not so sure. If the resolution of the aerial image is poor, it won't matter if it is sized by photoshop, or OLD resample... it will still look poor in the sim. Conversely, if the image is very good, it will look very good in the sim.As far as image resolution, I believe we are tied to the 256x256 pixels for an LOD13 Area. That is the limit of the terrain engine. Dick

Share this post


Link to post
Share on other sites

>I was messing around with TB and some scenery yesterday, and >I had a wild idea. I wondered if a texture would show up if >it was 512x512 instead of 256x256. I created a 512x512 >texture of a red and white checkerboard pattern and named it >the same as one of the summer textures in the Niagara Falls >tutorial. I replaced the 256x256 texture with my 512x512 >checkerboard and flew over it. The complete checkerboard >exactly filled the replaced texture. >>I am going to experiment with some high res photos to see if >I can see a difference in texture quality using the higher >res textures. >>If anyone else has done this and knows if there is a >difference in quality let us know. >>I am also just about finished with a program that takes the >output files from Ladislav Laszlo's "Slicer" program and >renames them to the correct LOD13 texture names. I am >hoping to have it completed next week. >>Now if someone can come up with a method to generate the >bgl, we may be able to bypass "resample" comepletely. We >could generate the textures in two or three resolutions, >keep the low res textures for general areas, and replace >them with high res textures at airports or other locations >where we want high resolution. (I am sure we need to >restrain ourselves or our frame rates will go to zero.) >>Let me know if I am completely crazy, or if I happened on to >something here. >>Frank Smith Hi Frank,Some time ago I did very extensive testing of trying to use 512x512 and 1024x1024 textures in all types of formats including trying to see if some "added" lines/setting in the fs.cfg could encourage FS2k2 to display the textures in their full resolution, the result was that the textures would display but only at 256x256.The only method that is available to use 512x and 1024x for terrain is the old MeshWith1Tex method, which is too bad as the high res texturing looks incredible!If the MSFS team simply enabled FS to display higher res textures there could be some very superb scenery that would surpass anything anyone has ever seen on a desktop PC, I

Share this post


Link to post
Share on other sites

Dick, Thanks for the input.This probably isn't the right forum for this, but can you point me to where there is information on how to create the binary input file for landclass, and where landclass development is discussed?ThanksFrank Smith

Share this post


Link to post
Share on other sites

Hi Frank.Here's a link to what the landclass values are ( save it from your browser as a webpage (html) ):Here's an interesting thread:[link:ftp.avsim.com/dcforum/DCForumID10/1120.html|257x257 sourcefile discussion]Some more:[link:ftp.avsim.com/cgi-bin/dcforum/dcboard.cgi?az=show_thread&om=1103&forum=DCForumID10&viewmode=all|Displaying photoreal with landclass]John Cillis' [link:ftp.avsim.com/library/esearch.php?DLID=&Name=&FileName=lca-130.zip&Author=&CatID=Root|Landclass Assistant]My [link:ftp.avsim.com/library/esearch.php?DLID=&Name=&FileName=landcalc2.zip&Author=&CatID=Root]LandCalc2Landclass Assistant and LandCalc2 both require you to get and install FSUIPC. Then, while slewing in FS2002, you can start htese programs and get CUSTOM and landclass information literally "on the fly". :)And check the AVSIM MSFS Scenery Forum with the search function:'landclass' 'INF' ( using the AND button ).Dick

Share this post


Link to post
Share on other sites

This experiment is on my 'still have to try list' for a long time already. I was almost getting around to do it last week, but switched back to my gmax scenery for now. The simple result that it doesn't work can only be explained by the fact that FS is using mipmaps. Which leads to more experiments:1) Maybe you can only see the 512 texture when you are very close?2) Have you tried a 512 texture WITHOUT mipmaps? This will either display the 512 texture, or nothing (black / grey), or FS produces it's own mipmaps (and then displays 256 again).3) What if we use mipmaps, but delete the lowest one. Maybe FS is hardcoded to use say 10 mipmaps. If we delete the lowest one we may be able to shift everything to higher resolutions?Similar to Dick, I have done some resampler experiments. I came to a very similar conclusion: resize your source image to the right resolution and then let resampler do the job. The closer the resolution of the source image is to the resolution of the output images, the better it works. However, I prefer the new resampler. Resampler 1 produces sharper / crisper images, but also introduces small aliasing efects (jaggies on diagonal roads). Resampler 2 doesn't have those jaggies, but since it can only do this by filtering the image, it doesn't produce quite as sharp images. I found that both outputs are very close to the original image though, so which ever resampler you use would be your own preferential choice...Cheers, Christian

Share this post


Link to post
Share on other sites

Hi Frank.When I make a landclass, I make a 257x257 8-bit bitmap in PaintShopPro. I use a palette that reminds me of the texture values I'm trying to place. I then save as a RAW file ( no bitmap header... just an 8-bit binary matrix ).I then use this style INF, with old resample:; Home257.inf; 257x257 source[Destination]DestDir = "."DestBaseFileName = "HomeLC257"UseSourceDimensions = 1[source]Type = ClassU8SourceDir ="."SourceFile = "Home257.raw"Lon = -90Lat = 45NumOfCellsPerLine = 257NumOfLines = 257; 256 spanCellXdimensionDeg=0.0146484375CellYdimensionDeg=0.010986328125My theory is that for landclass, we assign textures to the vertices... and 257x257 verticies surround 256x256 cells. My CellDimensionDegrees are calculated for 256x256. In other words, CellDimensionDegrees = ( span of degrees ) / ( verticies - 1 )... and the verticies must always be 1 more than the cells.Here's a laugher... the entire world:; World.inf; Huge source[source]Type = ClassU8SourceDir ="."SourceFile = "goge2_0ll.raw"Lon = -179.99999999Lat = 89.99999999NumOfCellsPerLine = 43200NumOfLines = 21600CellXdimensionDeg=0.0083335262390333109562721359290724CellYdimensionDeg=0.0083337191536645215056252604287236[Destination]DestDir = "."DestBaseFileName = "World"UseSourceDimensions = 0NorthLat = 89.99999999SouthLat = -89.99999999EastLong = 179.99999999WestLong = -179.99999999The sourcefile was HUGE... 43200x21600. Again:CellDimensionDegrees = ( span of degrees ) / ( verticies - 1 )...in this case, the source was not under my control, but I did subtract one from the verticies. The placement was pretty good. Note that the source was much larger than the "256x256 Multiple + 1", that both Christian and I have recommended in the past. So, resample had to choose values... and again, did a pretty good job. The BGL took about 20 minutes to create, including compression.=========================For placing CUSTOM textures, fill your 257x257 image with index value #254, then use value #252 for CUSTOM with seasons.First, an image of the MS Oshgosh scenery from TMFViewer. The yellow is value #254... the Cyan rectangle is value #252, and is the photoreal of Oshgosh. Photoreal is simply a landclass.Second, another TMFViewer pic that shows some LWM polygons over the worldlc.bgl landclass. The white lines are the bounds of actual LOD13 Areas... and their corners meet at the center of the landclass-assignment square shape... each assignment blends to the center of the white-outlined LOD13 Areas surrounding the verticies. There must be 1 more vertex then the span of cells they bound... so resample creates 257x257 for a simple landclass.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