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

Overhauled EOTech Holographics #482

Merged
merged 3 commits into from
Nov 11, 2024
Merged

Overhauled EOTech Holographics #482

merged 3 commits into from
Nov 11, 2024

Conversation

Braiam23
Copy link
Collaborator

@Braiam23 Braiam23 commented Sep 7, 2024

📝 Description

This PR contains improved textures for the holographic sights, and also improves the models I try to replicate to real-life models. What differentiates it from other PRs is that the non-visible parts of the models do not have textures, making it only focus on the visible parts.

  • Improves the model and texture of the holographic (Black color)
  • Improves the texture and eliminates the z-fighting of the model (Tan color)

🎯 Goals

  • Perform texture optimization tests with small models
  • Improve texture quality (A little closer to the original Vic Modern Warfare style)

❌ Non Goals

Breaking holographic sight textures in-game

🚦 Testing

It works correctly...

⏮️ Backwards Compatibility

Fully compatible with older versions

📚 Related Issues & Documents

N/A

🖼️ Screenshots/Recordings

HolographicBlack

HolographicTan

📖 Added to documentation?

  • 📜 README.md
  • 📑 Documentation
  • 📓 Javadoc
  • 🍕 Comments
  • 🙅 No documentation needed

😄 [optional] What gif best describes this PR or how it makes you feel?

N/A

By the way, if you have no idea what to do with the mod, let the designers' work revive the mod or let me manage the project for a few days XD.

Now if you don't accept the PR I don't know how I can help you with the mod either.

Copy link
Contributor

coderabbitai bot commented Sep 7, 2024

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The pull request introduces significant updates to the tooltip system in Modern Warfare Cubed Version 0.2, enhancing the information provided for weapons, attachments, and melee weapons. It includes new translations in German and Ukrainian, a new sound effect for shooting snow, and visual enhancements like overhauled textures and models for specific holographic sights. Functionality changes include adjustments to fire mode hints and magazine visibility. The Holographic and Holographic2 classes have been restructured, consolidating model components and updating rendering logic. Bug fixes and performance optimizations are also included, alongside dependency updates.

Changes

Files Change Summary
Changelog.md Updated dependency requirements for MixinBooter and Red Core. Added significant updates to tooltips, translations, sound effects, visual enhancements, and bug fixes.
src/main/java/com/paneedah/mwc/models/Holographic.java Significant restructuring of ModelRenderer components, renaming, and adjustments to texture dimensions and geometry.
src/main/java/com/paneedah/mwc/models/Holographic2.java Complete overhaul of model structure, consolidating components into a single ModelRenderer, with simplified constructor and rendering logic.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TooltipSystem
    participant Holographic
    participant Holographic2

    User->>TooltipSystem: Request Weapon Info
    TooltipSystem->>User: Display Enhanced Tooltip

    User->>Holographic: Initialize Holographic Model
    Holographic->>Holographic: Set texture dimensions
    Holographic->>Holographic: Define cube geometry
    Holographic->>User: Render Model

    User->>Holographic2: Initialize Holographic2 Model
    Holographic2->>Holographic2: Set texture dimensions
    Holographic2->>Holographic2: Define geometry using ModelBox
    Holographic2->>User: Render Model
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f0e7e02 and 0043201.

Files ignored due to path filters (2)
  • src/main/resources/assets/mwc/textures/models/holographic.png is excluded by !**/*.png, !**/*.png
  • src/main/resources/assets/mwc/textures/models/holographic2.png is excluded by !**/*.png, !**/*.png
Files selected for processing (2)
  • src/main/java/com/paneedah/mwc/models/Holographic.java (1 hunks)
  • src/main/java/com/paneedah/mwc/models/Holographic2.java (1 hunks)
Additional comments not posted (2)
src/main/java/com/paneedah/mwc/models/Holographic2.java (1)

50-352: Comprehensive Refactoring of Holographic2 Class

The Holographic2 class has undergone a significant refactoring, introducing a more streamlined and maintainable structure. The introduction of a single ModelRenderer instance named holo which encapsulates all components is a positive change, enhancing the organization and potentially improving rendering performance.

Key Observations:

  • Texture Dimensions: The change from 256x128 to 64x64 is notable. While this reduction could potentially decrease the texture quality, it may also be part of an optimization strategy to improve performance. It's crucial to ensure that this change aligns with the PR's goals of enhancing texture quality.
  • ModelRenderer Additions: Each new ModelRenderer instance added as a child to holo is well-defined with specific rotation points and cube additions. This hierarchical model organization facilitates easier modifications and debugging.
  • Method Renaming: The renaming of setRotation to setRotationAngle improves readability and conforms to Java naming conventions.

Recommendations:

  • Verify Texture Quality: Ensure that the reduced texture dimensions do not adversely affect the visual quality, especially given the PR's focus on texture enhancements.
  • Optimization Checks: Conduct performance tests to verify that the new model structure and reduced texture dimensions contribute positively to rendering efficiency.
  • Documentation: Update any developer documentation to reflect these structural changes and provide guidelines on how to modify or extend the Holographic2 model effectively.

Overall, the changes are well-executed and align with best practices for maintainability and performance optimization. However, careful attention should be paid to the impact of texture dimension changes on the final rendered product.

src/main/java/com/paneedah/mwc/models/Holographic.java (1)

52-338: Comprehensive Refactoring of Holographic Class

The Holographic class has undergone a significant refactoring, introducing a more streamlined and maintainable structure. The introduction of new ModelRenderer instances with updated naming conventions is a positive change, enhancing the organization and potentially improving rendering performance.

Key Observations:

  • Texture Dimensions: The change from 100 to 80 is notable. While this reduction could potentially decrease the texture quality, it may also be part of an optimization strategy to improve performance. It's crucial to ensure that this change aligns with the PR's goals of enhancing texture quality.
  • ModelRenderer Additions: Each new ModelRenderer instance added is well-defined with specific rotation points and cube additions. This hierarchical model organization facilitates easier modifications and debugging.
  • Method Retention: The retention of the setRotationAngle method with its original functionality ensures that existing customizations and extensions to the model will continue to function without modification.

Recommendations:

  • Verify Texture Quality: Ensure that the reduced texture dimensions do not adversely affect the visual quality, especially given the PR's focus on texture enhancements.
  • Optimization Checks: Conduct performance tests to verify that the new model structure and reduced texture dimensions contribute positively to rendering efficiency.
  • Documentation: Update any developer documentation to reflect these structural changes and provide guidelines on how to modify or extend the Holographic model effectively.

Overall, the changes are well-executed and align with best practices for maintainability and performance optimization. However, careful attention should be paid to the impact of texture dimension changes on the final rendered product.

@Braiam23
Copy link
Collaborator Author

Braiam23 commented Sep 7, 2024

By the way, I will not put this change in the Changelog because it is not fundamental, it does not drastically change the mod, it is just a small improvement.

@Desoroxxx
Copy link
Collaborator

By the way, if you have no idea what to do with the mod, let the designers' work revive the mod or let me manage the project for a few days XD.

Now if you don't accept the PR I don't know how I can help you with the mod either.

You are already lead designer

By the way, I will not put this change in the Changelog because it is not fundamental, it does not drastically change the mod, it is just a small improvement.

Changelog is here to log changes, no matter how small it may be, anyway I will do it myself I guess.

Thanks for the PR

@Desoroxxx Desoroxxx added this to the MWC 0.2 milestone Nov 1, 2024
Copy link

Qodana for JVM

21679 new problems were found

Inspection name Severity Problems
Unchecked warning 🔶 Warning 10614
Unnecessary 'this' qualifier 🔶 Warning 4020
Deprecated API usage 🔶 Warning 1566
Auto-boxing 🔶 Warning 892
@NotNull/@Nullable problems 🔶 Warning 417
Statement with empty body 🔶 Warning 361
Field can be local 🔶 Warning 313
Lombok @Getter may be used 🔶 Warning 276
Nullability and data flow problems 🔶 Warning 183
Auto-unboxing 🔶 Warning 146
Unused assignment 🔶 Warning 126
Non-constant field with upper-case name 🔶 Warning 114
Constant values 🔶 Warning 108
Javadoc declaration problems 🔶 Warning 103
Redundant local variable 🔶 Warning 101
Lombok @Setter may be used 🔶 Warning 89
Questionable name 🔶 Warning 76
Possibly lossy implicit cast in compound assignment 🔶 Warning 46
Call to 'printStackTrace()' 🔶 Warning 36
Declaration has problems in Javadoc references 🔶 Warning 24
Result of method call ignored 🔶 Warning 18
Deprecated member is still used 🔶 Warning 14
'size() == 0' can be replaced with 'isEmpty()' 🔶 Warning 14
Dynamic regular expression can be replaced by compiled 'Pattern' 🔶 Warning 13
Link specified as plain text 🔶 Warning 13
Method is identical to its super method 🔶 Warning 13
Suspicious collection method call 🔶 Warning 13
'Set' can be replaced with 'EnumSet' 🔶 Warning 11
Integer division in floating-point context 🔶 Warning 9
Mismatched query and update of collection 🔶 Warning 9
'Map' can be replaced with 'EnumMap' 🔶 Warning 8
String concatenation as argument to 'StringBuilder.append()' call 🔶 Warning 8
Class is exposed outside of its visibility scope 🔶 Warning 7
Condition is covered by further condition 🔶 Warning 7
Octal integer 🔶 Warning 7
Suspicious variable/parameter name combination 🔶 Warning 7
Vulnerable imported dependency 🔶 Warning 7
Functional expression can be folded 🔶 Warning 6
Copy of existing static method body 🔶 Warning 6
Unused import 🔶 Warning 6
Unnecessary unary minus 🔶 Warning 6
Unstable API Usage 🔶 Warning 6
Bulk operation can be used instead of iteration 🔶 Warning 6
Catch block may ignore exception 🔶 Warning 5
Variable is assigned to itself 🔶 Warning 5
Stream API call chain can be simplified 🔶 Warning 5
Dangling Javadoc comment 🔶 Warning 4
Duplicate condition 🔶 Warning 4
Inner class may be 'static' 🔶 Warning 4
Manual min/max calculation 🔶 Warning 4
AutoCloseable used without 'try'-with-resources 🔶 Warning 3
Too weak variable type leads to unnecessary cast 🔶 Warning 3
Mismatched read and write of array 🔶 Warning 3
Value passed as parameter never read 🔶 Warning 3
String concatenation in loop 🔶 Warning 3
Local variable used and declared in different 'switch' branches 🔶 Warning 3
Unnecessary 'continue' statement 🔶 Warning 3
'default' not last case in 'switch' 🔶 Warning 2
Call math rounding with 'int' argument 🔶 Warning 2
Redundant operation on empty container 🔶 Warning 2
Redundant usage of unmodifiable collection wrappers 🔶 Warning 2
Method does not call super method 🔶 Warning 2
Caught exception is immediately rethrown 🔶 Warning 1
Redundant 'Collection.addAll()' call 🔶 Warning 1
'static' method declared 'final' 🔶 Warning 1
Call to 'toString()' on array 🔶 Warning 1
Method name same as class name 🔶 Warning 1
Redundant type cast 🔶 Warning 1
String comparison using '==', instead of 'equals()' 🔶 Warning 1
'String.equals()' can be replaced with 'String.isEmpty()' 🔶 Warning 1
Minimum 'switch' branches 🔶 Warning 1
Unary plus 🔶 Warning 1
Commented out code ◽️ Notice 1006
Duplicated code fragment ◽️ Notice 677
Non-distinguishable logging calls ◽️ Notice 33
Non-constant string concatenation as argument to logging call ◽️ Notice 17
'if' statement with identical branches or common parts ◽️ Notice 15
Constant values ◽️ Notice 14
Method can be extracted ◽️ Notice 12
Multiple occurrences of the same expression ◽️ Notice 4
Duplicate branches in 'switch' ◽️ Notice 3
Non-strict inequality '>=' or '<=' can be replaced with '==' ◽️ Notice 1

☁️ View the detailed Qodana report

Detected 18 dependencies

Third-party software list

This page lists the third-party software dependencies used in Modern Warfare Cubed

Dependency Version Licenses
commons-codec 1.10 Apache-2.0
commons-compress 1.8.1 Apache-2.0
commons-io 2.5 Apache-2.0
commons-lang3 3.5 Apache-2.0
commons-logging 1.1.3 Apache-2.0
groovyscript 1.2.0-hotfix1 MIT
httpclient 4.3.3 Apache-2.0
httpcore 4.3.2 Apache-2.0
CC-BY-2.5
icu4j-core-mojang 51.2 IBM-ICU
java-objc-bridge 1.0.0 Apache-2.0
jline 3.5.1 BSD-3-Clause
jopt-simple 5.0.3 MIT
log4j-api 2.17.1 Apache-2.0
log4j-core 2.17.1 Apache-2.0
lombok 1.18.32 BSD-3-CLAUSE-NO-TRADEMARK
MIT
maven-artifact 3.5.3 Apache-2.0
plexus-utils 3.1.0 Apache-2.0
vecmath 1.5.2 GPL-2.0-only
ORACLE-OPENJDK-EXCEPTION-2.0
Contact Qodana team

Contact us at [email protected]

@Desoroxxx Desoroxxx changed the title Optimized holographic Overhauled EOTech Holographics Nov 11, 2024
@Desoroxxx Desoroxxx merged commit 1b2dce2 into next Nov 11, 2024
0 of 2 checks passed
@Desoroxxx Desoroxxx deleted the optimized-textures branch November 11, 2024 04:33
@Desoroxxx Desoroxxx restored the optimized-textures branch November 11, 2024 04:34
Desoroxxx added a commit that referenced this pull request Nov 11, 2024
Desoroxxx added a commit that referenced this pull request Nov 11, 2024
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.

3 participants