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...st-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
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
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
  Best way to duplicate a spline with an offset Kapistijn 8 1,365 04-12-2026, 03:18 PM
Last Post: _Aka_
Smile Constant speed along a spline? tfishell 1 661 11-13-2025, 11:32 AM
Last Post: _Aka_
  Create Game Object Renaming Options rickgplus 1 937 09-23-2025, 09:33 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,464 07-29-2025, 09:15 PM
Last Post: _Aka_

Forum Jump: