Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best practice for mass-object instancing along 100km spline (railways) plus streaming
#2
Hi,
There are a lot of trails that I need to follow to give you a complete answer. I will for now answer just partially, and will try to enrich my answer as soon as I test more things.
I am assuming that you are instancing the objects via the Curvy generator (CG for short), using the Volume Spots module.

1- how much time does it take for you to generate the 50 000 object via Curvy. I tried with cubes, and it took few seconds, but I guess in your case it takes a lot more.

2- Each one of those thousands of objects gets renamed by Curvy Generator, to make it easier to work with them. You might want to skip that renaming step. It will save you CPU time and memory. Go to CGModule.AddManagedResource, and comment the RenameResource method call.

3- Are you working with prefabs? When instancing prefabs using CG, that prefab link gets broken. This is something that I will fix in the next update. A user told me that keeping that prefab link should speed up the instanciation process. I haven't tested this yet.

4- the Curvy Generator is here to make things easier to work with. That ease of use comes with CPU overhead. If you want are willing to sacrifice the ease of work, just create your own script that will sample points on the spline and place objects on them. If you don't know where to start with this let me know.

5- About GPU instancing, I had a discussion with a user in Unity's forum about this. Please read the posts starting from this one: https://forum.unity.com/threads/released-curvy-2-the-ultimate-spline-solution.358011/page-10#post-4157050

6- The is no limitation on the number of Control Points

Please let me know if you have any other questions.
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
RE: Best practice for mass-object instancing along 100km spline (railways) plus streaming - by _Aka_ - 09-05-2019, 01:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 14 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: