Orientation of scans


#1

When i scan, the meshes that the ipad Apps create always open other tools with an upside down orientation.

Blender, Vizor.io, etc.

For a moment I thought I perhaps had put the sensor on the mount upside down… but you can’t as it only goes on one way (and read the plug)

Is there a way to fix this? It add a lot of manual effort to my workflow having to always reorient the output from this sensor.

interested in solution


#2

Yes same here. I try to figure out but didn’t find a way.
Each time, the object point cloud is upside down and every object I scanned has a different orientation…

How can we flipped the object and align in them in the same way ?

Thank you


#3

I’ve taken to using meshlab to reorient the mesh and re-frezze it as part
of my workflow. I also use it to center the geometry and generally to
adjust the height of the model in relation to the origin depending on the
scan.

Meshlab is very powerful, but UI/usability was done by renegate soviet
tractor designers.

if you can’t sort out how to do it, perhaps i can make a short video.

-Eric


#4

Hey @obrary , thank you for your reply !
So you need to do it manually for each scan so ?

I would love that you make a short video to explain quickly the process and how to do it. I’m still struggling with that and except do a translation to the origin, I’m not able to flip my cloud and rotate it correctly so that all my cloud are aligned in the same way…

I’ll try to see with Meshlab if I can do something…


#5

Here you go.

The commands I ran here:

  • Render -> Show Axis
  • Normals, Curvature and Orientation -> Transform: Rotate
    In this example i rotated about the z axis
  • Normals, Curvature and Orientation -> Transform: Move, Translate, Center

It took me a while to understand the paradigm in meshlab of having to
freeze the matrix after the operations so that when you save/export it will
save the changes… oops. make sure you have that options selected when do
the

Hope this helps,

Eric


Save file .obj reversed
#6

Oh thank you very much ! That’s awesome =D

I’ll try that today with my point cloud !


#7

If you want to change orientation with code, you can following code
(I get string in file .obj and change y to -y and z to -z )

func convertObj(filePath:String) -> String? {
let url = URL.init(fileURLWithPath: filePath)
let vertexNew = NSMutableString()

    do{
        let fullText = try String.init(contentsOf: url, encoding: String.Encoding.utf8)
        
        let readings = fullText.components(separatedBy: "\n") as [String]
        for index in 0 ..< readings.count {
            let string = readings[index]
            let arrayString = string.components(separatedBy: " ")
            if arrayString.count > 0 {
                let first = arrayString[0]
                if first == "v" || first == "vn" {
                    let x = arrayString[1]
                    let y = arrayString[2]
                    let z = arrayString[3]
                    if var _y = Double(y) {
                        _y = _y*(-1)
                        if var _z = Double(z) {
                            _z = _z*(-1)
                            vertexNew.appendFormat("%@ %@ %f %f\n", first, x, _y, _z)
                        }
                    }
                }else{
                    vertexNew.appendFormat("%@\n", string)
                }
            }
        }
        
        try vertexNew.write(toFile: filePath, atomically: true, encoding: String.Encoding.utf8.rawValue)
        
        return filePath
    } catch{
        print(error)
    }
    return nil
}

#8

Hi folks,

just saw this post and yes i find it frustrating that the DEFAULT mode is to receive .obj files that are oriented upside down. I have been scanning friends and family and wanted to share the .obj files with them so they can view the mesh in the Windows built-in mixed reality viewer for AR.

However, having the objects come in upside down means I can’t simply email them the file - i need to process it in blender or equivalent first.

Please, please, please Occiptal - can you change the default orientation on the iPad app to make life a little simpler ?

Kind Regards,

Martyn


#9

We have fixed this issue within our 0.8 SDK release, more of which can be found here: Announcing Structure SDK 0.8.1: Improved Trackers and Turntable Support