Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Blueprint and Bind on runtime
#3
Quote:Blueprints are ScriptableObjects and can be saved in the project as an asset using AssetDatabase.SaveAsset. Once saved you can reuse them as much as you want. If you're doing this outside the Unity editor, then you need to serialize the data contained in the blueprint in a custom format of your choice, this is entirely up to you (just like you'd do for save game data for a game, for instance).

Yes, the idea is to serialize the data for a save/load system so that's great, I'll start doing it right away.

Quote:As it is, not really. Binding a mesh to a set of particles requires generating vertex skinning data for all vertices in the mesh, so you have to iterate trough all vertices no matter how you do it. If really in need of a faster binding algorithm, you could write a multithreaded version or even move it to compute shaders, but that's outside the scope of Obi.

All my attempts to create a compute shader that does whatever fails miserably. So I'll try to make a version for multithread, but with being able to save the blueprints I'm happy.

Quote:Unless you have lots of meshes, a blueprint with 500-900 particles should not take too long to generate.
If about 40 seconds in the best case (It was a little more until I modified the timestep) But that's the best I could do already compiled

Quote:Not sure how calling a coroutine may avoid crashes/errors? In fact both methods call the exact same code, all the immediate method does is advance the coroutine one in a while loop like this:

With the immediate method it gives me a massive drop in fps and sometimes (few) the game just crashes. Maybe it's the testing machine, when I finish other things I'll try in the main one or maybe my old code was garbage lol

Thanks for all the responses Sonrisa
Reply


Messages In This Thread
Blueprint and Bind on runtime - by SimonP - 03-03-2023, 11:52 AM
RE: Blueprint and Bind on runtime - by josemendez - 03-03-2023, 12:27 PM
RE: Blueprint and Bind on runtime - by SimonP - 03-03-2023, 06:31 PM