andrewwright Posted February 25, 2013 Share Posted February 25, 2013 Hello, I am looking for some advice on the production of verifiable photomontages for use in landscape impact assessment. We use 3Ds max to produce photomontages of proposed plant developments for the energy industry. We model the development and then try to match it the best we can to a background image. This can be either a single photograph or a stitched panorama photograph. The field of view we have to cover is anything up to 180dgrees. These images are not for interactive QTVR/ Panotour type output. Our end product is for flat printing for the purposes of public exhibition and environmental impact assessment reports. These photomontages are required to be verifiable and to match the geometry and perspective of the camera used to take the stitched images. When matching to a wide-angle panoramic stitch we are finding it more difficult as we cannot find a way of getting 3d Max to have a projection output that matches the background image accurately. Does anyone know of any techniques, scripts or plug-ins that would allow 3D max to project/match a model correctly against a panoramic image? Or are there any other programmes that anyone knows can achieve this? We know it is technically, computing wise, possible as we use a programme called ‘Windfarm’ for wind turbine site assessments. This programme allows you to match model and DTM to up to 180 degree stitched panoramic images. It also takes into account earth curvature and atmospheric refraction. Unfortunately this programme cannot import other custom non wind turbine models. In some methodologies there is a mention of VRAY using the physical camera set to cylindrical projection. We have down loaded the demo and are finding that the ‘Warped Spherical (Old style)’ projection seems to create a nearly convincing effect. We are finding however that the overall width of the projection does not quite fit the position of existing objects in the panoramic image. This may be because the GPS data measurements are not accurate enough for the purpose. However we are trying to demo the ‘.lens’ file facility to see if that will help. Does anyone know if using VRAY is the correct answer to this image matching problem? If so can you offer any advice that should theoretically make VRAY match exactly the geometry and perspective of a wide angle stitched panoramic photo? Thanks in advance for any help. Link to comment Share on other sites More sharing options...
jameswelch Posted March 4, 2013 Share Posted March 4, 2013 I would be interested to hear of any solutions to this if you find any. I am in a very similar position to yourself and regularly use max for creating photomontages for EIAs and LVIAs and like yourself have struggled matching panoramic images. I think this is because you are effectively recreating a real world camera in Max when setting up the views and yet when using panoramic images stuck together, there is no real world camera that can match the view you are creating. I know this isn't an answer but I always request to stick to single frame images. I also know that sometimes you just need to have a wider view, on these occasions I have set up 3-4 digital cameras in Max matching the single frame views of the real camera before stitching and then stitching the max renders together as you would the site photographs - this does generate alot more work though! We also use Wind Farm for our Wind Farm analysis which does the above no problem, so there must be a way?! I would be very interested to hear if you find a solution James Link to comment Share on other sites More sharing options...
Stephen Thomas Posted March 5, 2013 Share Posted March 5, 2013 I had to do exactly this for a visual impact assessment a while back and worked out a method using Vray RT to set up the camera match. You are correct that using Warped Spherical (old-style) is the one to use, however in order to use the camera override you need to be using a standard max camera, not a vray physical one. You also need to work out the included angle of the stitched panorama based on the FOV of the camera. You can do this by using the following formula: (Pixel width of stitched panorama x FOV of lens used) / Pixel width of single image = Panoramic FOV. This value is what you input in the override FOV box. Also be aware that for very wide panoramas the outer edges will not match perfectly as you start to encounter other problems like the curvature of the earth that your max model does not allow for. If you have set things up correctly then by opening a Vray RT window you should be able to see and tweak your final result. I had good success using this method on that particular project. Here's a WIP screengrab I took during the alignment process. Link to comment Share on other sites More sharing options...
andrewwright Posted March 5, 2013 Author Share Posted March 5, 2013 Hi james. Looks like we may be getting near a good solution for this. See the post by Stephen Thomas in this thread. He is verifying that V'ray's Warped Spherical (old style) is the projection to use. Vray will allow up to a 360 render outputting to large formats for detail and with an alpha channel. Hoorah!! Just out of interest here’s my homemade method that sounds similar to yours. I have been using a similar process to yourself in that I set up an animated camera, with no easing, that replicates the real world process of photography we use as far as possible. That is 360degrees rotation made of 24 frames = 15degree camera turns. I then output the renders and stitch them together using Panorama Factory, which works well with no when there is no Exif material. I also output a black matte image against white of the model and stitch that together to use as a homemade alpha channel. Some times it is not a perfect fit alpha channel but with at weak it saves a lot of time cutting out the model. To give the stitcher something to get hold of, as it were, across all the frames I put in a couple of cylinders one below and one above the camera. These I set to render as a wireline grid with a fair few segments to each vertically and horizontally. I have experimented with different types of texture to get a clean stitch and have found so far the addition to these cylinders of a thin reasonably wide tube similar in radius to the wireline cylinders, somewhat like the brim of a straw boater hat, with a lot of segments and with noise applied to ripple it up and down, works well. The idea with these wireline cylinders and brim like objects is to adjust them in their height position and size to create a band at the top and bottom of your camera view port image that looks like a long gridded pattern with a wiggling ribbon running through it. Set the properties for these objects so that they don’t cast shadows on your model. I have found that using this method I can get clean repeatable stitches covering 360 degrees. These stitches are not a perfect match but they are pretty good and may need a little tweaking in Photoshop size wise using surveyed photo reference points to match against. I have compared this type of out put against windfarm output using turbines as markers for points in the model and the result was pretty near. Vray would obviously cut out a lot of this work, which is great and you get a perfect alpha channel. I have also been searching through people’s methodologies for visually verifiable montages and Vray is the only software I’ve seen mentioned so far that comes anywhere near solving this problem. Personally I am going to continue looking at the Vray route. Below is a link that may be of interest do with earth curvature and atmospheric refraction in MAX3d. http://www.aqyf82.dsl.pipex.com/research/newtechs/curvature.htm Link to comment Share on other sites More sharing options...
andrewwright Posted March 5, 2013 Author Share Posted March 5, 2013 Hi Stephen thanks for your message. Thanks for veryfying this I shall be trying out the other things you mention. It's good to feel at last I'am making headway with this problem. Here's a link you may find of interest it's to with earth curvature in MAX. Regards Andrew http://www.aqyf82.dsl.pipex.com/research/newtechs/curvature.htm Link to comment Share on other sites More sharing options...
joannascott Posted July 8, 2013 Share Posted July 8, 2013 Hi Stef! It's a small cgworld! I've been wrestling with this type of question for a couple of weeks now. I just used your methodology for the camera match however, in order to comply with SNH and Highland council guidance I need to factor in the earth's curvature and atmospheric refraction in my LVIA's. The script in the link Andrew Wright sent would be more what i'm looking for but I couldn't find anywhere to download it? Hope you are well! Joanna Link to comment Share on other sites More sharing options...
andrewwright Posted November 15, 2013 Author Share Posted November 15, 2013 Hi Joanna. We have upgraded our surveying technique to using a proper suryer with a leica total station. Data collection each view point has improved vastly. We have bought V-Ray. Using V-rays 'Warped Spherical (old Style)' projection in the V-iray camera settings and setting the overide FOV setting to 120deg etc - using our leica data input to 3d max exactly as it comes in we are getting pretty much a spot on match. For wind turbine work we use 'Resoft Windfarm' which has earth curvature and atmospheric refraction in the photomontage section and can output upto 180 deg. However as it can only go to 1m resolution for cordinate input you will most likely not get as accurate an alignment of marker points and VP coords as you can get in max. As we have found in experiments with both using the same set of high res data from our surveyor. These small amounts of inaccuracy in Windfarm are less shown up in markers points miles away as opposed to close. The amount of accuracy achievable is perfectly okay for purpose. We looked at Windpro it can input to 2 decimal places (a big advantage) but it does not have atmospheric refraction in its photomontage section. Plus it has major difficulties out putting clean wide angle panorama renders. It chops the image every 10 degrees and you get an effect of anything on that split point being chopped down the middle and two halfs falling away from each other. We have talked to the manufacturers and apparently there is no work round. If they could solve that and put atmospheric refraction in the montage section them I would go for Windpro from a graphics point of view. (It also has a camera amatching facility) For earth curvature and atmosperic refraction it seem that you would just have to calculate that by hand for say building etc and adjust model/render up or down by that amount. You would have difficulty doing this with a wireline terrain as far as I can see as you could not achieve a slowly increasing /decreasing curve. I have tried to locate scripts /plugins for this but no success yet. There was a Dr Chris Cox, I think his name was, he devised his own scripts for this but he seems to have vanished off the face of the earth. If only we could get autodesk to address this projection problem! But again they don't seem to show much interest. Does anyone know of any modelling packages that can do earth curvature and atmospheric refraction? Link to comment Share on other sites More sharing options...
joannascott Posted November 20, 2013 Share Posted November 20, 2013 Hi Andrew, Thank you for your reply. The Leica total station looks like a very accurate tool to use on site. I used to work with Stephen Thomas above and tested the vray camera options with the standard camera in the viewpoint and it works a treat (minus the atmospheric refraction and earth curvature element). We also use Resoft Windfarm and albeit painstakingly slow, crashy and having a mind of its own at times it does have the atmospheric refraction and earth curvature. As you say, if only there was a tick box option in 3dsmax... I seen Dr Chris Cox's script too so it is possible. I found the .txt code file he used to create his 'Earth Curver MAXScript' but I have no idea how to turn in into a plugin .ms/ .mse file? If you or any one else knows how to turn .txt code into a script or plugin please get in touch. Cheers, Joanna Link to comment Share on other sites More sharing options...
Stephen Thomas Posted November 21, 2013 Share Posted November 21, 2013 Hey Joanna. Is it maxscript? If so you should be able to paste the text into maxscript listener window, highlight all text then drag the selection to a toolbar. That will create a button to run the script. Link to comment Share on other sites More sharing options...
shaneberry Posted April 2, 2014 Share Posted April 2, 2014 Hi Andrew, Thank you for your reply. The Leica total station looks like a very accurate tool to use on site. I used to work with Stephen Thomas above and tested the vray camera options with the standard camera in the viewpoint and it works a treat (minus the atmospheric refraction and earth curvature element). We also use Resoft Windfarm and albeit painstakingly slow, crashy and having a mind of its own at times it does have the atmospheric refraction and earth curvature. As you say, if only there was a tick box option in 3dsmax... I seen Dr Chris Cox's script too so it is possible. I found the .txt code file he used to create his 'Earth Curver MAXScript' but I have no idea how to turn in into a plugin .ms/ .mse file? If you or any one else knows how to turn .txt code into a script or plugin please get in touch. Cheers, Joanna Hi, is this maxscript available? Are you able to share the .txt code? Link to comment Share on other sites More sharing options...
shaneberry Posted April 8, 2014 Share Posted April 8, 2014 Hi Joanna, do you have the text for this script. I'd like to develop it further for my studies, but can't seem to contact Chris Link to comment Share on other sites More sharing options...
Stephen Thomas Posted April 9, 2014 Share Posted April 9, 2014 Hi Shane. I did manage to create a maxscript from Chris's notes. There were a few syntax errors that needed sorting but I think the attached file is the fixed version. Hope it works for you.EarthCurver.zip Link to comment Share on other sites More sharing options...
shaneberry Posted April 9, 2014 Share Posted April 9, 2014 Thanks very much. I'm very new to maxscript, so will be a great learning aid. Thanks again Link to comment Share on other sites More sharing options...
andrewwright Posted August 4, 2014 Author Share Posted August 4, 2014 Hi Stephen, I have downloaded the earthcurver script but cannot get any response from it in Max2013. Are there any tips you can give in its use. I can't edit maxscripts myself. I normally use them by going run script. Any help would be much appreciated. Link to comment Share on other sites More sharing options...
Stephen Thomas Posted August 12, 2014 Share Posted August 12, 2014 Hi Stephen, I have downloaded the earthcurver script but cannot get any response from it in Max2013. Are there any tips you can give in its use. I can't edit maxscripts myself. I normally use them by going run script. Any help would be much appreciated. Hi Andrew. I don't know much about using the script itself, but I can helo you with getting it running. Go to utilities tab (hammer) on right command panel, choose maxscript then run earthcurver script from there. You should now be able to select it from the drop down menu below and options will then appear. Link to comment Share on other sites More sharing options...
Tim cousins Posted June 28, 2020 Share Posted June 28, 2020 We are doing the same. When I match the middle of the panorama the edges are slightly off. I’m trying to overlay our V ray model cylindrical render to my existing panorama. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now