Ryosuke Posted August 7, 2018 Share Posted August 7, 2018 (edited) Hi, I modeled a map and would like to break the field-of-view limit. there is a limit of 300 units of the distance object, how can I make to make all objects visible from a greater distance? txd = engineLoadTXD ( "1.txd" ) engineImportTXD ( txd, 1515 ) dff = engineLoadDFF ( "1.dff" ) engineReplaceModel ( dff, 1515 ) col = engineLoadCOL( "1.col" ) engineReplaceCOL( col, 1515 ) engineSetModelLODDistance(1515, 300) Edited August 7, 2018 by Elvis Willian Link to comment
Moderators IIYAMA Posted August 7, 2018 Moderators Share Posted August 7, 2018 48 minutes ago, Ryosuke said: Hi, I modeled a map and would like to break the field-of-view limit. there is a limit of 300 units of the distance object, how can I make to make all objects visible from a greater distance? txd = engineLoadTXD ( "1.txd" ) engineImportTXD ( txd, 1515 ) dff = engineLoadDFF ( "1.dff" ) engineReplaceModel ( dff, 1515 ) col = engineLoadCOL( "1.col" ) engineReplaceCOL( col, 1515 ) engineSetModelLODDistance(1515, 300) See example on wiki: https://wiki.multitheftauto.com/wiki/SetLowLODElement Link to comment
MTA Anti-Cheat Team Dutchman101 Posted August 7, 2018 MTA Anti-Cheat Team Share Posted August 7, 2018 Useful: https://wiki.multitheftauto.com/wiki/AssignLod 1 Link to comment
Ryosuke Posted August 8, 2018 Author Share Posted August 8, 2018 3 hours ago, Dutchman101 said: Useful: https://wiki.multitheftauto.com/wiki/AssignLod Thank you very much, it helped me solve a big problem. 5 hours ago, IIYAMA said: See example on wiki: https://wiki.multitheftauto.com/wiki/SetLowLODElement Thanks Link to comment
Captain Cody Posted August 8, 2018 Share Posted August 8, 2018 @Ryosuke https://github.com/CodyJL/JStreamer If that's criminal Russia you are trying to port I have a full conversion already for it. Link to comment
Ryosuke Posted August 8, 2018 Author Share Posted August 8, 2018 1 minute ago, CodyJ(L) said: @Ryosuke https://github.com/CodyJL/JStreamer If that's criminal Russia you are trying to port I have a full conversion already for it. It is not my friend. this map I'm modeling especially for mta sa I plan to use it for an open world racing server Link to comment
Discord Moderators Pirulax Posted August 9, 2018 Discord Moderators Share Posted August 9, 2018 I'd small models, because I suppose you have just a big model, and thats the whole map, which isn't a good idea, because this way the inbuilt streamer really does nothing. Link to comment
stijnleferink Posted August 11, 2018 Share Posted August 11, 2018 On 8-8-2018 at 03:23, CodyJ(L) said: @Ryosuke https://github.com/CodyJL/JStreamer If that's criminal Russia you are trying to port I have a full conversion already for it. yes please Link to comment
Senna Posted August 11, 2018 Share Posted August 11, 2018 On 08.08.2018 at 01:00, IIYAMA said: See example on wiki: https://wiki.multitheftauto.com/wiki/SetLowLODElement I also tried to use this, but unfortunately it doesn't work. Even, objects don't create (normal and lod) and debugscripting doesn't give any errors. Link to comment
MTA Anti-Cheat Team Dutchman101 Posted August 11, 2018 MTA Anti-Cheat Team Share Posted August 11, 2018 1 hour ago, Senna said: I also tried to use this, but unfortunately it doesn't work. Even, objects don't create (normal and lod) and debugscripting doesn't give any errors. I don't really work with LOD's very often so not sure about your problem (could open a new topic in this section to see why something that should work isn't with your code), but I advise you to just use assignLod. Also take a look at; engineSetModelLODDistance Let me know if assignLod works out for you 1 Link to comment
Senna Posted August 11, 2018 Share Posted August 11, 2018 36 minutes ago, Dutchman101 said: I don't really work with LOD's very often so not sure about your problem (could open a new topic in this section to see why something that should work isn't with your code), but I advise you to just use assignLod. Let me know if this works out for you Thank you. I'll try this method and let you know works it or doesn't Link to comment
Senna Posted August 11, 2018 Share Posted August 11, 2018 (edited) @Dutchman101 It works! Thank you. One more problem.. I have more than 6.000 objects. Objects contained in a table. Can I apply function assignLod to the table? Oh no unfortunately it is't possible because in the table objects don't create through createObject Edited August 11, 2018 by Senna Link to comment
MTA Anti-Cheat Team Dutchman101 Posted August 11, 2018 MTA Anti-Cheat Team Share Posted August 11, 2018 23 minutes ago, Senna said: @Dutchman101 It works! Thank you. One more problem.. I have more than 6.000 objects. Objects contained in a table. Can I apply function assignLod to the table? Oh no unfortunately it is't possible because in the table objects don't create through createObject The first 2 pages of results on https://www.google.com/search?q=mta+map+to+lua contain quite a few useful .map to lua createObject converters. I would just append the function embed and eventhandler, and automatise embedding the assignLod call; if you got a huge table of objects it's most convenient to use something like Notepad++, CTRL + F, replace tab, input (find what): "createObject" and replace with: "assignLOD(createObject" and then hit "Replace all". After that, you just add the assignLod function code at the bottom. And yes, applying assignLod to a table itself shouldn't be a problem. 1 Link to comment
Senna Posted August 11, 2018 Share Posted August 11, 2018 53 minutes ago, Dutchman101 said: The first 2 pages of results on https://www.google.com/search?q=mta+map+to+lua contain quite a few useful .map to lua createObject converters. I would just append the function embed and eventhandler, and automatise embedding the assignLod call; if you got a huge table of objects it's most convenient to use something like Notepad++, CTRL + F, replace tab, input (find what): "createObject" and replace with: "assignLOD(createObject" and then hit "Replace all". After that, you just add the assignLod function code at the bottom. And yes, applying assignLod to a table itself shouldn't be a problem. wow thanks. I tried trick with "replace all" and it's work. But objects create on server side. Does it bring any lags? P.S scripts creates approximately 6.000 objects Link to comment
MTA Anti-Cheat Team Dutchman101 Posted August 11, 2018 MTA Anti-Cheat Team Share Posted August 11, 2018 26 minutes ago, Senna said: But objects create on server side. Does it bring any lags? The object creation is a server-side script, and it's supposed to create the objects only once. So if there is any lag at all, it would only be at the start of MTA server and before any players join, or maybe when you restart the resource due to changing something in the resource. It's not heavier than regular .map files though as far I know, so it shouldn't really have additional impact to begin with. 1 Link to comment
Senna Posted August 12, 2018 Share Posted August 12, 2018 @Dutchman101 However, CreateObject has 2 big disadvantages. They are lack of scaling and doublesizing Link to comment
Captain Cody Posted August 12, 2018 Share Posted August 12, 2018 Only assign LODs to what is needed. If you assign LODs to everything it will bring lag and your draw distance will be horrible. 1 Link to comment
MTA Anti-Cheat Team Dutchman101 Posted August 12, 2018 MTA Anti-Cheat Team Share Posted August 12, 2018 7 hours ago, Senna said: @Dutchman101 However, CreateObject has 2 big disadvantages. They are lack of scaling and doublesizing use SetObjectScale and setElementDoubleSided after creation.. the .map to LUA converter at http://mta.cemgokmen.com/converter/converter.php even features keeping scale and doublesizing information, for easy applying in batch. If you prefer tho, you can easily go back to using .map and utilize the LOD functionality in mapEditorScriptingExtension_s and mapEditorScriptingExtension_c (a common mistake of mappers is not retaining these files, or not using the neccesary setting "useLODs" on affected maps) 1 Link to comment
Senna Posted August 13, 2018 Share Posted August 13, 2018 14 hours ago, Dutchman101 said: use SetObjectScale and setElementDoubleSided after creation.. the .map to LUA converter at http://mta.cemgokmen.com/converter/converter.php even features keeping scale and doublesizing information, for easy applying in batch. If you prefer tho, you can easily go back to using .map and utilize the LOD functionality in mapEditorScriptingExtension_s and mapEditorScriptingExtension_c (a common mistake of mappers is not retaining these files, or not using the neccesary setting "useLODs" on affected maps) I tried to add id to the lod table in mapEditorScriptingExtension_s, but it doesn't have any effect About map converter: How to add AssignLod function to the code which converter gives? https://pastecode.xyz/view/8905019f Sorry for disturbing and thank you for your help Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now