{{description>Discover the power of Curvy Generator modules and their ability to accept, process and return generated data between each other.}} ====== Modules ====== Modules are the working horse of Curvy Generator. A module usually accepts some data that was generated by another module. You create relations between modules by linking a module's output slot to another module's input slot. A module slot can be optional or accept/generate arrays. ===== OnRequestProcessing ===== In general, data flows from a parent module (output) to a subsequent module (input). As an exception from this rule, there are modules implementing the IOnRequestProcessing interface. Unlike normal modules, these modules get a request from a subsequent module, then start their processing and return data. This allowes modules to exchange request parameters with their parent module and receive specific data. This is most useful for data that is resolutionless by nature (like [[..:datatypes#Shape]] or [[..:datatypes#Path]]) to receive details about the needed rasterization options: The moment a module wants a path, it sends a request including parameters (From/To/Resolution/etc..) "up the tree". The very first module implementing the IOnRequestProcessing then generates the requested data and send it down the tree like usual. Modules working this way have both their name and slots shown in green while regular modules accepting such a module have their corresponding input slot shown in green only ===== Module Colors ===== Module Titles shown in red aren't configured properly (i.e. a mandatory link is missing or the linked input module isn't configured), while green titles stands for modules implementing IOnRequestProcessing ===== Reference ===== **Module slot legend** * OnRequest - data will be requested by a module, i.e. [[#OnRequestProcessing]] * Optional Slot - slot can be linked for additional functionality * ArraySlot[] - slot accepting one or more links of the same data or generating an array of data See also: [[..:datatypes]] The following modules, listed by category, are provided: ==== Input ==== |< 80% >| ^ Module ^ Input ^ Output ^ Description ^ | [[inputsplinepath]] | | Path | Create a [[..:datatypes#Path]] from a CurvySpline | | [[inputsplineshape]] | | Shape | Create a [[..:datatypes#Shape]] from a CurvySpline | | [[inputspots]] | | Spots | Create a collection of fixed [[..:datatypes#Spots]] | | [[inputtransformspots]] | | Spots | Create a collection of variable [[..:datatypes#Spots]] | | [[inputmesh]] | | VMesh[] | Create [[..:datatypes#VMesh|VMeshes]] from Unity meshes | | [[inputgameobject]] | | GameObject[] | Create [[..:datatypes#GameObject|GameObjects]] from Unity GameObjects/Prefabs | ==== Modifier ==== |< 80% >| ^ Module ^ Input ^ Output ^ Description ^ | [[TRS|TRS Path]] | Path | Path | Translate, Rotate, Scale a [[..:datatypes#Path]] | | [[TRS|TRS Shape]] | Shape | Shape | Translate, Rotate, Scale a [[..:datatypes#Shape]] | | [[TRS|TRS Mesh]] | VMesh | VMesh | Translate, Rotate, Scale a [[..:datatypes#VMesh]] | | [[pathrelativetranslation]] | Path | Path | Translate a [[..:datatypes#Path]] relatively to it's lateral direction | | [[Mix|Mix Paths]] | Path, Path | Path | Combine two [[..:datatypes#Path|Paths]] | | [[Mix|Mix Shapes]] |Shape, Shape | Shape | Combine two [[..:datatypes#Shape|Shapes]] | | [[variablemix]] | Shape, Shape | Shape | Combine two [[..:datatypes#Shape|Shapes]] in a way that varies through a shape's extrusion | | [[conformpath]] | Path | Path | Project a [[..:datatypes#Path]] onto colliders/terrains | | [[deformmesh]] | VMesh[], Path or Volume, Spots[] | VMesh[], Spots | Deform a mesh following a path | ==== Build ==== |< 80% >| ^ Module ^ Input ^ Output ^ Description ^ | [[shapeextrusion]] | Path, Shape | Volume, Volume (Hollow) | Extrude a [[..:datatypes#Shape]] along a [[..:datatypes#Path]] | | [[volumemesh]] | Volume | VMesh[] | Generate [[..:datatypes#VMesh]] from [[..:datatypes#Volume]] | | [[volumecaps]] | Volume, Volume[] | VMesh[] | Generate Volume Caps [[..:datatypes#VMesh|VMeshes]] | | [[rasterizepath]] | Path | Path | Rasterize a [[..:datatypes#Path]] | | [[volumespots]] | Path or Volume, Bounds[] | Spots | Clone objects along a [[..:datatypes#Path]] or [[..:datatypes#Volume]] | ==== Create ==== |< 80% >| ^ Module ^ Input ^ Output ^ Description ^ | [[CreateMesh]] | VMesh[], Spots | | Create Mesh resources from [[..:datatypes#VMesh|VMeshes]] | | [[CreateGameObject]] | GameObject[], Spots | | Instantiate GameObjects/Prefabs from [[..:datatypes#GameObject]] | | [[CreatePathLineRenderer]] | Path | | Feed a [[https://docs.unity3d.com/Manual/class-LineRenderer.html|Line Renderer]] with a [[..:datatypes#Path]] | ==== Convert ==== |< 80% >| ^ Module ^ Input ^ Output ^ Description ^ | [[gameobjecttomesh]] | GameObjects[] | VMesh | Create [[..:datatypes#VMesh|VMeshes]] from [[..:datatypes#GameObject|GameObjects]]| ==== Misc ==== |< 80% >| ^ Module ^ Input ^ Output ^ Description ^ | Note | | | Text notes | | Debug Volume | Volume | | Visualize a [[..:datatypes#Volume]] | | Debug VMesh | VMesh | | Visualize a [[..:datatypes#VMesh]] | | Debug Rasterized Path | Path | | Visualize a rasterized [[..:datatypes#Path]] |