Forum

Author Topic: obj corrupted on export  (Read 5221 times)

MetaUser555

  • Newbie
  • *
  • Posts: 29
    • View Profile
obj corrupted on export
« on: December 02, 2017, 01:24:02 AM »
Hi,
I'm getting an issue when exporting a model [see pic]
i'm running the beta 1.4.0.5432 but I don't think that's the issue in this case as other models have exported fine.
I have a vague recollection of someone having this problem before but I can't find it on the forums
I've tried rebuilding the mesh several times but to no avail, I've also tried on three separate machines [with different nvidia GPUs] with their own version of Agi Pro.
As you can see in the pic the 3d mesh is fine in agi but when i import it to ZBrush, 3DMax or Meshlab it comes in corrupted.
The only difference in this scan was i went from a low sparse cloud to medium dense cloud to 'high' face count poly model.
Thanks for any help

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: obj corrupted on export
« Reply #1 on: December 02, 2017, 01:50:01 AM »
Hello bolegna,

Which coordinate system you are selecting on export? Can you post a couple of lines from the OBJ file with the coordinates of the vertices?

It looks like some projected coordinate system (for example, UTM projection) has been used, where the values of X and Y are millions of meters, but the 3D modelling application doesn't support so big values, keeping the coordinates as float type, thus truncating the smaller bits.
If it is the case you can try to use Local Coordinates on export, or use Shift values in the export dialog to subtract large values from X and Y coordinates.
Best regards,
Alexey Pasumansky,
Agisoft LLC

MetaUser555

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: obj corrupted on export
« Reply #2 on: December 04, 2017, 05:53:47 PM »
mtllib rat1.mtl
usemtl rat1
v -46.128224 16.237158 -6356780.627627
v -46.251848 16.450610 -6356781.066125
v -45.451169 15.283114 -6356776.868670
v -46.079180 16.198689 -6356780.509661

Thanks Alexey,
It was exported with the local co-ord system but it is giving me a big number.
Can I fix this in Agi as not to go through subtracting numbers at export? I go through a lot of scans and doing this would not be ideal for my workflow.  I go in and out of Agi, modifying meshes and re-importing as well as sending this data to outsourcers [which would catch people out and cause delays].

Would you take a look at this script we've been using for literally years? It was made a long time ago, maybe it needs updating?
My process is to scale the object with two points and a scale bar to a size that works in my 3D software.
I then run this script to orient the model to the rotation I need by manipulating the bounding box
-maybe this is were the error is creeping in?

Thanks for your help

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: obj corrupted on export
« Reply #3 on: December 04, 2017, 06:01:36 PM »
Hello bolegna,

The latest version of the script is available here (not much different though):
https://github.com/agisoft-llc/photoscan-scripts/blob/master/src/coordinate_system_to_bounding_box.py

Is the chunk just scaled or if there are any checked on camera/marker instances in the Reference pane? What is the current coordinate system in the chunk?

Maybe you can send a sample project file to support@agisoft.com? Just with the alignment results and mesh fragment (dense cloud and depth maps can be removed). So we could try to reproduce the issue on our side and suggest some solution.

Best regards,
Alexey Pasumansky,
Agisoft LLC

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: obj corrupted on export
« Reply #4 on: December 04, 2017, 06:02:30 PM »
The strange thing that I see here in your output, is that elevation values are very big - somewhat close to the radius of the Earth.
Best regards,
Alexey Pasumansky,
Agisoft LLC

MetaUser555

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: obj corrupted on export
« Reply #5 on: December 04, 2017, 07:52:28 PM »
Excellent - it was a rouge marker that was throwing it off, i removed all markers and went through the process again and all is good. Wood for the trees!
Thanks for your help!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: obj corrupted on export
« Reply #6 on: December 04, 2017, 07:54:43 PM »
Ok, good to hear that it works fine now.
Best regards,
Alexey Pasumansky,
Agisoft LLC