-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
High-quality test and example scene #2237
base: master
Are you sure you want to change the base?
Conversation
IMO, the jme-core module should contain only the essential engine functions. This would allow users to create custom utility libraries that perfectly fit the needs of their projects. After all, user freedom is a fundamental principle of JME! By keeping utility classes separate, we ensure that they can be easily tested, updated, and maintained without impacting the main engine. This is especially important considering the long release cycles of JME. Utility class bugs can be fixed much more quickly in external libraries than waiting for the next engine update. So, let's empower users and keep the core engine lean! |
This PR is designed for use in official JME examples and tests, so I can't move it to an external library. What do you suggest? |
This PR introduces two new classes to the jme-core module: 1. NormalQuad:There are already existing classes like 2. JmeUtils:Since it's customized to your specific needs, it might not be universally applicable to other users. There are hundreds of classes like this on github and they should not be in the core module. TestScene:The TestScene class looks a bit complex for general use and contains many options that you have customized on the .blend and .gltf scene file. I believe in keeping example classes clear and easy to understand. Consider that there are already 2 open Issues to improve the jme3-examples module: |
There are two problems that need to be solved:
Solving these problems could greatly boost the confidence users have in their engine of choice, thus making them less likely to drop the engine when they inevitably hit a tough problem. TestScene is trying its best to fix these problems, and it would do a pretty good job, imo. It is taking a very complex problem and reducing it to a set of parameters that are frankly very easy to work with. If you have suggestions on how it can be made simpler, I'd be happy to hear them. Also, I would argue that TestScene would actually make the engine examples less complex, because it would move all that messy boilerplate scene setup elsewhere. Of course, this would only be true if users were already somewhat familiar with what TestScene does.
Ah, I was unaware of RectangleMesh. I will delete NormalQuad.
Ok, I see what you mean, I will delete that also. |
And please make it the default scene of all the examples. It would be especially nice to get rid of the ogre.xml scenes in jme3-examples. |
If you intend to go ahead with this PR, to improve code maintainability and facilitate review, consider using the Builder pattern for the Modifying 20 classes at once makes review cumbersome. Break down the changes into smaller, manageable pieces. Additionally, aim for a balance between utility methods and code exposure in TestScene class. While utility methods can improve code organization, excessive use can hinder understanding. Examples should be stripped-down to highlight a single functionality. While aesthetics can be appealing, prioritize clarity and ease of understanding. Edit: |
TestScene
is a high-quality and configurable PBR scene that can quickly and easily be set up for any tests or examples.The scene was created with only the following setup:
Current features:
Todo:
TestScene is currently part of the jme3-examples package, which is normally not built for releases, I believe. I think it would be best if it was moved to where end users can access it easily. Does anyone have any ideas for this?
This PR also includes JmeUtils, to which I've added several methods for shadow renderer/filter creation and anisotropic filtering. I can remove this class, but I think it would be beneficial to have a class or two that helps streamline development like this class does.
What do you all think?