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

Set SPZ Niantic Sample as reference #16196

Merged
merged 3 commits into from
Feb 19, 2025
Merged

Conversation

CedricGuillemet
Copy link
Contributor

@CedricGuillemet CedricGuillemet commented Feb 19, 2025

Coordinate system used for SPZ makes Niantic samples upside down.
This PR makes SDK samples to display correctly as it uses the same coordinate system.

An option is to change your conversion code (PLY->SPZ) to flip Y,Z components of positions and orientation.
Or, use the new plugin option to do the work at runtime.

Here is an example to do the flipping when your SPZ do not use same coord system as Niantic and your scenes appear upside down:

BABYLON.LoadAssetContainerAsync("https://raw.githubusercontent.com/CedricGuillemet/dump/master/racoonfamily.spz", scene, {
    pluginOptions:{
        splat:{
           flipY: true
        }
    }
});

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 19, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 19, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 19, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 19, 2025

@CedricGuillemet
Copy link
Contributor Author

@ryantrem is there a way to set the loadingOptions when loading a mesh instead of using OnPluginActivatedObservable. Basically, is it possible to set flipY per import?

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 19, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 19, 2025

@sebavan sebavan merged commit 9df6cf3 into BabylonJS:master Feb 19, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants