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
  Flip Shape On Generator Hitsu San 0 11 Yesterday, 11:27 AM
Last Post: Hitsu San
  Curvy not appearing in Unity 2019.2.14f1 bmacdonald1986 3 224 12-12-2019, 11:40 AM
Last Post: _Aka_
  Reuse Curvy Generator Wanderfalke 4 219 12-06-2019, 12:06 PM
Last Post: Wanderfalke
  Spawn object on Curvy Spline. ktpttd 3 296 11-20-2019, 01:38 PM
Last Post: _Aka_

Forum Jump: