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

[Impeller Scene] Add offline mesh importer #37981

Merged
merged 5 commits into from
Dec 1, 2022

Conversation

bdero
Copy link
Member

@bdero bdero commented Nov 30, 2022

  • scene_importer lib and executable. Everything is in place aside from actually converting the GLTF data. Structured with the assumption that we may add importers for more formats in the future.
  • GN jazz to run the importer.
  • Simple flatbuffer with only a single mesh, no bone transforms/weights or animations right now -- it will be appropriate to extend this into a more comprehensive scene description down the road.
  • Example GLTF binary mesh fixture containing a 3D Flutter logo with bezeled edges. This is a simplified version of the PBR textured mesh I showed off a couple of times in the past. Exported with normals, tangents, colors, and a good quality UV unwrap. I'm not bothering to import vertex colors straight away, but it'll come in handy for testing stuff later on.

@bdero bdero self-assigned this Nov 30, 2022
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@skia-gold
Copy link

Gold has detected about 1 new digest(s) on patchset 4.
View them at https://flutter-engine-gold.skia.org/cl/github/37981

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #37981 at sha a203c1d

impeller/scene/importer/BUILD.gn Outdated Show resolved Hide resolved
impeller/scene/importer/BUILD.gn Outdated Show resolved Hide resolved
impeller/scene/importer/BUILD.gn Outdated Show resolved Hide resolved
impeller/tools/impeller.gni Outdated Show resolved Hide resolved
]
}

group("importer") {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: On naming, perhaps just scenec like impellerc. importer is rather generic.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yeah, scenec seems good. My mind kept getting stuck on geometryc which I didn't like very much.

texture_coords: Vec2;
}

table Mesh {
Copy link
Member

Choose a reason for hiding this comment

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

We'll probably have to sketch this out some more but this is a start!

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed, one triangle mesh to fake it till we make it. Materials, fuller scene description, bones, weights, and animation will all be necessary soon in my estimation. :)

Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>
@chinmaygarde
Copy link
Member

May I land this?

@bdero
Copy link
Member Author

bdero commented Dec 1, 2022

Yeah, I'm in the middle of renaming everything to be SceneC instead of "Scene Importer" at the moment, but I can just land that as a separate patch later today.

@bdero bdero merged commit 972e8d8 into flutter:main Dec 1, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 1, 2022
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Dec 1, 2022
…116384)

* 4199b108b Roll Skia from 6f6793b298ff to b273c4c744be (1 revision) (flutter/engine#38009)

* 972e8d844 [Impeller Scene] Add offline mesh importer (flutter/engine#37981)

* abb68f40b Fix: The Background and Overlay ImageView leak (flutter/engine#37424)
mit-mit pushed a commit to mit-mit/flutter that referenced this pull request Dec 6, 2022
…lutter#116384)

* 4199b108b Roll Skia from 6f6793b298ff to b273c4c744be (1 revision) (flutter/engine#38009)

* 972e8d844 [Impeller Scene] Add offline mesh importer (flutter/engine#37981)

* abb68f40b Fix: The Background and Overlay ImageView leak (flutter/engine#37424)
shogohida pushed a commit to shogohida/flutter that referenced this pull request Dec 7, 2022
…lutter#116384)

* 4199b108b Roll Skia from 6f6793b298ff to b273c4c744be (1 revision) (flutter/engine#38009)

* 972e8d844 [Impeller Scene] Add offline mesh importer (flutter/engine#37981)

* abb68f40b Fix: The Background and Overlay ImageView leak (flutter/engine#37424)
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jan 19, 2023
…lutter#116384)

* 4199b108b Roll Skia from 6f6793b298ff to b273c4c744be (1 revision) (flutter/engine#38009)

* 972e8d844 [Impeller Scene] Add offline mesh importer (flutter/engine#37981)

* abb68f40b Fix: The Background and Overlay ImageView leak (flutter/engine#37424)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants