Skip to content

Conversation

@FileEX
Copy link
Member

@FileEX FileEX commented Dec 24, 2024

This PR adds the setElementLighting function, which allows setting custom lighting for a specific element.

@tederis tederis merged commit 90fd98a into multitheftauto:master Dec 25, 2024
6 checks passed
MTABot pushed a commit that referenced this pull request Dec 25, 2024
@FileEX FileEX deleted the feature/setElementLighting branch December 25, 2024 07:39
@Fernando-A-Rocha
Copy link
Contributor

Can u showcase this in action?

@FileEX
Copy link
Member Author

FileEX commented Dec 25, 2024

Can u showcase this in action?

I don't think there's much to show here. You can simply adjust the brightness of elements like peds, vehicles, or objects

@Fernando-A-Rocha
Copy link
Contributor

Can u showcase this in action?

I don't think there's much to show here. You can simply adjust the brightness of elements like peds, vehicles, or objects

Ah I think a more appropriate name would be
setElementLightBrightness or setElementLightIntensity ?

@FileEX
Copy link
Member Author

FileEX commented Dec 25, 2024

Can u showcase this in action?

I don't think there's much to show here. You can simply adjust the brightness of elements like peds, vehicles, or objects

Ah I think a more appropriate name would be setElementLightBrightness or setElementLightIntensity ?

This function is the missing counterpart to getElementLighting. The names of these functions can be changed if someone wants, and the current ones can be marked as deprecated, although I think these names are ok

@tederis
Copy link
Member

tederis commented Dec 25, 2024

I agree with the FileEX's arguments. setElementLighting and getElementLighting deal with the same value. And if someone wants to change a function's name then it must be applied to both functions.

@AlexTMjugador
Copy link
Member

AlexTMjugador commented Dec 30, 2024

Now that this feature has been merged for a few days, it would be great to have a wiki article documenting it.

Also, in my opinion, a well-written wiki article should clearly explain how often the game computes lighting values for elements. This information is needed for script developers to decide whether to call it one-time or on every frame. The one-time approach is sufficient if the game doesn't frequently recalculate lighting values, but if the game recalculates lighting values every frame, calling it on each frame would be necessary for an override to have visible effects, which is also a reasonable design choice for the GTA rendering engine.

@FileEX
Copy link
Member Author

FileEX commented Dec 30, 2024

Now that this feature has been merged for a few days, it would be great to have a wiki article documenting it.

The article will be published when the build is released; I always make sure of that.

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.

4 participants