You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very useful to more easily map the structure of any given transform to the PackedFloatArray structure used in multimesh buffer.
Because the PackedFloatArray expects the origin values and basis to be intersposed with each other, taking the transform apart requires many different operations/lines of code. The solution would be a method which takes a transform and returns a PackedFloatArray of the right size, with optional parameters allowing for the non-default packedarray sizes, to support customdata etc.
I'm working on a project where I need to update the positions of thousands of multimesh instances on any given physics tick, but the cost of assembling the PackedFloatArrays greatly outweighs the benefit of being able to use the multimesh set buffer command, even though it's supposed to be the more optimised/hot pathway. With my current implementation, using packedfloatarrays and set_buffer results in 5-7 FPS, whereas individually setting the transforms gives me 100-130fps.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be very useful to more easily map the structure of any given transform to the PackedFloatArray structure used in multimesh buffer.
Because the PackedFloatArray expects the origin values and basis to be intersposed with each other, taking the transform apart requires many different operations/lines of code. The solution would be a method which takes a transform and returns a PackedFloatArray of the right size, with optional parameters allowing for the non-default packedarray sizes, to support customdata etc.
I'm working on a project where I need to update the positions of thousands of multimesh instances on any given physics tick, but the cost of assembling the PackedFloatArrays greatly outweighs the benefit of being able to use the multimesh set buffer command, even though it's supposed to be the more optimised/hot pathway. With my current implementation, using packedfloatarrays and set_buffer results in 5-7 FPS, whereas individually setting the transforms gives me 100-130fps.
Beta Was this translation helpful? Give feedback.
All reactions