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

Powertools for syncing Sun Study with CesiumGeoreference #404

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

r-veenstra
Copy link
Contributor

Two small additions to powertools here:

  1. A simple button in the Powertools menu to set Sun Study latitude/longitude based on the current CesiumGeoreference latitude/longitude. This also ensures the north angle is set to 90 degrees, which is required to ensure the sun is at the correct yaw compared to the globe.

  2. An addition to the Georeference Helper which will extract latitude/longitude from the Environment prim and set the CesiumGeoreference to match. This is useful as some of the Omniverse connectors such as Rhino + Sketchup store the latitude and longitude values from the export in environment prim.

Copy link
Contributor

@weegeekps weegeekps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're starting to get some really useful tools in power tools. Maybe we should start looking into a way to actually package power tools as an optional package?

Comment on lines +72 to +73
north_attr = get_or_create_attribute(environment_prim, "location:north_orientation", Sdf.ValueTypeNames.Float)
north_attr.Set(90.0) # Always set to 90, otherwise the sun is at the wrong angle
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking, is this fix needed for both y-up and z-up stages?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I checked both when implementing. NVIDIA also bakes the 90 degree rotation into all of their exports via their connectors from AEC software.

@lilleyse lilleyse enabled auto-merge August 1, 2023 13:02
@lilleyse lilleyse merged commit 8618c08 into main Aug 1, 2023
3 checks passed
@lilleyse lilleyse deleted the powertools_environment_georef_sync branch August 1, 2023 13:16
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

Successfully merging this pull request may close these issues.

3 participants