Skip to content

Commit

Permalink
Fix additional bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryLingjieMei authored and pvl-bot committed Nov 11, 2024
1 parent 1005f5f commit c8223da
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion infinigen/assets/objects/creatures/crustacean.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def shader_crustacean(nw: NodeWrangler, params):
)
light_color = hsv2rgba(base_hue, uniform(0.0, 0.4), log_uniform(0.2, 1.0))
specular = uniform(0.6, 0.8)
specular_tint = uniform(0, 1)
specular_tint = [uniform(0, 1)] * 3
clearcoat = uniform(0.2, 0.8)
roughness = uniform(0.1, 0.3)
metallic = uniform(0.6, 0.8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ def nodegroup_raycast_rotation(nw: NodeWrangler):
)

group_output = nw.new_node(
Nodes.GroupOutput, input_kwargs={"Output": if_tangent_rot.outputs[3]}
Nodes.GroupOutput, input_kwargs={"Output": if_tangent_rot}
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,6 @@ def tag(self, obj, visible=True):
obj, f"{PREFIX}{t.Subpart.SupportSurface.value}", floor, "BOOLEAN", "FACE"
)
write_attr_data(obj, f"{PREFIX}{t.Subpart.Wall.value}", wall, "BOOLEAN", "FACE")
write_attr_data(obj, "segment_id", np.arange(len(center)), "BOOLEAN", "FACE")
full = np.ones_like(ceiling)
if visible:
write_attr_data(
Expand Down
6 changes: 5 additions & 1 deletion infinigen/core/placement/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,11 @@ def keep_cam_pose_proposal(
return None

coverage = len(dists) / n_pix
if coverage < terrain_coverage_range[0] or coverage > terrain_coverage_range[1]:
if (
coverage < terrain_coverage_range[0]
or coverage > terrain_coverage_range[1]
or coverage == 0
):
logger.debug(
f"keep_cam_pose_proposal rejects {coverage=} for {terrain_coverage_range=}"
)
Expand Down
3 changes: 2 additions & 1 deletion infinigen/core/placement/particles.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def bake(emitter, system):
}
with Suppress():
bpy.context.scene.frame_end += 1
bpy.ops.ptcache.bake(override, bake=True)
with bpy.context.temp_override(override):
bpy.ops.ptcache.bake(bake=True)
bpy.context.scene.frame_end -= 1

emitter.hide_viewport = hide_orig
Expand Down
2 changes: 1 addition & 1 deletion infinigen/infinigen_gpl
5 changes: 4 additions & 1 deletion infinigen/tools/process_static_meshes.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
) as f:
json.dump(current_json, f)
for npz_path in os.listdir(static_mesh_folder):
if npz_path.endswith(".npz"):
if (
npz_path.endswith(".npz")
and not (static_mesh_folder / npz_path).exists()
):
os.symlink(
static_mesh_folder / npz_path,
args.target_frames_dir
Expand Down

0 comments on commit c8223da

Please sign in to comment.