[Closed] Why are helpers so slow compared to geometry objects?
If I make a helper plugin which makes a low-res sphere, with this getDisplayMesh function,
and I make a fair amount of them, it starts to REALLY lag (in the viewports, etc).
Whereas, I can make a larger amount of higher-res geometry spheres, and it will still be blazing fast!
on getDisplayMesh do
(
if (meshObj == undefined) then
(
meshObj = createInstance sphere radius:radius segs:12
lastRadius = radius
)
if radius != lastRadius then
(
meshObj.radius = radius
lastRadius = radius
)
meshObj.mesh
)
Is there any way I can make it faster?
hey man,
i asked the exact same question a few months ago, got no reply
http://forums.cgsociety.org/showthread.php?f=98&t=495498&highlight=extended
mark
Hey,
Heh, missed your thread. Guess I’m not the only one with the problem.
Hope Bobo knows
Hi guys, I don’t know for sure, but I think graphics cards are highly accelerated for geometry, whereas drawing lines is a little bit slower. It could be that or it could be that providing a mesh through MXS is just inherently slower than an actual c++ mesh object. I’d like to know the actual reason too.
hey d3coy,
i dont think its because drawing lines is faster… if you use the standard point hellpers or dummys there is no slow down even with hundreds of them,
i think it is most likely the “on getdisplaymesh” handler being called too often that cause the slow down, unfortunatly there doesnt seem to be another way to hand the plugin a mesh to use for drawing the lines…
Couldn’t you use a green sphere primitive with “display as wireframe” checked in its properties?
Like james already said, it’s probably because the regular primitives are compiled as C++ plugins, which obviously evaluate much faster. 16 times slower (as Mark noticed) is a bit much though…
Martijn