[Include] Optidraw - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Optidraw (
/showthread.php?tid=672784)
Optidraw -
algorhitmically - 29.02.2020
General
Addon for Incognito's streamer.
This include will help you with map optimization.
Download: https://github.com/algorhitmically/optidraw
Required dependencies
[Streamer]
[Model-Sizes-Plus]
OR
[Model-Sizes-SQL]
Methods
These are optimization methods that you need to define before including optidraw:
METHOD_BOX
METHOD_SPHERE
Use
#define OD_METHOD your_method
Tips
Choose optimization method. Example: #define OD_METHOD METHOD_BOX
Include optidraw below streamer!
You can disable static objects with: #define OD_DISABLE_STATIC_OBJECTS
You can disable startup messages with: #define OD_DISABLE_STARTUP_MESSAGE
Re: Optidraw -
Chaprnks - 01.03.2020
90% of the time, I see a new post on the RSS feed from SA-MP forums & I think "yet another useless filterscript that should have been a snippet" or a mapping without the download link.. but I was pleasantly surprised! I'm glad someone took another stab at making a dynamic draw distance (the previous dates way back to 2013 I think, and has bugs.. like objects that are small only show within a foot of you). Going to test this out and get some good feedback on how well it works! Thanks again for the release!
EDIT:
I know that this plugin uses chunk based streaming, but is there a way to put a hard limit on the number of objects streamed in? Like having like 10 or so object slots reserved (for those invisible "player objects" like seen in /flymode filtercript)
Re: Optidraw -
algorhitmically - 01.03.2020
Thank you for your feedback - I really appreciate it. There is no warranty that this will work properly on every server but it's good to try both methods and there are few servers that are already using this and it's doing great job.
About the invisible objects, I think that there is no way to do that without doing data manipulation through streamer plugin itself. Maybe, you can create so-called player objects when the player connects and attach them to player or do whatever you want to do so they stay streamed for that player.
Re: Optidraw -
NaS - 04.03.2020
Quote:
Originally Posted by Chaprnks
EDIT:
I know that this plugin uses chunk based streaming, but is there a way to put a hard limit on the number of objects streamed in? Like having like 10 or so object slots reserved (for those invisible "player objects" like seen in /flymode filtercript)
|
The streamer only uses 500 of 1000 player objects by default. You can change that limit with Streamer_VisibleItems for all or specific players if needed.
Ontopic: Nice include. I'm using the diameter from CA_GetBoundingBox and multiply it by a value relative to the maximum diameter of all the object models that were used (which seems to give pretty similar results). I also use lower streaming priorities for non-collidables so they pop in last but that can bring some issues when a place gets too stuffed.
You could add an optional define to disable the static objects though, since on some maps you might use a lot of large flat objects in one place which would automatically prioritize those over other objects even though they may not be used as ground surface. If I use for example 250 large planes as invisible barriers, those 250 objects will exist permanently and lower the free slots available for streaming all other objects for no good reason.
You could additionally check rx/ry to see if they are used as ground or wall (in which case they don't need to be static).
Re: Optidraw -
algorhitmically - 04.03.2020
Quote:
Originally Posted by NaS
The streamer only uses 500 of 1000 player objects by default. You can change that limit with Streamer_VisibleItems for all or specific players if needed.
Ontopic: Nice include. I'm using the diameter from CA_GetBoundingBox and multiply it by a value relative to the maximum diameter of all the object models that were used (which seems to give pretty similar results). I also use lower streaming priorities for non-collidables so they pop in last but that can bring some issues when a place gets too stuffed.
You could add an optional define to disable the static objects though, since on some maps you might use a lot of large flat objects in one place which would automatically prioritize those over other objects even though they may not be used as ground surface. If I use for example 250 large planes as invisible barriers, those 250 objects will exist permanently and lower the free slots available for streaming all other objects for no good reason.
You could additionally check rx/ry to see if they are used as ground or wall (in which case they don't need to be static).
|
Thank you for advice! I have added an option in Update v1.0.1 so you can disable static objects in this include.
More info at: https://github.com/algorhitmically/optidraw
Re: Optidraw -
Uberanwar - 07.03.2020
What are the benefits of using this include?
Re: Optidraw -
algorhitmically - 07.03.2020
Well, if you have problems with object loading or you don't have time to optimize maps you can use this include and the job will be done for you. You don't need to care about cars and other items falling through the lining objects. Your objects will be drawn almost the same as default GTA objects.
Re: Optidraw -
Mobtiesgangsa - 07.03.2020
Like'd the concept you wrote it OnYSIStandart();
Re: Optidraw -
Uberanwar - 08.03.2020
Quote:
Originally Posted by algorhitmically
Well, if you have problems with object loading or you don't have time to optimize maps you can use this include and the job will be done for you. You don't need to care about cars and other items falling through the lining objects. Your objects will be drawn almost the same as default GTA objects.
|
Well done! Just tried it out yesterday, works flawlessly.
Re: Optidraw -
VasicFTW - 04.06.2020
Good job! Keep it up.