tr_model_iqm: detect and rewrite NaN in IQM model#1469
Merged
Conversation
Contributor
|
I assume this doesn't have much of an effect on loading times?
This should be added as a comment. |
Contributor
|
Tested, there's no discernible impact on loading times. The warn that tells which exact input is NaN is a bit spammy though. That might not be much of an issue if the prifle model is fixed though. |
DolceTriade
reviewed
Jan 21, 2025
1e0ecf3 to
6179377
Compare
Member
Author
|
I modified the whole loading to check for NaN in all IQM floats. |
6179377 to
7577597
Compare
slipher
reviewed
Feb 9, 2025
97a39d6 to
debaca5
Compare
NaN in model IQM inputdebaca5 to
d0cc652
Compare
Member
|
LGTM |
d0cc652 to
909f23d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrite
NaNin model IQM input.The
prifle_view.iqmmodel has someNaNin the input data:prifle_view.iqmmodel has someNaNin the input data Unvanquished/Unvanquished#3252When such model file is used, it is impossible to get anything useful when trapping for invalid operations because the first call of
R_TBNtoQtangents()when loading the model will stop the execution.There are other floats in the IQM file, we may want to not hack
BuildTangents()and sanitize all the floats in the future with a generic function, but this works for now.Here is the IQE text equivalent of the IQM format, there are many float fields like that:
Here is an example of broken input, the current code currently only cares about
vx.