Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera / model orientation upside down #256

Open
DevoStevo66 opened this issue Sep 23, 2018 · 14 comments
Open

Camera / model orientation upside down #256

DevoStevo66 opened this issue Sep 23, 2018 · 14 comments
Labels
do not close issue that should stay open (avoid automatically close because stale) feature request feature request from the community scope:doc

Comments

@DevoStevo66
Copy link

When my models load in Meshroom, they are always orientated upside down relative to the grid.
Just wondering if you can, and how you would re-calibrate the camera or change a setting somewhere to fix it's axis orientation?

I've looked at CameraInit and SFM node attributes in Meshroom but I really have no idea where to start.
Otherwise it would be good if you could re-orientate the mesh in Meshroom so if exported/imported to/from external programs you don't have to work on an upside down model (as apparently you can't change the model orientation if you want to re-texture in Meshroom etc.).

I've learnt how to use the MeshDecimate node to clean up meshes in Meshroom and re-texture using LSCM unwrap to produce one texture-atlas rather than 2 (which was happening often using Basic unwrap). So this is why I'd like to fix the orientation issue. If you can orientate the model so lines up with ortho views it makes for easier cleaning up of mesh for instance.

@ChemicalXandco
Copy link
Contributor

I don't think it is possible in meshroom but you can import the obj into meshlab then go to Filters > Normals, Curvatures and Orientation > Transform: Rotate and align it yourself from there.

@sunilk-n
Copy link

When my models load in Meshroom, they are always orientated upside down relative to the grid.
Just wondering if you can, and how you would re-calibrate the camera or change a setting somewhere to fix it's axis orientation?

I've looked at CameraInit and SFM node attributes in Meshroom but I really have no idea where to start.
Otherwise it would be good if you could re-orientate the mesh in Meshroom so if exported/imported to/from external programs you don't have to work on an upside down model (as apparently you can't change the model orientation if you want to re-texture in Meshroom etc.).

I've learnt how to use the MeshDecimate node to clean up meshes in Meshroom and re-texture using LSCM unwrap to produce one texture-atlas rather than 2 (which was happening often using Basic unwrap). So this is why I'd like to fix the orientation issue. If you can orientate the model so lines up with ortho views it makes for easier cleaning up of mesh for instance.

Is there an option to retexture on a mesh edited in meshroom... If so, Can anyone explain me the process of how to do it

@XenonofArcticus
Copy link

Setting orientation and real-world scale by clicking orthogonal known-length edges of an in-scene calibration target would be super useful. I've done this in Pix4D and it makes a big difference.

@natowi natowi added feature request feature request from the community do not close issue that should stay open (avoid automatically close because stale) and removed type:enhancement labels Oct 27, 2019
@stale stale bot added the stale for issues that becomes stale (no solution) label Feb 24, 2020
@natowi natowi removed the stale for issues that becomes stale (no solution) label Feb 24, 2020
@pjgoodall
Copy link

I'm having the same experience. Seems like a fault, rather than a feature request.

@natowi
Copy link
Member

natowi commented Sep 13, 2020

@pjgoodall That is expected in MR 2019.2. The issue has already been addressed. It will be included in the next release #978

@natowi
Copy link
Member

natowi commented Oct 16, 2020

This feature is now available with the 2020 release.

  1. add a SfmTransform node
  2. change the mode to manual & compute the node
  3. double click on the SfmTransform node to load the pointscloud it in the 3D viewer
  4. click on the 3D gizmo icon

(The SfmTransform node can be placed after the StructureFromMotion node (output) or the Meshing node (output).)

transform-1

@pjgoodall
Copy link

pjgoodall commented Oct 16, 2020

Is the EXIF Orientation tag honoured?

@natowi
Copy link
Member

natowi commented Oct 17, 2020

Is the EXIF Orientation tag honoured?

@pjgoodall You can use "FromSingleCamera" to orient the model. In my case the correct image orientation is being used.

@endolith
Copy link

endolith commented May 8, 2021

The SfmTransform node can be placed after the StructureFromMotion node (output) and the Meshing node (output).

Does it have to be placed after both?

@natowi
Copy link
Member

natowi commented May 8, 2021

Does it have to be placed after both?

No, I now replaced and with or in the original post. Thanks.

@avclubvids
Copy link

@natowi - I'm so glad I found this post, I was not aware of the "compute, then double click the node" method of activating the SFMTransform's gizmo, and I was losing my mind!

Is there a way to manipulate this gizmo in World space? My data solved at a ~45º angle, so rotating it to level and moving it to the origin was a huge hassle, with the gizmo being locked to local coords, as far as I could find.

@natowi
Copy link
Member

natowi commented Jun 5, 2023

I added the info to the wiki here https://github.com/alicevision/Meshroom/wiki/Model-orientation
@avclubvids If you have a camera with the correct orientation you can use FromSingleCamera as described.
If your images have GPS metadata, you may be able to use GPS alignment: alicevision/AliceVision#1069 using the "auto" setting: "auto: Using X axis of all cameras as horizon. gps north and scale if available. cameras center mean is used as origin."

Use cameras X axis to estimate the horizontal plane (and the horizon)
Use GPS measurements (if available) to align the Z axis with the north
Use GPS measurements (if available) to set the scale (otherwise scaled such that stddev=1)
Use cameras center mean as frame origin

#1954

@avclubvids
Copy link

@natowi - I followed the instructions and told MR to re-calculate everything downstream of the SFMTransform node... but it seems to have ignored it. Do I need to purge the cached results before re-running it? Screenshot showing the correct SFMTransform orientation and the old/incorrect mesh after it finished re-processing:

MicrosoftTeams-image

@natowi
Copy link
Member

natowi commented Jun 5, 2023

sorry, I forgot: there seems to be a bug in the current release #1994

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not close issue that should stay open (avoid automatically close because stale) feature request feature request from the community scope:doc
Projects
None yet
Development

No branches or pull requests

8 participants