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

VideoCommon: add functionality to prepare for a custom mesh asset to be used by graphics mods #12562

Merged
merged 2 commits into from Feb 12, 2024

Conversation

iwubcode
Copy link
Contributor

@iwubcode iwubcode commented Feb 4, 2024

This adds the loading logic for a mesh asset. The actual library implementation to load the mesh will be added in a subsequent PR to keep things smaller.

The idea is that meshes will be imported from a GLTF file (using a new external tinygltf) and will be stored in a Dolphin binary file that mimics the mesh data needed by Dolphin (as well as a json file, which contains metadata that is modifiable by the editor, currently a mapping between GLTF material name and Dolphin material asset).

Each part of the model file is loaded into a "chunk" which contains all the data needed to render that sub-mesh (the transform used for orientation, the material name on the original GLTF file, and the actual vertex data used to render) and the renderer just loops over all the chunks to draw the model

This logic is pulled from #12280 where there is an import menu, along with logic to render that mesh (coming later).

@iwubcode
Copy link
Contributor Author

iwubcode commented Feb 5, 2024

Things left for future work:

Source/Core/VideoCommon/Assets/MeshAsset.h Outdated Show resolved Hide resolved
Source/Core/VideoCommon/Assets/MeshAsset.h Outdated Show resolved Hide resolved
Source/Core/VideoCommon/Assets/MeshAsset.cpp Outdated Show resolved Hide resolved
Source/Core/VideoCommon/Assets/MeshAsset.cpp Outdated Show resolved Hide resolved
Source/Core/VideoCommon/Assets/MeshAsset.cpp Outdated Show resolved Hide resolved
Source/Core/VideoCommon/Assets/MeshAsset.cpp Outdated Show resolved Hide resolved
Source/Core/VideoCommon/Assets/MeshAsset.cpp Outdated Show resolved Hide resolved
Source/Core/VideoCommon/Assets/MeshAsset.cpp Outdated Show resolved Hide resolved
Source/Core/VideoCommon/Assets/MeshAsset.cpp Outdated Show resolved Hide resolved
Source/Core/VideoCommon/Assets/MeshAsset.cpp Outdated Show resolved Hide resolved
@iwubcode iwubcode force-pushed the mesh_asset branch 2 times, most recently from 33fcb62 to 1bf8170 Compare February 7, 2024 05:41
@lioncash lioncash merged commit c62d199 into dolphin-emu:master Feb 12, 2024
11 checks passed
@iwubcode iwubcode deleted the mesh_asset branch February 12, 2024 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants