I’m now working for a while on a personal project which is sort of a point cloud renderer and I’m afraid I need your help right now ^^
So far I’m using UPaperGroupedSprites which gave me very good performance because of the instancing approach.
Now I have the following problem: I want to update the rotations and sizes of the individual instances in a efficient manner; the problem is that I, in the end, want to have streaming point clouds, so I have to update the whole dataset (up to millions of instances) basically every frame. So the performance of the scaling/rotating is really crucial.
Unfortunately, all of them throw exceptions and I don’t know why. Can someone maybe explain the usage? I can of course provide you the full source code as well.
One last thing: I also thought about doing the scaling/rotating directly in the sprite shader (because its probably the fastest way) - do you guys think thats possible?
I can pretty much promise you straight away, that calling those functions for millions of objects will probably ruin your performance regardless. Hell just updating transforms for a few hundred objects is expensive enough as it is. When you start talking about millions of objects, even function call overhead starts to become an issue. Unreal doesn’t scale to that kind of component count (and it’s not designed to).
Scaling and Rotating in the material will most likely be faster, but you still have to pass that information to the material somehow and sending parameters isn’t that cheap either. You’ll be better off doing something on the GPU and in the renderer directly, with heavy use of instancing.
nothing more. The other function calls on the Component, such as SpriteComponent->AddInstanceWithMaterial(…) etc. work. Thanks again for your help, I really appreciate it! Please let me know if you have some other ideas cause I’m quite desperate right now! …