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

3D Models flipped along one axis (Y?) #169

Open
astrodavid10 opened this issue Sep 11, 2020 · 4 comments
Open

3D Models flipped along one axis (Y?) #169

astrodavid10 opened this issue Sep 11, 2020 · 4 comments

Comments

@astrodavid10
Copy link

3D models are flipped long what appears to be the Y axis in both the Windows and web clients. Compare the attached example of Cassini with what it should look like: https://nasa3d.arc.nasa.gov/detail/jpl-vtad-cassini
Cassini.zip

@Carifio24
Copy link
Member

@astrodavid10 Yeah, it looks like the handedness of the models is flipped between the linked image and WWT.

Just curious, how did you make this WWTL file? The Cassini link gives a Blender file in the zip file. Apparently Blender uses a right-handed coordinate system, while DirectX uses a left-handed system, so I'm wondering if this is the cause of the discrepancy here.

There is a FlipHandedness parameter in WWT's Object3d class which might be able to help with this problem. I'm not sure where to import the 3d object file into WWT, though.

@Carifio24
Copy link
Member

Carifio24 commented Feb 28, 2022

Ok, I think I've got a potential solution here, which looks like a combination of the coordinate system handedness issue and a WWT bug.

After loading the layer file you sent and tracking the frame, I see this:
image

which has the wrong handedness. If I right-click and select Properties > Right Handed, I see this:
image

so the handedness is correct, but the faces didn't seem to get the memo. I think the WWT issue is here. Up to line ordering, both parts of this if-else are doing the same exact thing. If I switch indexiesB and indexiesC in the FlipHandedness block (or do any other odd-parity permutation of the lists), I get

image

which seems like the correct model to me.

According to Wikipedia, .obj files use a right-handed coordinate system to specify vertices. Thus, I would imagine that pretty much any .obj file will need to have this right-handed option selected.

@astrodavid10
Copy link
Author

Hey, awesome! I appreciate it!

@pkgw
Copy link
Contributor

pkgw commented Mar 9, 2022

OK, I finally got around to finishing up the test build of this.

If you download this "drop-signed" Zip file and run the installer at drop-signed → Setup1 → Release → WWTSetup.msi, you should be able to test out the latest build that includes this fix.

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