Skip to content

Conversation

@yaRnMcDonuts
Copy link
Member

@yaRnMcDonuts yaRnMcDonuts commented Dec 27, 2025

Adds a simple but highly reusable AppState that runs effects directly on a valid Vector type object (being Vector2f, Vector3f, Vector4f, and ColorRGBA).

Useful for lights, particle effects, and essentially every Color or Vector based MaterialParamater that shaders and special effects rely on.

The most useful functionality of this system will be the ability to quickly deploy an EaseVectorEffect on colors to smoothly fade in/out things like lights and special effects, as to avoid the sudden and unsightly impact of removing something from the scene instantaneously in one single frame. This type of smooth fading is a very important aspect of polishing a game. And while the code to fade out colors can be simple, it is something that is used over and over again for a variety of different effects in a project and can sometimes requires some not-so-simple extra bells and whistles (like a delay timer or chaining), thus a versatile system like this becomes necessary to handle this in an efficient way.

In addition to smooth fading, this library also enables a variety of other compound loopable effects by using the SequencedVectorEffect class (such as flickering, pulsing, oscillating, etc), and I also will be adding a NoiseVectorEffect class soon as well.

@yaRnMcDonuts yaRnMcDonuts added the Feature Request / Proposal Request a feature or propose an idea label Dec 27, 2025
@yaRnMcDonuts yaRnMcDonuts added this to the v3.10.0 milestone Dec 27, 2025
@yaRnMcDonuts
Copy link
Member Author

yaRnMcDonuts commented Jan 4, 2026

In order to add the NoiseVectorEffect, I also will have to add a procedural noise library to the engine.

The best choice for a fully-fledged noise library in java would appear to be the JNoise library, however I believe that would be overkill for basic noise functions that are needed for this PR, so instead I am choosing to implement the java FastNoiseLite library into the engine. This is a very light weight single class noise library that should be more suited to include in the engine than something like JNoise. Let me know if anyone disagrees or prefers a different noise library, otherwise I will move forward with this plan to include FastNoiseLite.java in the engine's math package. I also will update this PR to include javadoc before merging.

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

🖼️ Screenshot tests have failed.

The purpose of these tests is to ensure that changes introduced in this PR don't break visual features. They are visual unit tests.

📄 Where to find the report:

  • Go to the (failed run) > Summary > Artifacts > screenshot-test-report
  • Download the zip and open jme3-screenshot-tests/build/reports/ScreenshotDiffReport.html

⚠️ If you didn't expect to change anything visual:
Fix your changes so the screenshot tests pass.

If you did mean to change things:
Review the replacement images in jme3-screenshot-tests/build/changed-images to make sure they really are improvements and then replace and commit the replacement images at jme3-screenshot-tests/src/test/resources.

If you are creating entirely new tests:
Find the new images in jme3-screenshot-tests/build/changed-images and commit the new images at jme3-screenshot-tests/src/test/resources.

Note; it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar".

See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information

Contact @richardTingle (aka richtea) for guidance if required

@yaRnMcDonuts
Copy link
Member Author

yaRnMcDonuts commented Jan 5, 2026

I re-ran the jobs and this time the screenshot tests passed. I guess something must have bugged out during the first run.

@richardTingle
Copy link
Member

Yeah, that's decidedly weird. I can't see why it decided to post that (especially not 2 hours ago). Hopefully just something bugging out as you say

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

Labels

Feature Request / Proposal Request a feature or propose an idea

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants