Sign in to follow this  
Guest JohnC

Photoreal Texture Coloring

Recommended Posts

Hi all.I had an idea a while ago about using the textures as a type of 'stamp', to be able to create pseudo-photoreal textures based on the default textures superimposed on real world data ( either images from aerial photos or GIS-data derived images ).If you're still following my thinking ( *:-* ), what I wanted to discover was a means of blending real-world images seamlessly into the sim's default terrain. MS has done this with the few photoreal examples they include with the sim ( Niagara, Oshgosh... ).Those sceneries are NOT photoreal, but derived from photoreal, using a texturing that blends into the landclass tiles. That's why I call them pseudo-photoreal. Almost all of the freeware and payware photoreal sceneries do not blend in with the default scenery, or do they have seasonal variations.I like the idea of using seasonal photoreal for small areas, like towns and cities, much like the Niagara or Oshgosh examples. But, unless they blend into the default textures, they lokk very out of place.I may have found a solution:http://mrl.nyu.edu/projects/image-analogiesImage analogies is a technique that includes a method called "texture by numbers". Here's what is possible:http://mrl.nyu.edu/projects/image-analogies/flightsim.htmlThis can be taken even further.The process is that if you take A' as an image of all the landclass textures you'd like to use, and A as a "map" decribing those textures, supply B ( which is a new map ) then you can derive B', which is a pseudo-photoreal image of B ( now based on some of the default textures ).====================It's an area I'll try to explore over the next few weeks. I believe it will work quite well.Oddly, as I followed links and Googled around on this subject, I found some of the key players in this work are employees of the US government, and some are employees of of Microsoft.If I can find a good work method, we should be able to easily derive pseudo-photoreal just like Oshgosh and Niagara. and be assured they'll blend into the surrounding landclass tiles.I've played with the software a bit, and it is very CPU/Memory intensive, but the results are pretty good for altering digital images.Dick

Share this post


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

Dick, perhaps I don't understand your goal very well, because I find blending to the default quite easy... tmfviewer tells you what defaut textures you wish to blend to. mosaic a layer the size of your photoreal image for each texture involved. In my work its rarely more than 3. then feather a mask tool, and expose your under layers by cutting on the image. Then resample. Works fine!Bob Bernsteinhttp://forums.avsim.net/user_files/74266.jpg

Share this post


Link to post
Share on other sites

Hi Bob.There is quite a difference between blending the borders into the defaults, and what we see in the Oshgosh or Niagara sceneries. They actually use colors and textures found in the landclass tiles. They are not photos, but image constructs, much like the examples in the above links.Many of our freeware and payware photoreal sceneries pay no atention to the texture, scale or coloring of the default textures. Some, as your sceneries, pay good attention to the border blending, and may attempt to match the color palette. But, the MS versions actually match the color and texture patterns of the defaults. I wondered how they did that ( for all seasons as well ). Now I know.It takes a lot of time and skill to alter the color of aerial images to obtain a photreal image that will appear seamlessly in the sim. In fact, there have been several recent posts concerning this.If the technique of image analogy works as I think it can, we can "teach" the analogy software to produce images that closely mimic the default landclass textures, from either altered greyscale aerial photos, or even images made from GIS data ( like the flight sim example in the link ). Then, the process can be reduced to a batch file, that will produce the images automatically... for all seasons if we like. Once the teaching images ( A and A' ) are made, and the right process defined, then all we need is to find suitable B images, and the B' will be made automatically.The flightsim image from the example by Jari Kaskelin probably only took a half hour or so to produce using this method. A seasonal texture set of images could be made in a couple of hours of automatic processing time... and they should blend perfectly in the sim... not just at the edges, but the entire image.( Jari is the creator of FS Terrain Calc { http://files.fsnordic.net/Flight_Simulator...laneous/Others/ } The "teaching" A and A' are these:http://forums.avsim.net/user_files/74298.jpghttp://forums.avsim.net/user_files/74297.jpgThis is used to cause the B photo ( the image source ) to become B' ( the output ) below:http://forums.avsim.net/user_files/74295.jpghttp://forums.avsim.net/user_files/74296.jpgA is to A' as B is to B' ( output ). The output, is synthesized by the same rules that govern the relationship between A and A' ( the teachers ). B would not be photoreal, but pseudo-photorealDick

Share this post


Link to post
Share on other sites

Hi Bob, DickI am interested in blending photoreal textures at the edges, particularly for large areas produced with terrabuilder (i.e. say 20x30 km. I have tried manually fading in the edges of the photoreal texture by clone brushing from screenshots out of the sim, but it is a long slow process, and the results are not that great.Can you tell me the best way currently known to do this?Thanks

Share this post


Link to post
Share on other sites

Hello Dick,I read with great interest your idea on generating synthetic photoreal scenery. It is a great idea for:1) use at borders to get a better match between a real color photo and default landclass.2) to generate the photo tiles when you only have a map or a B&W photo. I also see it as technique to be used at design time and not at run time (it should be very computer intensive). Please post any findings on your exploration.to ScottR - for simple blending at the edges you can use the technique explained by Bob. SBuilder uses it to generate the photo tiles from the seasonal bitamps and and an alpha bitmap.Regards, Luis

Share this post


Link to post
Share on other sites

Luis and/or Bob,Could you please explain your blending technique in a little more detail. I'm not sure how you get the FS texture that you then presumably line up with your 4.7p/m photo bitmap in PSP or Photoshop. Thanks

Share this post


Link to post
Share on other sites

Go to fs9/scenery/world/texture file. You'll see gobs of textures. Look at them in martin wrights tviewer.exe.. or in windows xp thumbnail view.you'll see 5 or 6 variants for most textures with the first numbers the id..the numbering format is contained in the microsoft sdks for terrain.In that sdk you'll also find tmfviewer.exe. Use that to locate the area you are working in. The numbers correspond to landclass id. In the same sdk there is a chart that shows which texture numbers correspond to the landclass id. Now you know the texture that you'll want to blend into.I make a texture mosaic of all variants of a given texture. Then I'll make a "pattern" in photoshop called bitmap fill in corel. Fill a new layer with that pattern and place the layer with your photoimage above that layer. Place a feather of a couple pixels on your mask tool and remove portions of your photo exposing the default texture from below. Make sense?Bob B

Share this post


Link to post
Share on other sites

Bob,Thanks for that, I'll give it a go.Regards

Share this post


Link to post
Share on other sites

Bob, I couldn't see how to get the texture tiles to exactly match the default but I have spent a bit of time fiddling around trying to merge large Terrabuilder produced photoreal scenery with default scenery. The firstscreenshot shows the sharply defined line that you normally get between the photoreal and default. The following screen shots show my "merged" attempt on one edge of a photoreal bitmap that is about 10km long.The technique I used is as follows. Process the original bitmap you wish to merge in Terrabuilder and install in Flight Sim. Slew to the scene and in top down mode take screen shots along the join line. The shots should be taken at about 18,500ft to equate to approximately 4.8m/pixel (and in summer or which ever season you are processing). In PSP (or Photoshop) cut and paste the screenshots to produce a strip about 300p either side of the merge line. I.e. you will have a strip showing the photoreal bitmap on one side and the default on the other. Uninstall the photoreal scenery, and repeat the process along the same line (you will need to note the lat/long to get to the correct spot.Back in PSP, using reference points from the original photoreal bmp, resize and rotate each strip to exactly match the bmp. If the original bmp edge is very close to the LOD13 join line, increase the canvas size by about 50p on that edge. Now copy and paste the first strip as a new layer on the original bmp and line up the strip so that it matches the background.Then, on the second (default scenery) strip, take a selection with a suitable feather (I used 150p) and lay it as a new selection onto the background (the original bmp) and line it up using the previous layer as a reference. Delete the previous layer and hopefully you now have a bitmap exactly matching the default terrain on the LOD 13 join line, and feathering into the photoreal scenery. If any of the feathered area doesn't look quite right, you can clone brush or copy and paste to correct. Finally, reduce the canvas size back to original.Now you can reprocess with Terrabuilder, and reinstall in Flight Simulator. This is quite a bit of work but gives a good result. Can anyone see any shortcuts, or perhaps an easier (or better) way to do it?Regards

Share this post


Link to post
Share on other sites

Scott, I'd say your results are impressive. I used screen shots myself at one time. The only thing I'd say against them is that the image quality never seems to match the default perfectly. Again, I think the method I suggest before is faster, and produces more perfect results, but I admire your willingness to be creative. I think that's a trait that produces the most inventive work...jump in and do stuff, find what works, try to improve what doesn't...Best,Bob Bernstein

Share this post


Link to post
Share on other sites

Bob, if I understand correctly you use copies of the default MSFT patterns and use layering to paste them into your custom textures. Do you work directly with the custom and default textures at a 4.8m/pixel level or do you expand both to permit accurate cuts then return to 4.8m/pixels?

Share this post


Link to post
Share on other sites

Hi John, you understand my method correctly...I normally mosaic most of the varients of the default texture and then do a pattern fill of that mosaic on a layer below my photo. In that fashion the resolution of the default texture is unchanged from the original consumed by the sim. I cut away my photo using a feathered mask tool. The photo is at 4.75 m/pixel prior to the cutting process.B

Share this post


Link to post
Share on other sites

It appears that fs2004 does some of it's own "feathering". However, so far, it seems to help, not hurt, the process.Phil

Share this post


Link to post
Share on other sites

If you are talking about the blurring of the textures as you fly VFR, be grateful.....I used to lock up my system and it would freeze with no blurring at all and the view of colored squares outside was pretty awful.

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