Jump to content
Sign in to follow this  
=Hollywood=

BIL to Photoshop and back to BIL???

Recommended Posts

Okay here's the deal...I have some SRTM data I'm wanting to bring in to Photoshop so that I can edit elevations visually, save it back out as a file and then re-import that data into Globalmapper to re-render out a prepared geotiff for running through resample.exe.Now I can get the file into photoshop okay (save as BIL, rename to .raw and open in Photoshop) tweak it in Photoshop and then I save out the file as a RAW file and rename to .bil... Globalmapper is not liking the reworked bil and I'm obviously missing a step somewhere...Now if the process is similar to Geotiff I'm suspecting I'll need to extract header information for the RAW file before use in photoshop and plug it back in once the editing is done?Does anyone know if this is possible or if there's another format that can be used to visually go from Globalmapper to Photoshop and back to Globalmapper?If I can get this process to work then I'll be a very happy camper...Note the end result is I need to edit elevation data visually in Photoshop (can't use other programs for a very specific reason), and save it back out and be able to bring it back in to Globalmapper with elevation data being read from the file...


Dean Mountford
Ultimate VFR

Share this post


Link to post
Share on other sites

Hi Dean,I don't think this will work because Photoshop doesn't accept 16-bit signed elevation files, as far as I know (I'm still working with Version 5 so things may have changed). If I try to import a GM .bil/raw file into Photoshop the elevations are incorrect because they get compressed to 8-bit values.Or does your file look OK in Photoshop, i.e., you get a full 16-bit histogram with the correct elevation values? If yes then you should be able to export it as a tif and load that into GM.Cheers, Holger

Share this post


Link to post
Share on other sites

Hey Holger, :-)Firstly I need to thank you for all the help you gave way back when I was doing photoscenery development tests... Your help and advice proved invaluable, and back then I was only a hack at the whole terrain/photoscenery... I wouldn't be working on the stuff I am now if it hadn't been for your input and advice that you gave so freely... You're an excellent teacher and I know a lot of us in the community both appreciate and respect you for your character and willingness to help others...Yeah I found the same thing with photoshop, doesn't like 16bit RAW (grr)... I seemed to remember back in the days of GTOPO30 that we used to be able to use greyscale images and edit the data, but that was sooooo long ago and a different DEM system...Anyway onto another subject temporarily (almost related)...I was working last night on trying to figure out the best way to fill a void in one region, and while using a combination of blackart, globalmapper inerpolated files at 10m resolution along with 90m resolution, as well as srtm30 data layering them and playing with trasparency on the layers, I still didn't quite get what I was looking for...My next step is to have a look at slarti because from what Jim has shown me before it looks like it does a very good job... He also has it working in the way I would have gone about doing it, i.e. adding in elevation points across the void and then interpolating from there...I've manually interpolated some of the voids to look better than globalmapper alone can do, but I'm reaching a point where I'm filling the void one pixel in at a time, and I'm almost at the point where the technique I'm using isn't going to work for many more samplings...Someone on this earth needs to invent an elevation model/formula that is based on RGB or CMYK values, or at least that can produce a 16, 24 or 32 bit RGB raster image that can then be manipulated in graphics software... Exported and then recompiled to a normal dem file...The system could work like:R,G,B0,0,0 = -32xx7128,128,128 = 0255,255,255 = 32xx7(I forget the exact values for the numbers)... But basically there's a lookup table for the values and the program then processes the Raster RGB image pixels and can interpolate values in between... It's an idea still being formulated in my mind, so the exact specs of the system are ones that would need to be worked out...Basically I envision something like:0,0,00,0,10,0,2...253,255,255254,255,255255,255,255With 128,128,128 being at sea level... So any values below 128,128,128 are below sea level, and any value above 128,128,128 is above sea level...0,0,0 = index 0128,128,128 = index 2097152255,255,255 = index 16777216If then we use the values of what are the highest and lowest terrain altitudes on earth (i.e. lowest below sea level - allows for bathy data and the highest being the top of mount everest) and then determining the elevations between both extents (probably have to use bathy values as the ocean is deeper than the terrain is above the water surface), then we can assign the lowest bathy elevation to 0,0,0 and sea level to 128,128,128 etc etc etc)...Now as I think about it I see one flaw in that process and that would be it may be better to use CMYK... More on that later, I'm thinking too hard...I'll do some more research into the possibilities, I have one idea that might work... I just need to find the tools again to extract the geotiff header info again...What I am trying to figure out (just on a thought tangent), is what process did the ACES team go through with their SRTM mesh... I did a comparison of some mesh I was testing last night and the FSX default mesh... The FSX default has lost soooo much detail it almost seems like the mesh was merged with a lower quality DEM... i.e. 90m SRTM merged and interpolated with 250m DEM but then rendered at LOD9...Anyway that's enough to think about in one post... Will do some more tests tonight... If I can find a way to do what I want to do I'll be a very happy camper...


Dean Mountford
Ultimate VFR

Share this post


Link to post
Share on other sites

Hi Dean,I've been using Slarti as a SRTM interpolator with great results and it does seem to be as good as Blackart without the endless processing times.There is software out that that allows for mesh manipulation but I haven't come across anything that's free and good at the same time.I believe that ACES compiled the mesh with a fairly low compression quality setting, like 80% or so. That saved them a huge amount of disk space while at the same time masking any major interpolation errors across the SRTM void areas. They did a very good job with that, I must say. There's lots of (FS2004) mesh out there that looks much worse in the interpolated areas.Cheers, Holger

Share this post


Link to post
Share on other sites

Hey again Holger...I did originally start writing this reply saying I had had partial success with one of my tests, with the other half yet to come... But I didn't quite get as far as finishing off those thoughts...Upon reaching the end of the successful first part of the test I then has some more ideas on other tests to run, so I switched over to my GIS tools and ran some further tests...Well, at the end of it all, I am very very very happy and excited to say that my entire set of tests worked exactly as expected and more than that I'm very pleased with the results... I have only one more tweak to the setup to do but if that goes well I'll be satisfied...Thanks for your help though Holger, just having your responses spurred me to put on my thinking cap further and allowed me to find the answer I was looking for...This should be a cool little project that I'm sure everyone will like when she's done...


Dean Mountford
Ultimate VFR

Share this post


Link to post
Share on other sites
Guest vlada stoje

Hi Holger,I will try append here just an illustration to your estimated 80% :http://www.volny.cz/stoje/scen/fsx_srtm1.gifTo be exact and equitable I should mention that the addons sr_srtm and cr_srtm contain also little bit of hi-pass filtering (we already discussed it some time back). I agree with you that ACES did very good work when compressed global SRTM into the fraction of one DVD, with very acceptable results!Cheers,

Share this post


Link to post
Share on other sites

Hmmm, I ran some more tests last night and I think I found a major bug with the Australian FSX default mesh... It's about 200-300m off :(No matter, easily fixed, but I'm wondering now if the vector data might have the same problem, I'll have to double check it tonight...I'll post a screenie tonight to show just how far off the default mesh is...


Dean Mountford
Ultimate VFR

Share this post


Link to post
Share on other sites

Could you advise what process you ended up using? I'm doing a small mesh most of it is SRTM1 but it has a hole which I put in SRTM3 but the SRTM3 could use some smoothing and better matching at the border with the SRTM1 stuff. Maybe output a composite BIL and put that into Slarti?scott s..

Share this post


Link to post
Share on other sites

I'm still trying to figure out the process I'm using, so I don't really have a lot of details yet, probably your best bet is to use Slarti by Jim Keir tho...


Dean Mountford
Ultimate VFR

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