Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
One generator for multiple paths
#1
I am creating a road network using many different paths. I am using a generator to create the road, but if I want to change the generator, I would like it to affect all road paths. Right now I have to have a separate generator for each road path. Is there a way to have multiple paths input to a single generator?

Thanks!
Reply
#2
Yes, you can put all the generators into one. Here is the easiest way to do it:
- for all your generators, except one:
* open the generator window
* right click on an empty spot
* select all
* click on the save icon top right of the tool bar to save you selected modules as a template
- close the generator window then reopen it (to refresh the list of templates)
- open your last generator
- right click, and select "Add Template", and then add all your templates
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
Hi, thanks for your answer. I don't think that's achieving what i'm intending to do, so i'd like to explain a different way.

Please see attachment. Right now I can only input one spline path. Since I have many spline paths, I would like to input multiple without having to have a new generator and without having to duplicate the nodes in the graph editor. The problem with having a new generator is if I want to change a setting in the graph editor, i need to do it in every graph or I need to re-paste in all my templates. I also don't want to be managing separate generator gameobjects for every new road path I make ideally.

If this isn't possible, I may make an editor script that automatically updates generators from a single master generator or something. Thanks!


Attached Files Image(s)
   
Reply
#4
Hi,

(08-05-2018, 12:44 AM)justinms66 Wrote: The problem with having a new generator is if I want to change a setting in the graph editor, i need to do it in every graph or I need to re-paste in all my templates. I also don't want to be managing separate generator gameobjects for every new road path I make ideally.

We agree, there should be only one generator, it's easier to work with.
When I spoke about pasting templates, it was only to reach the point where all your graphs are merged in one, and not as a way to propagate your changes.
So once you have the modules that generates all your roads in one graph, there is indeed no way in current Curvy to link multiple Input Spline Path modules with the same Shape Extrusion module.

So your options are:
- Use a script like you suggested to modify all the modules of the same type on a graph.
- If you are willing to use some experimental code, I have a version of Volume Mesh module that takes mutliple volumes. You will still have to have a Shape Extrusion module per road. If this interests you, let me know and I will send it to you.
- Use one Curvy Generator object per road, make a prefab from that object, instantiate the prefab for each new road, and use Unity's prefab features to make all the roads use the same parameters.

Does this help?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#5
This helps a lot, thanks! Since I would still need to have a shape extrusion module per road for your experimental code, i'd rather go with one of the other options, but I appreciate the offer. You make a good point about prefabs. If I write a script i'll post it here in case it's useful to others. Thanks!
Reply
#6
You are welcome, and thank you for considering sharing the script you might write.
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
Information [Quick and dirty] Shape Extrusion: interpolate between multiple Crosses _Aka_ 4 366 07-27-2018, 02:09 PM
Last Post: _Aka_
  Bezier curve takes multiple frames to resolve freqout 6 978 04-20-2018, 03:19 PM
Last Post: _Aka_
  Generator node UI toolkit? mgstauff 3 440 04-09-2018, 06:36 PM
Last Post: _Aka_
  Mesh Generator, Hard / Faceted Edges? nomadigi 2 542 01-31-2018, 04:54 PM
Last Post: nomadigi

Forum Jump: