-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
2DFX Effects API #3741
base: master
Are you sure you want to change the base?
2DFX Effects API #3741
Conversation
Update
bool setModel2DFXProperty(int modelID, int index, string property, mix value)
mix getModel2DFXProperty(int modelID, int index, string property)
bool set2DFXProperty(2dfx effect, string property, mix value)
mix get2DFXProperty(2dfx effect, string property)
But PR is still a work in progress. |
what about a property for setting 2DFX dimension/interior ? also isn't the corona limit still 64 so something like Project2DFX's LOD lights still wouldn't be possible? |
2DFX effects do not have their own dimension and interior. They are part of the model, so they take on the same dimension and interior as the given object/building.
The current limit for visible coronas is indeed 64. I already know where and what needs to be done to increase it. However, I'm wondering whether it should be done as part of this PR or as a separate feature like a 'limit adjuster' |
Is it possible to apply effect to certain MTA object, just like targetElement when applying shader? |
Can you create a new 2DFX class for this instead of using engine class defs? |
if the corona limit fix is not too complex, it would be a good idea to make it part of this because a full limit adjuster with more features would be another whole beast. |
If I'm not mistaken, each entity has its own RwObject, so it should be possible to add an effect only for one object, and not for all with this id |
can we make changes to the grass? |
What do you mean? |
Grass/plants are not a 2DFX effect. Grass is generated by a RW, and it's a completely different mechanism. Maybe, if there’s interest, I’ll create an API for plants as well, so that custom ones can be made, etc. However, I don't think this is something that the community desires |
Increasing grass limits would be nice. |
wow, that would be really helpful, especially working on some VC-based map to SA. |
This PR adds the ability to add, remove, and edit 2DFX effects. It's also possible to edit and remove 2DFX effects from existing objects without the need to edit the model.
Available effect types (relevant in MTA):
Note: The
escalator
effect allows for the creation of moving escalatorsElements that supports 2dfx with this PR
This PR is still under development. I have a few more ideas on how I want to expand and simplify it. As for limitations, the limit is the same as with normal model editing, meaning as much as your memory can handle.
Available functions:
Functions that have the word 'model' in their name are intended for existing default world objects, while those without this prefix are meant for custom effects created using
engineAddModel2DFX
.Examples
A detailed description along with documentation will be added when the PR is 100% complete and ready for review. Most of the work has already been done, here's a short to-do list:
- Removing custom effects viadestroyElement
Possibly resolves: #3579