Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

How to get the record frame count in path tracing with Unity recorder?

Discussion in 'HDRP Ray Tracing' started by wenzy, Jul 31, 2021.

  1. wenzy

    wenzy

    Joined:
    Nov 17, 2015
    Posts:
    44
    I add a code in one of my script's Update function for testing

    Debug.Log("Time:" + Time.time + " Time.frameCount:" + Time.frameCount);


    But when I want to recorder an image sequence. I fount the Time.frameCount is not follow the actual record frame count. This code will keep executing (not execute one time in one frame , and even if I put that in FixedUpdate).

    So if some effect/value which is calculated frame by frame. The output will not the same as in realtime mode.

    Is it possible to get the actual record frame count ?
     
  2. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Right now the path tracer and the recorder don't really work together well.
    However, I'm not really sure what you are trying to do but I suggest this documentation page on accumulation that features a script that allows you to accumulate all the samples to record a path traced images sequence.
    Hopefully that will help you to what you need !