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

Coordinate System to support OBJ models #117

Open
ThomasOrtner opened this issue Oct 14, 2021 · 15 comments
Open

Coordinate System to support OBJ models #117

ThomasOrtner opened this issue Oct 14, 2021 · 15 comments
Assignees
Milestone

Comments

@ThomasOrtner
Copy link
Collaborator

There is a conversation thread with Christian Tate link. Objs downloadable from sketchfab on Christians account do have the wrong orientation.

Further, xyz axis do align with north east and up and should be used for dip and strike and other measurements.

yellow expected behavior
image

best what we can do currently in PRo3D ... yx horizontal plane is vertical
image

add new coordinate system to support roverframe northed data with y as Up and z as North

@haraldsteinlechner
Copy link
Collaborator

isn't this just basis change for objects (pretransform?)

@cdt59
Copy link

cdt59 commented Oct 15, 2021

Hi @haraldsteinlechner. A pre-transform would work if PRo3D could recognize or be told that it is importing an OBJ in this particular reference frame. Let me know if there is any information I can provide. Thanks!

@ThomasOrtner
Copy link
Collaborator Author

So I tried out a pretransformation which can be activated by a checkbox similar to 'flipZ' called 'sketchFab'. I had a look at some other exports and tried out Sol 195 and Sol 204

comparison 195 204

Should we build sth. more general, where you can pick the up vector and then apply the transformations?

@ThomasOrtner
Copy link
Collaborator Author

sol51

I did find another variant, Sol51. So I do think we need a UI and transformations that are capable of the following things:

  • specifying any signed axis as up vector
  • flipping of any axis
  • switching left and right handed

@ThomasOrtner ThomasOrtner changed the title Coordinate System to support SketchFab models Coordinate System to support OBJ models Oct 18, 2021
@haraldsteinlechner
Copy link
Collaborator

basically the arguments to FromCoordinateFrame - question is how well this needs to be prepared for users - could this be just a choice of presets?

@ThomasOrtner
Copy link
Collaborator Author

maybe we can agree on one or two presets, A full blown import dialog or UI would be quite costly to implement and difficult to use.

@ThomasOrtner
Copy link
Collaborator Author

sol204_finally

current implemention of sketchFab flag switches y and z axis und rotates then around z by -90.0 degrees

@cdt59
Copy link

cdt59 commented Oct 18, 2021

sol51

I did find another variant, Sol51. So I do think we need a UI and transformations that are capable of the following things:

  • specifying any signed axis as up vector
  • flipping of any axis
  • switching left and right handed

Hi @ThomasOrtner, note that the Sol51 model and many of the early models are in a different transformation. Only the last few models are in the X-Y-Z=East-North-Up orientation that I think makes the most sense going forward. Sorry for the confusion, but the scalebar is there to specify North, and the text on the scalebar is normal to the Up vector.

If a strategy works for the Sol 204 model, then that is sufficient.

@cdt59
Copy link

cdt59 commented Oct 18, 2021

In light of the above, I don't think we should call this special transformation "sketchfab" or "cdt". How about "ENU" to describe East-North-Up for X-Y-Z?

@cdt59
Copy link

cdt59 commented Oct 18, 2021

sol204_finally

current implemention of sketchFab flag switches y and z axis und rotates then around z by -90.0 degrees

Hi @ThomasOrtner and @haraldsteinlechner,

There is something odd happening with the left-handed XYZ bars that PRo3D displays. The X-axis crossed with the Y-axis should give Z-axis (per the right-hand rule), but these bars give X x Y = -Z. This really confuses me! I could believe it if the "flip Z" button turns Z into -Z and just forgets to actually turn around the blue vector.

Ok, so, the blue vector might or might not be accurate. What is important is the following:

  • X=East
  • Y=North
  • the model is not mirrored (what the "flip Z" button fixes)

If the above is satisfied, then the Z-axis can be up or down and it shouldn't matter.

Once we get this settled, then I can start measuring Strike&Dip and confirming that we get the values expected.

I appreciate your work on this, PRo3D will be an incredible tool once it works for these models. Thanks a lot!

@ThomasOrtner
Copy link
Collaborator Author

image

The coordinate system and the data finally appear correct. Please verify with this 4.3.0-prerelease1. To active the changes one must be in the XZY coordinate system and apply the sketchFab trafo to the surface by ticking the respective box as shown in the screenshot above.

@cdt59
Copy link

cdt59 commented Oct 28, 2021 via email

@cdt59
Copy link

cdt59 commented Oct 29, 2021

Nevermind, I read the manual about the bearing and slope.

@ThomasOrtner
Copy link
Collaborator Author

I hope you values make sense now, these values and namings are often discussed and not 100% clear. I am open to suggestions, Steve and Rob also have some comments on that I suppose.

@ThomasOrtner ThomasOrtner self-assigned this Oct 31, 2021
@ThomasOrtner ThomasOrtner added this to the 4.4.0 milestone Oct 31, 2021
ThomasOrtner added a commit that referenced this issue Oct 31, 2021
  - improved true thickness computation via point over plane height
- merged xzy coordinate system and renamed it to ENU (East North Up) [#117](#117)
- added missing calculation numbers of measurements to csv export (slope, bearing, vertical distance, horizontal distance) [#100](#100)
- added `showText`flag to annotations to show or hide text [#114](#114)
@haraldsteinlechner
Copy link
Collaborator

what is the status of this one @ThomasOrtner

haraldsteinlechner added a commit that referenced this issue Jan 4, 2023
…el.fs => MeshLoaderType), first implementation of #274, the sketchfab transformation is unclear to me - fixed it temporarily to make show the results of #274 (further discussion here #117), started integrating glTF loader, renamed SurfaceType.SurfaceOBJ to SurfaceType.Mesh which better fits its semantics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants