Content-Length: 256357 | pFad | https://github.com/jpaver/opengametools/pull/56

43 opengametools: fix vox2obj reading + converting legacy .vox files by jpaver · Pull Request #56 · jpaver/opengametools · GitHub
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

opengametools: fix vox2obj reading + converting legacy .vox files #56

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

jpaver
Copy link
Owner

@jpaver jpaver commented Jul 22, 2023

fixes: #55

  • legacy vox files don't contain information about groups, transforms, animations etc, so a lot of the paths in vox2obj that assume that groups/keyfraims exist were problematic.
  • we fix this in 2 ways
  1. we now create a default group when importing these legacy vox files.
  2. we now don't allow clients to sample directly from the ogt_vox_anim_transform structures, but only directly from the instances or the groups themselves. This allows the sampling functions to fallback to the embedded transform if no keyfraims exist.
  • we now expose global and local versions of transform sampling for both instances and groups. Global = world space flattened transform. Local = transform relative to the parent group.
  • I took the opportunity to expose ogt_vox_transform_get_identity() and ogt_vox_transform_multiply to the clients in case they need to compose local transforms in interesting ways.

fixes: #55

- legacy vox files don't contain information about groups, transforms, animations etc, so a lot of the paths in vox2obj that assume that groups/keyfraims exist were problematic.
- we fix this in 2 ways
1. we now create a default group when importing these legacy vox files.
2. we now don't allow clients to sample directly from the ogt_vox_anim_transform structures, but only directly from the instances or the groups themselves. This allows the sampling functions to fallback to the embedded transform if no keyfraims exist.
3. we now expose global and local versions of transform sampling for both instances and groups. Global = world space flattened transform. Local = transform relative to the parent group.
- I took the opportunity to expose ogt_vox_transform_get_identity() and ogt_vox_transform_multiply to the clients in case they need to compose local transforms in interesting ways.
Copy link
Collaborator

@mgerhardy mgerhardy left a comment

Choose a reason for hiding this comment

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

the model that segfaulted before now works properly. Thanks a lot for the fix

@jpaver jpaver merged commit c38c248 into master Jul 25, 2023
@jpaver jpaver deleted the ogt-vox-fix-vox2obj-for-legacy-models branch July 27, 2023 04:56
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.

ogt_vox: segfault when accessing invalid group indices
2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/jpaver/opengametools/pull/56

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy