@BaSiSa i have not used the data recorder much myself, so not sure if the following suggestions is relevant or helpful. @dennis.lynch had created two examples that might be useful for fixed frame and time interval with on_frame and on_time in SDG:
I have a new example too that works with physics. In this example I use an on_time trigger for physics and randomization, and an on_frame trigger to render an image every X-number of frames.
Snippet:
...
with rep.trigger.on_time(max_execs = 5, interval=2):
rep.randomizer.create_props()
manual_trigger = rep.trigger.on_frame(max_execs=5, interval=60)
writer.attach(render_products=[render_product], trigger=manual_trigger)
The simulation by default plays at 30fps, so with an in…
The example he mentioned above can be found on the repo in which he’s built two triggers.
The first triggers the dropping of the fruit. The second trigger is an on_frame trigger that controls the Writer, and will only trigger at the “end” of our physics simulation
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
This file has been truncated. show original
the other example in the repo related to intervals is on_time for randomization, which isn’t really tied to the frame output but might still worth checking out how it can be utilized:
# SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors
# may be used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
This file has been truncated. show original