[Include] Optidraw
#1

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
Reply
#2

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)
Reply
#3

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.
Reply
#4

Quote:
Originally Posted by Chaprnks
View Post
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).
Reply
#5

Quote:
Originally Posted by NaS
View Post
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
Reply
#6

What are the benefits of using this include?
Reply
#7

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.
Reply
#8

Like'd the concept you wrote it OnYSIStandart();
Reply
#9

Quote:
Originally Posted by algorhitmically
View Post
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.
Reply
#10

Good job! Keep it up.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)