Skip to content

Commit

Permalink
Fix asset framing
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryLingjieMei authored and pvl-bot committed Oct 18, 2024
1 parent e149a7b commit 378c95c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions infinigen_examples/generate_individual_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,9 @@ def build_and_save_asset(payload: dict):
)

if args.cam_center > 0 and asset:
co = read_base_co(asset) + asset.location
center.location = (np.amin(co, 0) + np.amax(co, 0)) / 2
co = read_base_co(asset)
location = (np.amin(co, 0) + np.amax(co, 0)) / 2
center.location = (np.array(asset.matrix_world) @ np.array([*location, 1]))[:-1]
center.location[-1] += args.cam_zoff

if args.cam_dist <= 0 and asset:
Expand Down

0 comments on commit 378c95c

Please sign in to comment.