Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nodes] rewrite RenderAnimatedCamera #2030

Merged
merged 5 commits into from
Jun 2, 2023

Conversation

mugulmd
Copy link
Contributor

@mugulmd mugulmd commented May 29, 2023

Description

The goal of this PR is to rewrite the RenderAnimatedCamera node and the Blender-Python script it runs behind the scenes to make it work properly and support wireframe rendering.

This node now takes as input:

  • cameras: SfMData in JSON format containing the views, poses and intrinsics of the scene to render
  • model: scene model, can be either a mesh in OBJ format or a point cloud in Alembic format
  • pointCloudParams: rendering parameters if the input is a point cloud
  • meshParams: rendering parameters if the input is a mesh, the most important one being the shading method (wireframe or line art)
  • (optional) undistortedImages: undistorted images to use as background of the rendered views for reference.

The output of this node is one frame per view corresponding to the input geometry rendered in Blender using the input camera parameters.
This output can be directly visualized in Meshroom's 2D viewer by double-clicking the node.

Also the node has been renamed ScenePreview for clarity and now belongs to the Utils category.

Notes

Since the cameras input must be in JSON format, users may need to use a ConvertSfMFormat node

@mugulmd mugulmd added this to the Meshroom 2023.2.0 milestone May 29, 2023
@mugulmd mugulmd self-assigned this May 29, 2023
@mugulmd mugulmd force-pushed the mug/rewriteRenderAnimatedCamera branch from ecef0eb to 3eaea1f Compare May 30, 2023 07:32
@mugulmd mugulmd marked this pull request as ready for review May 30, 2023 09:46
Copy link
Contributor

@cbentejac cbentejac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with pretty much all the possible combinations and it works as expected!

A couple notes for a (potential) ulterior PR:

  • It'd probably be best to group the Display Background and Undistorted Images together. Undistorted Images is optional but Display Background, which enables it, is always by default, and the relationship between the two is not obvious. Grouping them would prevent having errors because Undistorted Images is willingly not set while Display Background is still on.
  • Using a logger object instead of print() would be nice, as it would allow us to have timestamps in the logs.

@cbentejac cbentejac merged commit d9b5c5e into develop Jun 2, 2023
@cbentejac cbentejac deleted the mug/rewriteRenderAnimatedCamera branch June 2, 2023 15:38
@fabiencastan fabiencastan added the feature new feature (proposed as PR or issue planned by dev) label Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blender feature new feature (proposed as PR or issue planned by dev)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants