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

Issue when taking a screenshot with multi-cameras #9201

Closed
gabrielheming opened this issue Oct 17, 2020 · 2 comments
Closed

Issue when taking a screenshot with multi-cameras #9201

gabrielheming opened this issue Oct 17, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@gabrielheming
Copy link
Contributor

The method BABYLON.ScreenshotTools.CreateScreenshotUsingRenderTarget is not respecting the selected render target when the scene has multiple cameras.

Playground demo.

Line 82-89 has the following method:

BABYLON.ScreenshotTools.CreateScreenshotUsingRenderTarget(
    engine,
    camera1,
    { width: engine.getRenderWidth(), height: engine.getRenderHeight() },
    (data) => {
        console.log(data);
    }
);

The camera1 variable has the view from the upper box (big box). However, the result, is a screenshot using the last camera from the list of active cameras (scene.activeCameras).

Expected output:

expected-output

Actual output:

actual-output

BabylonJS Forum thread discussion

gabrielheming added a commit to gabrielheming/Babylon.js that referenced this issue Oct 17, 2020
@deltakosh deltakosh added this to the 4.2 milestone Oct 19, 2020
@deltakosh deltakosh added the bug label Oct 19, 2020
deltakosh added a commit that referenced this issue Oct 20, 2020
Fixed screenshot when scene has multi-cameras. Issue #9201
@gabrielheming
Copy link
Contributor Author

gabrielheming commented Nov 25, 2020

Seems that a new commit undone this fix. I'm reopening this issue.
e55a95f

@gabrielheming gabrielheming reopened this Nov 25, 2020
@sebavan
Copy link
Member

sebavan commented Nov 25, 2020

Fix by the latest PRs :-) will be in the next nightly thanks for reporting it

@sebavan sebavan closed this as completed Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants