#I forgot to add screenshots (I hope this
1 messages · Page 1 of 1 (latest)
the ent's code is <400 lines wtf
@torpid slate cool integration opportunity maybe?
Might be aids lol
yeah i was thinking the same, like was really expecting thousands of thousands loc accross multiple files and cases
but it's so readable, it's incredible
this guy knows 
Soft bodied physics ✅ shitverts I agree
glide_deformable_base?)
also I heard about octree, it can be used for optimiztion idk :P
ur addons are cool too
+-

Hmm
I wonder if it would be efficient to store each model's un-damaged vertex data in some global table and have the deformed meshes only store their offsets from that un-damaged data
For example, if you damaged an Entity's mesh in such a way that only two vertices were changed, you would only store those two vertices on the Entity which was damaged
That way you could have many Entities deforming the same base mesh without requiring a full copy of the entire mesh be stored on each Entity

yappie
What is this?
These are the vertices in the nearest Octree node / all the vertices of mesh
Much faster.
?
Honestly, I don't really see the point in updating the addon :/
if only we could use multithreading on gLua 
optimisation is always good lol
Big sandbox servers are very very demanding, it's always nice to have your addon not lag the server at all compared to say, player anims haha
I ended up optimizing the wrong part — I added an octree for no reason, even though that section was already fast (like 0.1 ms, and now it's >0.01 ms). The real issue was with BuildFromTriangles, though I'm still not sure even meshBegin is the bottleneck. Honestly, the FPS only started dropping with more than 32,000 vertices, so I guess it’s not that bad :P
Wasted time adding an octree, but good practicee
you want good performance testing stuff?
and this one https://github.com/wrefgtzweve/gmod_perfutils
specifically the red_sv_indexcounter command
might already be using those but red_sv_indexcounter let me get crazy perf gains on alot of my stuff
Are you calling build from triangles repeatedly?
Looks like each time it is deformed
You shouldn't need to do that
Once it is created, the IMesh can be modified directly using the mesh library.
You'll just need to call mesh.AdvanceVertex() repeatedly until you reach the vertex which needs to be modified
Then you can use mesh.Position to re-position the vertex
What're you doing that's causing this?
Subdivide