rotationGizmo the rotation results abnormally when the parent node scales the three axes unequally。



As shown in the figure, after the y-axis scaling of the parent node is modified, the scaling of the child node is rotated, and the scaling of the child node changes abnormally.Is this normal?

Can you drop us a PG where we can test the problem?

Thank you for your reply,Upload any glb model in the official website editor sandbox, select nodes->root to adjust its scaling, and then select the nodes under root to be regenerated by rotationGizmo rotation.
Babylon.js Sandbox - View glTF, glb, obj and babylon files (babylonjs.com)

I have noticed you marked the answer as resolved, even though it just asks you (legitimately) to provide a reproduction of your issue.
Was your issue resolved?

No, I made a mistake

  1. After the Y-axis scaling of mesh parent is reversed, the Y-axis operation of scaleGizmo is also reversed.

  2. After the parent node is scaled, unexpected deviation occurs in the rotation of the child node, resulting in abnormal scaling and rotation.

Pinging @Cedric

I can repro, let me take a look.

1 Like

If it can be fixed, please tell me the update time of the fixed version. thanks.

I’ll do my best do fix it tomorrow.

1 Like

It will take time to fix this issue. Non uniform scaling has a lot of implication in the code.

1 Like

Does babylon have a property similar to threejs userData that can read and write gltf custom data?

There is this forum thread : Object3D.userData Three.JS equivelent in BabylonJS

Excuse me, I have a question. The setting of renderingGroupId for mesh in the scene created by babylon viewer is invalid. Is this a bug or a requirement?

This is the code:
import { computed, nextTick, onMounted, reactive, ref } from ‘vue’;
import { Scene, Engine, FreeCamera, Vector3, HemisphericLight, MeshBuilder } from ‘@babylonjs/core’
import { DefaultViewer } from “@babylonjs/viewer”;
import * as BabylonViewer from “@babylonjs/viewer”;
import TriphasicTransformControls from “xuanjing/controls/triphasicTransformControls”
// let canvas = ref()
let container = ref()
var createScene = function () {

let configMapper = BabylonViewer.mapperManager.getMapper("dom");
const config = configMapper.map(container.value);
let viewer = new DefaultViewer(container.value, config)
console.log(viewer)

BabylonViewer.viewerManager.addViewer(viewer);
BabylonViewer.viewerManager
    .getViewerPromiseById("testcontainer")
    .then((viewer: BabylonViewer.AbstractViewer) => {
        setTimeout(() => {
            var scene = viewer.engine.scenes[0];

            // Our built-in 'sphere' shape.
            var sphere = MeshBuilder.CreateSphere("sphere", { diameter: 2, segments: 32 }, scene);

            // Move the sphere upward 1/2 its height
            sphere.position.y = 1;

            // Our built-in 'ground' shape.
            var ground = MeshBuilder.CreateGround("ground", { width: 6, height: 6 }, scene);
            ground.renderingGroupId = 2

            viewer.hideLoadingScreen();
            let triphasicTransformControls = new TriphasicTransformControls(scene)
        }, 3000)

    });

};
If it is your new engine and scene renderingGroupId rendering is correct.
version:5.24.0

Is there any setting that will cause the clearCoat of PBRMaterial to have no rendering effect? There is no effect after the material in my program opens clearCoat, but the test environment I opened separately is normal. I currently have no way to locate the problem in the code.

ping @Evgeni_Popov

I don’t know the viewer in depth but renderingGroupId=2 is a valid value: why do you say it’s not? Have you an example with this setting that would not render correctly?

As for the clear coat, if you enable it it should work (see the docs).

Have you enabled an environment map in your scene?

I guess it would be easier to see what’s going on with a repro or a live link. Also, you should probably create another thread as these problems are not related to rotation gizmo.

Thanks for your reply, I created a link to renderingGroupId and attached a sample code project with screenshots.

The problem of clearCoat failure, I did not reproduce in the test environment, only in our project, the light has this problem

HemisphericLight and environmentTexture. Metal rough can work normally.
This is our project:


this is sandbox:

This is the renderingGroupId problem link:
Viewer causes renderingGroupId to become invalid - Bugs - Babylon.js (babylonjs.com)