Skip to content

Commit

Permalink
Fix ignored GT samples setting due to incorrectly scoped gin config
Browse files Browse the repository at this point in the history
  • Loading branch information
araistrick authored and pvl-bot committed Dec 23, 2024
1 parent 2319d66 commit 81c74b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion infinigen/core/rendering/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,12 @@ def render_image(
camera: bpy.types.Object,
frames_folder,
passes_to_save,
flat_shading=False,
render_resolution_override=None,
excludes=[],
use_dof=False,
dof_aperture_fstop=2.8,
flat_shading=False,
override_num_samples=None,
):
tic = time.time()

Expand All @@ -408,6 +409,9 @@ def render_image(

camrig_id, subcam_id = cam_util.get_id(camera)

if override_num_samples is not None: # usually used for GT
bpy.context.scene.cycles.samples = override_num_samples

if flat_shading:
with Timer("Set object indices"):
object_data = set_pass_indices()
Expand Down
3 changes: 1 addition & 2 deletions infinigen_examples/configs_nature/base.gin
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ render_image.dof_aperture_fstop = 3
compositor_postprocessing.distort = False
compositor_postprocessing.color_correct = False

flat/configure_render_cycles.min_samples = 1
flat/configure_render_cycles.num_samples = 16
flat/render_image.override_num_samples = 16
flat/render_image.flat_shading = True
full/render_image.passes_to_save = [
['diffuse_direct', 'DiffDir'],
Expand Down

0 comments on commit 81c74b4

Please sign in to comment.