Aframe screenshot is not showing elements












0














I'm attempting to take an equirectangular screenshot of a scene that has a sphere in the background with 360 video and some text/elements in the scene.



I'm exporting the screenshot to use in a video, and I want the background transparent so it can get mixed with the video later, so I'm trying to change the background to green while I'm doing the screenshot and then putting it back to video.



const scene  = document.querySelector('a-scene')
const panoSphere = document.querySelector('.panoSphere')

panoSphere.setAttribute('material', 'color', '#00ff00')

const equidataData = scene.components.screenshot.getCanvas('equirectangular')


With this code, the background works and I get a green screenshot, however no other elements are shown.



If I remove the



panoSphere.removeAttribute('material-color-correction')
panoSphere.setAttribute('material', 'color', '#00ff00')


Then the hotspot entities are showing in the screenshot, however with the video background which is the part I'm trying to remove.



I've tried setting timeouts etc to see if it's a timing issue, with no luck.



I also tried adding a new sphere, or changing the sphere material in a component and no luck.



It just seems that if I've done an update to the sphere, whatever happens the screenshot component only shows that sphere



i.e. if I change the colour of the sphere
with color change



if I don't change the color, the text on the right shows but so does the video
no color change]










share|improve this question





























    0














    I'm attempting to take an equirectangular screenshot of a scene that has a sphere in the background with 360 video and some text/elements in the scene.



    I'm exporting the screenshot to use in a video, and I want the background transparent so it can get mixed with the video later, so I'm trying to change the background to green while I'm doing the screenshot and then putting it back to video.



    const scene  = document.querySelector('a-scene')
    const panoSphere = document.querySelector('.panoSphere')

    panoSphere.setAttribute('material', 'color', '#00ff00')

    const equidataData = scene.components.screenshot.getCanvas('equirectangular')


    With this code, the background works and I get a green screenshot, however no other elements are shown.



    If I remove the



    panoSphere.removeAttribute('material-color-correction')
    panoSphere.setAttribute('material', 'color', '#00ff00')


    Then the hotspot entities are showing in the screenshot, however with the video background which is the part I'm trying to remove.



    I've tried setting timeouts etc to see if it's a timing issue, with no luck.



    I also tried adding a new sphere, or changing the sphere material in a component and no luck.



    It just seems that if I've done an update to the sphere, whatever happens the screenshot component only shows that sphere



    i.e. if I change the colour of the sphere
    with color change



    if I don't change the color, the text on the right shows but so does the video
    no color change]










    share|improve this question



























      0












      0








      0







      I'm attempting to take an equirectangular screenshot of a scene that has a sphere in the background with 360 video and some text/elements in the scene.



      I'm exporting the screenshot to use in a video, and I want the background transparent so it can get mixed with the video later, so I'm trying to change the background to green while I'm doing the screenshot and then putting it back to video.



      const scene  = document.querySelector('a-scene')
      const panoSphere = document.querySelector('.panoSphere')

      panoSphere.setAttribute('material', 'color', '#00ff00')

      const equidataData = scene.components.screenshot.getCanvas('equirectangular')


      With this code, the background works and I get a green screenshot, however no other elements are shown.



      If I remove the



      panoSphere.removeAttribute('material-color-correction')
      panoSphere.setAttribute('material', 'color', '#00ff00')


      Then the hotspot entities are showing in the screenshot, however with the video background which is the part I'm trying to remove.



      I've tried setting timeouts etc to see if it's a timing issue, with no luck.



      I also tried adding a new sphere, or changing the sphere material in a component and no luck.



      It just seems that if I've done an update to the sphere, whatever happens the screenshot component only shows that sphere



      i.e. if I change the colour of the sphere
      with color change



      if I don't change the color, the text on the right shows but so does the video
      no color change]










      share|improve this question















      I'm attempting to take an equirectangular screenshot of a scene that has a sphere in the background with 360 video and some text/elements in the scene.



      I'm exporting the screenshot to use in a video, and I want the background transparent so it can get mixed with the video later, so I'm trying to change the background to green while I'm doing the screenshot and then putting it back to video.



      const scene  = document.querySelector('a-scene')
      const panoSphere = document.querySelector('.panoSphere')

      panoSphere.setAttribute('material', 'color', '#00ff00')

      const equidataData = scene.components.screenshot.getCanvas('equirectangular')


      With this code, the background works and I get a green screenshot, however no other elements are shown.



      If I remove the



      panoSphere.removeAttribute('material-color-correction')
      panoSphere.setAttribute('material', 'color', '#00ff00')


      Then the hotspot entities are showing in the screenshot, however with the video background which is the part I'm trying to remove.



      I've tried setting timeouts etc to see if it's a timing issue, with no luck.



      I also tried adding a new sphere, or changing the sphere material in a component and no luck.



      It just seems that if I've done an update to the sphere, whatever happens the screenshot component only shows that sphere



      i.e. if I change the colour of the sphere
      with color change



      if I don't change the color, the text on the right shows but so does the video
      no color change]







      three.js aframe






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 13 '18 at 2:38

























      asked Nov 13 '18 at 1:51









      beek

      910931




      910931
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I ended up removing the sphere and setting the background color of the scene to the green I want. This fixed it.






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272636%2faframe-screenshot-is-not-showing-elements%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I ended up removing the sphere and setting the background color of the scene to the green I want. This fixed it.






            share|improve this answer


























              0














              I ended up removing the sphere and setting the background color of the scene to the green I want. This fixed it.






              share|improve this answer
























                0












                0








                0






                I ended up removing the sphere and setting the background color of the scene to the green I want. This fixed it.






                share|improve this answer












                I ended up removing the sphere and setting the background color of the scene to the green I want. This fixed it.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 13 '18 at 2:53









                beek

                910931




                910931






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272636%2faframe-screenshot-is-not-showing-elements%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Bressuire

                    Vorschmack

                    Quarantine