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
  New version Broke my Generator after each compilation UsernameHed 6 303 10-14-2019, 08:42 AM
Last Post: UsernameHed
  Editing Multiple Generator Variables easily Horibe 2 110 09-25-2019, 05:12 AM
Last Post: Horibe
  Change Shape Extrusion of Generator by code UsernameHed 5 546 09-20-2019, 03:14 PM
Last Post: _Aka_
Information Curvy 6.0.1 is live _Aka_ 0 97 09-09-2019, 11:56 AM
Last Post: _Aka_

Forum Jump: