Skip to content

Commit

Permalink
Fix opengl not writing ground truth for second stereo image
Browse files Browse the repository at this point in the history
* GT bug fixes sep4 (princeton-vl/infinigen_internal/princeton-vl#81)

* Misc bug fixes.

* More bug fixes.

----------------

Co-authored-by: Alexander Raistrick <[email protected]>
  • Loading branch information
2 people authored and pvl-bot committed Oct 4, 2023
1 parent dd9569b commit e393b66
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions worldgen/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,10 @@ def execute_tasks(

with Timer(f'Writing output blendfile'):
logging.info(f'Writing output blendfile to {output_folder / output_blend_name}')
if optimize_terrain_diskusage and task == [Task.FineTerrain]: os.symlink(input_folder / output_blend_name, output_folder / output_blend_name)
else: bpy.ops.wm.save_mainfile(filepath=str(output_folder / output_blend_name))
if optimize_terrain_diskusage and task == [Task.FineTerrain]:
os.symlink(input_folder / output_blend_name, output_folder / output_blend_name)
else:
bpy.ops.wm.save_mainfile(filepath=str(output_folder / output_blend_name))

tag_system.save_tag(path=str(output_folder / "MaskTag.json"))

Expand All @@ -375,7 +377,12 @@ def execute_tasks(
col.hide_viewport = False

if Task.Render in task or Task.GroundTruth in task or Task.MeshSave in task:
terrain = Terrain(scene_seed, surface.registry, task=task, on_the_fly_asset_folder=output_folder/"assets")
terrain = Terrain(
scene_seed,
surface.registry,
task=task,
on_the_fly_asset_folder=output_folder/"assets"
)
if optimize_terrain_diskusage:
terrain.load_glb(output_folder)

Expand Down

0 comments on commit e393b66

Please sign in to comment.