Video while transactions are playing

Hi,

I have a model with some transactions that represent different stages of the model. I would like to make a video with the camera moving (to show different angles of the model) while the transactions are playing (to also show how the model evolved).

Is there any way to do this? 

Thank you

Parents
  • Hi Pedro,

    There may be a way of doing this by defining the camera, paths with eye point and target point at the beginning of the script and then playing one transaction after the other, with script transactions interspersed that move the eye and target points along their paths and capture frames using an ImageCapture node in Auto mode. RenderMode can be set on the capture node.  Because the ImageCapture node captures on each update, there may be extraneous frames that you may need to remove.

    Alternatively, instead of using an ImageCapture node you may use the SaveViewToImageFile function which provides more control about naming the image (and overwriting previous captures). 

    In GC CONNECT Edition one of those script transactions would look like this:

    transaction 13 script 'Script transaction to capture frames 12 to 24 of 120 frames'
    {
                                                       // first frame is frame 0 at T = 0
        double Tstep = 1.0/119.0;      // 119 steps to create 120 frames (0 to 119)
        string imagepath = "..\\dgn\\captures\\image";
        for (int i = 12; i < 25; ++i)
        {
            eyePoint.T = Tstep * i;
            targetPoint.T = Tstep * i;
            UpdateGraph();
            SaveViewToImageFile(3, 400, imagepath + i);
        }
    }

    This will work if the respective nodes exist ("eyePoint", "targetPoint" as Points.ByParameterAlongCurve) and are the EyePoint and TargetPoint inputs to a Camera node, and if the file that contains this script is in a folder named "dgn" which also contains a folder "captures". In this case the argument "3" to SaveViewImageToFile means that you'd use View 3, and set it to the Display Style (e.g. Smooth > Modeling) that you would like to see in your video before capturing frames.

    Remember to switch off the visibility of the paths and eye and target points so they don't interfere with your video.

    HTH,

         Volker

       

Reply
  • Hi Pedro,

    There may be a way of doing this by defining the camera, paths with eye point and target point at the beginning of the script and then playing one transaction after the other, with script transactions interspersed that move the eye and target points along their paths and capture frames using an ImageCapture node in Auto mode. RenderMode can be set on the capture node.  Because the ImageCapture node captures on each update, there may be extraneous frames that you may need to remove.

    Alternatively, instead of using an ImageCapture node you may use the SaveViewToImageFile function which provides more control about naming the image (and overwriting previous captures). 

    In GC CONNECT Edition one of those script transactions would look like this:

    transaction 13 script 'Script transaction to capture frames 12 to 24 of 120 frames'
    {
                                                       // first frame is frame 0 at T = 0
        double Tstep = 1.0/119.0;      // 119 steps to create 120 frames (0 to 119)
        string imagepath = "..\\dgn\\captures\\image";
        for (int i = 12; i < 25; ++i)
        {
            eyePoint.T = Tstep * i;
            targetPoint.T = Tstep * i;
            UpdateGraph();
            SaveViewToImageFile(3, 400, imagepath + i);
        }
    }

    This will work if the respective nodes exist ("eyePoint", "targetPoint" as Points.ByParameterAlongCurve) and are the EyePoint and TargetPoint inputs to a Camera node, and if the file that contains this script is in a folder named "dgn" which also contains a folder "captures". In this case the argument "3" to SaveViewImageToFile means that you'd use View 3, and set it to the Display Style (e.g. Smooth > Modeling) that you would like to see in your video before capturing frames.

    Remember to switch off the visibility of the paths and eye and target points so they don't interfere with your video.

    HTH,

         Volker

       

Children
No Data