Forum

Author Topic: Model export  (Read 17498 times)

WzDrg

  • Newbie
  • *
  • Posts: 7
    • View Profile
Model export
« on: May 20, 2011, 02:09:08 PM »
First of all: great soft! Works like a charm.

After creating some models, I exported them using the Collada format and imported each model in Blender.
But when I try to use a camera view with the matching background image, I don't get an exact match.
How can I adjust the camera to create an exact match?

janosch1234

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Model export
« Reply #1 on: May 22, 2011, 02:07:11 AM »
Hi,

i dont know exactly how this works in Blender, but if you use camera projection mapping (you said something about backgound images what is not the same in my 3d package) then you have to use undistorted images.

So go: menu/tools /undistort photos/ and try using these images.

Regards
Jan

WzDrg

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Model export
« Reply #2 on: May 22, 2011, 08:31:51 PM »
Thanks for the reply.
Using the camera view with background is quite straight forward in Blender. But even when using the undistorted image, it somehow does not match exactly the 3D scene.

janosch1234

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: Model export
« Reply #3 on: May 23, 2011, 11:55:07 AM »
Hm,

is the center of the cam pointing to the correct point?
If yes the try changing the focal values (maybe they have not been ex/imported)

Regards
Jan

Dmitry Semyonov

  • Agisoft Technical Support
  • Full Member
  • *****
  • Posts: 200
    • View Profile
Re: Model export
« Reply #4 on: May 24, 2011, 12:52:14 AM »
Hello WzDrg,

As Jan has suggested, undistorted images should be used to get the perfect match. Please make sure that both "Center principal point" and "Square pixels" options are checked in the "Undistort Photos" dialog.

In most cases that should provide matching with a subpixel accuracy. No camera adjustment should be required. If you still observe large mismatch, please send the steps you are performing to import 3D model and undistorted photos into Blender so we could reproduce the problem. You can send them to support@agisoft.ru.

With best regards,
Dmitry Semyonov
AgiSoft LLC
With best regards,
Dmitry Semyonov
Agisoft

bisenberger

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Digital Mapping & Graphics
Re: Model export
« Reply #5 on: May 27, 2013, 07:38:01 PM »
Hi Dmitry,
I know this is an older post, but I'm also having issues with cameras lining up in Blender (2.67a). The model is also being scaled on import. I'm using Collada (.dae) for importing.
Bill
« Last Edit: May 28, 2013, 07:15:23 PM by bisenberger »
Digital Mapping & Graphics LLC
https://digital-mapping.net/

bisenberger

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Digital Mapping & Graphics
Re: Model export
« Reply #6 on: May 28, 2013, 07:14:02 PM »
The first image shows the Photoscan camera information in Blender imported via Collada. The second image shows the Photoscan camera information imported into modo via FBX. The third image shows the Photoscan adjusted camera calibration report. The camera values indicated in the modo via FBX image (focal lenth 34.501, film width 33.866) appear to be correct. How can I derive these values from the Photoscan calibration report?

Blender import via Collada:


modo import via FBX:


Photoscan adjusted camera calibration report:
« Last Edit: May 28, 2013, 07:16:43 PM by bisenberger »
Digital Mapping & Graphics LLC
https://digital-mapping.net/

jedfrechette

  • Full Member
  • ***
  • Posts: 130
  • Lidar Guys
    • View Profile
    • www.lidarguys.com
Re: Model export
« Reply #7 on: May 28, 2013, 07:37:19 PM »
If you have the pro version you can use this Python script to export an xml file with the camera parameters and a set of undistorted images. The script has some limitations related to PhotoScan's API, in particular it assumes a full frame camera so the calculated focal length will be "full-frame equivalent".

http://sourceforge.net/p/tlspy/code/ci/tip/tree/photoscan/io_export_camx.py

There is a matching addon for Blender that will use the xml file to setup cameras, and optionally texture maps, for the currently selected mesh object.

http://sourceforge.net/p/tlspy/code/ci/tip/tree/blender/scripts/io_import_camx.py

Sorry there isn't much documentation, but I'm happy to answer questions.
Jed

bisenberger

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Digital Mapping & Graphics
Re: Model export
« Reply #8 on: May 28, 2013, 07:55:52 PM »
Thanks  jedfrechette, I'll check them out.
« Last Edit: May 28, 2013, 09:46:12 PM by bisenberger »
Digital Mapping & Graphics LLC
https://digital-mapping.net/

bisenberger

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Digital Mapping & Graphics
Re: Model export
« Reply #9 on: May 28, 2013, 08:17:09 PM »
Hi jedfrechette, I download the scripts and gave them a run.

Photoscan export:
I selected the cameras I wanted to export and ran the script. There is an area for arguments, I left it blank and hit OK. The following dialog pops up:

For testing I selected the same directory for the .camx file, undistored photos and polyworks poses. Is it better if they are in different directories? What is polyworks poses?

Being able to select the desired photos for export is a really good idea.  :)

Blender import:
When I run the addon in Blender I get this error:


UPDATE:
I placed the exported files on the same drive as the Blender program files and they imported without errors.



« Last Edit: May 28, 2013, 10:01:52 PM by bisenberger »
Digital Mapping & Graphics LLC
https://digital-mapping.net/

bisenberger

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Digital Mapping & Graphics
Re: Model export
« Reply #10 on: May 28, 2013, 10:26:39 PM »
Super Cool!!!  8)
Thank you so much jedfrechette.
Bill

Attachment shows screen grab after imported into Blender.
« Last Edit: May 28, 2013, 10:28:23 PM by bisenberger »
Digital Mapping & Graphics LLC
https://digital-mapping.net/

jedfrechette

  • Full Member
  • ***
  • Posts: 130
  • Lidar Guys
    • View Profile
    • www.lidarguys.com
Re: Model export
« Reply #11 on: May 28, 2013, 11:31:14 PM »
I'm glad you got it to work.

For testing I selected the same directory for the .camx file, undistored photos and polyworks poses. Is it better if they are in different directories?

Its just a matter of how you wan to organize things.

What is polyworks poses?

PolyWorks is another program I wanted to load the camera positions in to and it has its own format for storing camera poses. Unfortunately, PhotoScans API doesn't really have many UI options so I don't have a good way to make that output optional.

UPDATE:
I placed the exported files on the same drive as the Blender program files and they imported without errors.

I'm not sure why you're getting this error, although path handling can be little screwy on Windows. I've been running a similar setup with data on a separate drive without a problem. I'll have to check it out more but it sounds like you have a workaround for the moment.
Jed

bisenberger

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Digital Mapping & Graphics
Re: Model export
« Reply #12 on: May 28, 2013, 11:40:52 PM »
I'm running the archive version of Blender using a shortcut rather than the installed version of Blender. Might this be affecting the path issue?
Digital Mapping & Graphics LLC
https://digital-mapping.net/