Skip to content

Feature/model node animation#136

Open
Roxeena wants to merge 3 commits into
masterfrom
feature/model-node-animation
Open

Feature/model node animation#136
Roxeena wants to merge 3 commits into
masterfrom
feature/model-node-animation

Conversation

@Roxeena
Copy link
Copy Markdown
Member

@Roxeena Roxeena commented May 27, 2026

This makes it possible to add a transformation to an internal model node for a 3D model. This also requires all nodes to store the name, therefor the caching format has been updated. The user can choose to either replace the existing transformation with the custom one or add it on top of the existing one with a parameter.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for addressing model nodes by name and applying custom transforms to internal nodes, including cache/binary format updates to persist node names.

Changes:

  • Bumps model/cache versions and serializes/deserializes node names.
  • Stores Assimp node names in ModelNode.
  • Adds custom node transform APIs and applies them during rendering.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/io/model/modelreaderbinary.cpp Reads node names from updated binary model files while retaining older format support.
src/io/model/modelreaderassimp.cpp Populates ModelNode names from Assimp nodes.
src/io/model/modelnode.cpp Stores node names and custom transforms on model nodes.
src/io/model/modelgeometry.cpp Persists node names in cache files and applies custom node transforms during rendering.
include/ghoul/io/model/modelnode.h Exposes node name and custom transform accessors/mutators.
include/ghoul/io/model/modelgeometry.h Adds public APIs for updating custom node transforms and override behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/io/model/modelgeometry.cpp
Comment on lines +1197 to +1200
for (io::ModelNode& node : _nodes) {
if (node.name() == nodeName) {
node.updateCustomTransform(customTransform);
return;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not sure if we want to custom transform to affect the bounding radius... what do others think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants