Code Monkey home page Code Monkey logo

Comments (12)

jaxry avatar jaxry commented on May 18, 2024 4

That's a good question and I'm not sure. I can try to offer some possible solutions.

https://stackoverflow.com/a/26790802
If you follow the instructions here and get the code structured in the right order, does it work? If not, it may be because the renderer doesn't always draw to the screen each frame, and only draws to the screen when the next sample is completely rendered. In this case, does running your code inside the renderer.onSampleRendered callback work?

from ray-tracing-renderer.

RenderTool avatar RenderTool commented on May 18, 2024 3

Hello! @VinAr22 I can save it normally on my Google browser, and it's also black on Firefox.

from ray-tracing-renderer.

jaxry avatar jaxry commented on May 18, 2024 3

Good question. It's not possible at the moment, but I'm in the middle of separating the different of stages of rendering (useful for spatial denoising) that will also make transparency possible as well. So we'll probably have that in a few weeks!

from ray-tracing-renderer.

nicolab28 avatar nicolab28 commented on May 18, 2024 1

I have hard-coded this code:

if (typeof window.screenShot == "function") {
        if (window.doScreenShot){
          window.screenShot();
          window.doScreenShot=false;
        }
      }

At the end of the function drawTile()

if (isLastTile) {
...

HERE
}

from ray-tracing-renderer.

VinAr22 avatar VinAr22 commented on May 18, 2024

Hi! Thanks for the quick response. The method using requestAnimationFrame does not work. renderer.onSampleRendered did the trick

from ray-tracing-renderer.

VinAr22 avatar VinAr22 commented on May 18, 2024

So i have another question about this topic. Maybe it is possible to save only model view on transparent background? :)

from ray-tracing-renderer.

VinAr22 avatar VinAr22 commented on May 18, 2024

Hello! It'll be cool! Please let me know when it will be possible

from ray-tracing-renderer.

VinAr22 avatar VinAr22 commented on May 18, 2024

Hello @jaxry! After the update, saving the canvas data does not work with renderer.onSampleRendered. :(

from ray-tracing-renderer.

jaxry avatar jaxry commented on May 18, 2024

Thanks for letting me know. onSampleRendered now measures performance as well, and to get an accurate number, the callback is called one frame after the sample is rendered to the screen. Doing so makes the callback fall out of sync with the browser's draw frame.

Unfortunately I don't think we can move the callback back to where it was. Instead, would a separate callback, like renderer.getScreenshot(callback) get the job done?

from ray-tracing-renderer.

VinAr22 avatar VinAr22 commented on May 18, 2024

Hi @jaxry ! Thanks for the response. I understand correctly, this function already exists? Or is it just planned? it would be cool to be able to save a screenshot.

from ray-tracing-renderer.

VinAr22 avatar VinAr22 commented on May 18, 2024

Hi @nicolab28 ! Is it works with the last version of the ray tracing renderer?

from ray-tracing-renderer.

nicolab28 avatar nicolab28 commented on May 18, 2024

I don't think I'm using the very last one, but I don't see why it won't work?

from ray-tracing-renderer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.