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

Multiple references to the same light node disables lights. #89

Open
Clockwork-Muse opened this issue Jan 12, 2021 · 0 comments
Open

Multiple references to the same light node disables lights. #89

Clockwork-Muse opened this issue Jan 12, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Clockwork-Muse
Copy link

Clockwork-Muse commented Jan 12, 2021

In GLTF, it's possible to have "duplicate" nodes that are re-used, such as multiple objects re-using the same mesh data. This includes lights; it's possible for multiple nodes to reference the same light entry:

    "extensions" : {
        "KHR_lights_punctual" : {
            "lights" : [
                {
                    "color" : [
                        1,
                        1,
                        1
                    ],
                    "intensity" : 10,
                    "spot" : {
                        "innerConeAngle" : 0.3337942263919169,
                        "outerConeAngle" : 0.39269909262657166
                    },
                    "type" : "spot",
                    "name" : "Spot"
                }
            ]
        }
    },
    "nodes" : [
        {
            "extensions" : {
                "KHR_lights_punctual" : {
                    "light" : 0
                }
            },
            "name" : "Spot_Orientation",
            "rotation" : [
                -0.7071067690849304,
                0,
                0,
                0.7071067690849304
            ]
        },
// .... later
        {
            "extensions" : {
                "KHR_lights_punctual" : {
                    "light" : 0
                }
            },
            "name" : "Spot.001_Orientation",
            "rotation" : [
                -0.7071067690849304,
                0,
                0,
                0.7071067690849304
            ]
        },
    ]

This is done in blender similarly to how it handles duplicate mesh references:
image

Doing this, however, disables the lights entirely, for some reason. For a simple scene it generates:
test
instead of the expected:
test


simple repro. Note that I'm not entirely sure whether this belongs here, in simplepbr, or inside panda itself...

repro.zip

@Moguri Moguri added the bug Something isn't working label May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants