Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reuse Curvy Generator
#1
Hello,
I have a lot of short splines with mesh generation and have some questions about curvy:

- I wondered if I can share the curvy generator for each of the spline and if this would make a performance benefit. Maybe using the api and adding new modules to the generator on the fly? Can I use the templates to do that?

- Would there be a problem if I disable the curvy spline after the generator has done it's job? I have a lot of splines and each of them is called by unitys update loop.

- How do I get to know, when the generator finished its job? Is there some kind of callback?

- Does it make sense, to make a mesh, that was generated at runtime from a spline, static?

Thank you in Advance,
H.
Reply
#2
Hi
1- Some CG modules qccept multiple inputes, some don't. Those who do have an array symbol near their input's name. When a module accepts multiple inputs, it is faster to use one for all inputs rather than one per input. When you can't use a module for multiple inputs, the solution would be to use the API to create as many as necessary on the fly.
1-b Templates manipulation is not available through the public API. Its code is in the editor part1 of Curvy, so not available at runtime.
2- I honestly don't know, and I can't test this for now (I am on vacation abrod, with no PC). If it does create an issue, dereference the spline from the generator.
3- CurvyGenerator.OnRefresh
4- At least it will potentially make physix compute things faster. If I were you, I would make it static even if generated at runtime. More about this here https://docs.unity3d.com/Manual/StaticObjects.html

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
#3
(09-24-2019, 04:06 PM)_Aka_ Wrote: Hi
1- Some CG modules qccept multiple inputes, some don't. Those who do have an array symbol near their input's name. When a module accepts multiple inputs, it is faster to use one for all inputs rather than one per input. When you can't use a module for multiple inputs, the solution would be to use the API to create as many as necessary on the fly.
1-b Templates manipulation is not available through the public API. Its code is in the editor part1 of Curvy, so not available at runtime.
2- I honestly don't know, and I can't test this for now (I am on vacation abrod, with no PC).  If it does create an issue, dereference the spline from the generator.
3- CurvyGenerator.OnRefresh
4- At least it will potentially make physix compute things faster. If I were you, I would make it static even if generated at runtime. More about this here https://docs.unity3d.com/Manual/StaticObjects.html

Have a nice day

Thank you for the fast repy!

Have a nice vacation :-)
Reply
#4
Thanks
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation Extending Curvy Generator for Advanced Lofting - Feasibility Check amutp 2 4 Yesterday, 07:25 AM
Last Post: amutp
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 0 4 Yesterday, 03:23 AM
Last Post: _Aka_
  Generating GO only on CPs in Generator GameDeveloperek4123 1 6 03-04-2024, 11:06 AM
Last Post: _Aka_
  Using Unity's SplineContainer in Curvy Splines dlees9191 3 14 02-26-2024, 09:49 AM
Last Post: _Aka_

Forum Jump: