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

editor: multiple fixes & improvements related to LODs #556

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

Fernando-A-Rocha
Copy link
Contributor

@Fernando-A-Rocha Fernando-A-Rocha commented Oct 11, 2024

Status: waiting for new MTA feature multitheftauto/mtasa-blue#3831

  • editor_main: Makes useLODs setting enabled by default. It's a feature that the game uses for world objects, there is no reason to not have it enabled for map objects in new maps.
  • editor_main: Modernizes the map scripting extensions script: gets rid of the clientside engineSetModelLODDistance to 300, which did not make sense. Let's keep the default model LOD distances.
  • editor_main: Makes use of the new getObjectLowLODModel MTA function to obtain the LLOD object ID of any HLOD object ID. The previous LOD_TABLE was even incomplete! Rockstar hid some object=>lod associations in binary IPL files, which have been identified and fixed in MTA PR 3831. Fixes editor: LOD_MAP table is missing some LOD models #555
  • edf & editor_main: Fixes LOD models not creating for objects during mapping

@Fernando-A-Rocha
Copy link
Contributor Author

Fernando-A-Rocha commented Oct 11, 2024

Why would maps have useLODs disabled by default?????
It's literally a game feature that should be enabled automatically for maps imo.

image

@Fernando-A-Rocha Fernando-A-Rocha changed the title Fix map editor LOD_MAP table editor: fix missing models in LOD_MAP table Oct 11, 2024
@Fernando-A-Rocha Fernando-A-Rocha changed the title editor: fix missing models in LOD_MAP table editor: fix missing models in LOD_MAP table, make useLODs enabled by default & more Oct 11, 2024
@Fernando-A-Rocha Fernando-A-Rocha marked this pull request as draft October 11, 2024 11:46
@Fernando-A-Rocha Fernando-A-Rocha changed the title editor: fix missing models in LOD_MAP table, make useLODs enabled by default & more editor: multiple fixes & improvements related to LODs Oct 11, 2024
@Fernando-A-Rocha Fernando-A-Rocha marked this pull request as ready for review October 11, 2024 12:32
@Fernando-A-Rocha
Copy link
Contributor Author

Tested!
Ready for review, im satisfied with the result

@Fernando-A-Rocha
Copy link
Contributor Author

Fernando-A-Rocha commented Oct 11, 2024

New maps will look like this

This script's purpose is to make removeWorldObject map entries and LODs work

image

@chris1384
Copy link
Contributor

I don't think that useLODs should be a good idea to be true as default, since most players are not aware of what LODs do in the first place.
And this may affect players with low-end PCs.
Other than that, seems like a good refactor overall.

@Fernando-A-Rocha
Copy link
Contributor Author

Fernando-A-Rocha commented Oct 11, 2024

The LOD object model only loads when the object becomes far away, replacing the normal object (or so it should). I doubt it's bad in terms of performance...

I know me and many MTA players have always hated seeing objects disappear at a low distance, due to the lack of LOD loaded because the script only did createObject once without assigning any LOD... It's especially frustrating and immersion-breaking in the map editor while you're mapping to see these objects disappear.

addEventHandler("onResourceStart", resourceRoot, onResourceStartOrStop, false)
addEventHandler("onResourceStop", resourceRoot, onResourceStartOrStop, false)

-- MTA LOD Table [object] = [lodmodel]]
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs one more closing ] at the end, two to close the multi-line string and one to encapsulate 'lodmodel' in the final file

-- MTA LOD Table [object] = [lodmodel]]]

@Fernando-A-Rocha
Copy link
Contributor Author

Actually, keep this on hold.
I'm gonna make a mtasa-blue function to return the new LOD_TABLE :-) It will be useful to have this in MTA itself

@Fernando-A-Rocha Fernando-A-Rocha marked this pull request as ready for review November 20, 2024 15:15
@Fernando-A-Rocha
Copy link
Contributor Author

Fernando-A-Rocha commented Nov 20, 2024

Updated to use new upcoming feature from multitheftauto/mtasa-blue#3831

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.

editor: LOD_MAP table is missing some LOD models
4 participants