Posts: 11
Threads: 5
Joined: Aug 2019
09-24-2019, 01:57 PM
(This post was last modified: 09-24-2019, 05:39 PM by Wanderfalke.)
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.
Posts: 2,063
Threads: 88
Joined: Jun 2017
09-24-2019, 04:06 PM
(This post was last modified: 09-24-2019, 04:33 PM by _Aka_.)
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.
Posts: 11
Threads: 5
Joined: Aug 2019
(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 :-)
Posts: 2,063
Threads: 88
Joined: Jun 2017
Thanks
Please consider leaving a
review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.