question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: apply transform to model

See original GitHub issue

My use case for this is that poly models come with presentationParams data:

"presentationParams": {
        "orientingRotation": {
            "x": -0.7071067811865475,
            "w": 0.7071067811865476
        },
        "colorSpace": "LINEAR",
        "backgroundColor": "#4caf50"
    }

In most cases it’s just:

"orientingRotation": {
  "w": 1
},

and the model is correctly oriented. However for some models (like the one above with w="0.7...") the model will load with incorrect orientation and I’d like to be able to fix that.

This could also be used to transform models between coordinate system or fix incorrectly scaled models.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
donmccurdycommented, May 22, 2021

As a script this should work:

const scene = document.getRoot().listScenes().pop();
const rootNode = document.createNode('SceneRotation').setRotation([-0.707106, 0, 0, 0.707106]);
scene.listChildren().forEach((node) => rootNode.addChild(node));
scene.addChild(rootNode);

Does that seem workable? glTF does specify how a scene is supposed to be oriented, so I’d rather not add a built-in function to convert to other coordinate systems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Manage Product Feature Requests – 6 Best Practices
A feature request is an idea a customer sends your way to make you understand how he's using your product, and what he...
Read more >
[Feature Request] Input Transformations · Issue #1652 - GitHub
This simplifies model setup. We currently have this in BoTorch and essentially apply the transform in the forward methods.
Read more >
Transform features—ArcGIS Pro | Documentation
The Transform tool changes the geometric shape of selected features using displacements links to specify known locations and corresponding destination ...
Read more >
Feature Transformation in Machine Learning: Why, When and ...
When we transform a feature, the skewness of the feature could be reduced and the transformed feature that goes into the model are...
Read more >
Transform Models | BIM 360 - Autodesk Knowledge Network
To use the Transform feature in Design Collaboration, you need Edit or Manage permissions for the team folder the work-in-progress (WIP) models ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found