It_Is_Rain Posted October 1, 2017 Share Posted October 1, 2017 Hey guys, so, yeah, im a somewhat active member here, dont really post, rather just playing occasionally, but this annoys me quite a lot. So, the draw distance. Im sure many of us play this game with current gen graphics cards, or even if its not current gen, basically the average PC is more than enough to run MTA. Yet we dont have draw distance for MTA models that is more than like 10 car lenght sometimes. Especially barrels and stuff like that, load so close you cannot even avoid it at higher speeds. (and trollmaps love this) So, i've made a really easy scirpt example, im sure you could do this as well, but yet still it isnt on the server. You currently have however a farclip script which is nice, i was thinking the same integration of this script as well. So, lets talk about What this script does is basically cloning every single object on the map as a LOD object. LOD objects dont have collisions, therefore not hooking CPU as much, but they can be rendered from higher distances, up to 5x times further than non LOD objects, making it possible to actually be amazed how cool maps look from distance. Ofc the slider would be here so people with weaker PC can lower the value, or even disable this completly. But so far, i havent noticed any FPS drop on my system.(i have a really weak outdated i5 maxed at 3.4ghz) I attached a file, if you want me to make it as proper function feel free to tell, i didnt do it because im sure you have unique way of itegratin this anyway. client.lua r0cK, BlueYoshi97, Quad_Tube and 3 others 1 5 Quote Link to comment
r0cK Posted October 2, 2017 Share Posted October 2, 2017 This seems like a real nice feature! Quad_Tube 1 Quote Link to comment
hulpje Posted October 2, 2017 Share Posted October 2, 2017 Wouldn't this script re-render every object every map again and again? Quad_Tube 1 Quote Link to comment
It_Is_Rain Posted October 2, 2017 Author Share Posted October 2, 2017 Just now, hulpje said: Wouldn't this script re-render every object every map again and again? What it does is clones all the objects as LOD's of themselves. By default MTA Objects dont use lods, thats why they cant be seen from the distance. SA objects use their LODS so they can be seen from further away. Ofc, this script should always clear the objects before making new ones, so, for example, on every map start, it should delete every single object it created, which can be done, if they are saved in a table. Quad_Tube 1 Quote Link to comment
BlueYoshi97 Posted October 2, 2017 Share Posted October 2, 2017 Awesam! Let's implement this ASAP! Quote Link to comment
Maher Posted October 3, 2017 Share Posted October 3, 2017 Looks nice, but requires a good PC so we could prevent fps drop I like it Quote Link to comment
tyfusjap Posted October 3, 2017 Share Posted October 3, 2017 my pc would explode if this is added Quote Link to comment
It_Is_Rain Posted October 3, 2017 Author Share Posted October 3, 2017 you not necessarily need to use it. this could be adjusted with a slider, just as farclip is. Quote Link to comment
waspy. Posted October 3, 2017 Share Posted October 3, 2017 On 10/1/2017 at 8:19 AM, Iwasawa said: Especially barrels and stuff like that, load so close you cannot even avoid it at higher speeds. True. Barrels and lampposts, it all comes suddenly if I’m in high speed, making it hard to avoid. (Idk if it happens to everyone but on my laptop it’s like that.) Quad_Tube 1 Quote Link to comment
SDK Posted October 3, 2017 Share Posted October 3, 2017 Well you got me intrigued so I added a quick command in the test resource. Everyone can test it out. You need to do it on every map. /lodrange 300 Works really great on titten 2 @hulpje This is the code (yes only one line sue me im a vago) addCommandHandler('lodrange', function(p,dis) for k,v in ipairs(getElementsByType'object') do engineSetModelLODDistance(getElementModel(v), tonumber(dis)) end end) I don't think you need to create a new object @Iwasawa, engineSetModelLODDistance only increases the distance attribute of an object before the lod is loaded (or becomes invisible if no LOD), it doesn't make it a LOD object. Great job though, nice thinking. Quad_Tube, BlueYoshi97, Cena and 1 other 1 3 Quote Link to comment
It_Is_Rain Posted October 3, 2017 Author Share Posted October 3, 2017 9 minutes ago, SDK said: Well you got me intrigued so I added a quick command in the test resource. Everyone can test it out. You need to do it on every map. /lodrange 300 Works really great on titten 2 @hulpje This is the code (yes only one line sue me im a vago) addCommandHandler('lodrange', function(p,dis) for k,v in ipairs(getElementsByType'object') do engineSetModelLODDistance(getElementModel(v), tonumber(dis)) end end) I don't think you need to create a new object @Iwasawa, engineSetModelLODDistance only increases the distance attribute of an object before the lod is loaded (or becomes invisible if no LOD), it doesn't make it a LOD object. Great job though, nice thinking. Actually, you have to make a new object, i tested that. The problem is, if you make an object as LOD it wont have collisions and stuff, but i can be loaded from 5x300(max distance). If you dont create it as lod, it can only be loaded from 300units and has collisions. So, you have to create a LOD for every object. Sadly. It would be nice if MTA could use the LODS that are in the model file, just as GTA uses them on originally placed objects. Quad_Tube 1 Quote Link to comment
BlueYoshi97 Posted October 5, 2017 Share Posted October 5, 2017 This works so well. Better yet, no race player reads this topic so I can use this command to my advantage. Choma 1 Quote Link to comment
Guest F1MADKILLER Posted October 5, 2017 Share Posted October 5, 2017 22 minutes ago, BlueYoshi97 said: This works so well. Better yet, no race player reads this topic so I can use this command to my advantage. HACKS! Shall 1 tag a race player Yoshik so your secrets will be up Quote Link to comment
BlueYoshi97 Posted October 15, 2017 Share Posted October 15, 2017 @SDK Please implement this for the entire server Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.