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

NUD bounding sphere updates #388

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Conversation

Dr-HyperCake
Copy link
Contributor

I have made some changes to NUD.

  • Bounding spheres:
    • Simplify bounding sphere calculations. It still yields results on par with vanilla values.
    • A mesh's boundingSphere is now 4 values rather than 8, as the NUD format contains duplicate information for these values, which is now ignored.
  • Update sortBias value:
    • It's now read and written correctly within the file, and treated as a float rather than an integer.
    • Remove code for determining a mesh's sort bias from its name, as it is no longer needed.
  • Minor style changes to material XML code.

@ScanMountGoat
Copy link
Collaborator

Remove code for determining a mesh's sort bias from its name, as it is no longer needed.

Does this help with the rendering issues with trophies? I remember some of the alpha effects for Link and Ganon having issues related to render order. That was a long time ago though.

@ScanMountGoat
Copy link
Collaborator

ScanMountGoat commented Sep 2, 2024

It looks like the new sortBias should be subtracted instead of added in Mesh.CalculateSortingDistance. This improves the rendering compared to the old code for models like model/figure/Link_F and model/figure/Ganondorf_F.

@Dr-HyperCake
Copy link
Contributor Author

It looks like the new sortBias should be subtracted instead of added in Mesh.CalculateSortingDistance. This improves the rendering compared to the old code for models like model/figure/Link_F and model/figure/Ganondorf_F.

Right, that seems like it would make sense. The old code for determining sortBias from the mesh name was ignoring the "m" prefix (which represents a negative value), so it would have had the wrong sign in many cases. I'm happy to change the operation to a subtraction.

@ScanMountGoat ScanMountGoat merged commit 46c13a3 into jam1garner:master Sep 3, 2024
1 check passed
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