Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extending Curvy Generator for Advanced Lofting - Feasibility Check
#2
Hi

You can connect multiple Variable Mix Shapes together to blend more than 2 shapes. This has the advantage of not needing to code, but it is not the easiest to use.
Your suggested solution would be indeed easier to use, but will need coding.

Your solution should not be difficult to implement. You basically will have to replace lerping between two values, as it is now in Variable Mis Shapes, with weighted sum of the values.
Don't let yourself affraid with lines looking like this

positionsArray[i].x = aPosition.x + ((shapeBPositionsList[i].x - aPosition.x) * interpolationTime);
positionsArray[i].y = aPosition.y + ((shapeBPositionsList[i].y - aPosition.y) * interpolationTime);
positionsArray[i].z = aPosition.z + ((shapeBPositionsList[i].z - aPosition.z) * interpolationTime);

These are simply lerping between aPosition and shapeBPositionsList[i], but written in a manner that consumes less CPU.

About the inputs, the module has 2 inputes,
[HideInInspector]
[InputSlotInfo(
typeof(CGShape),
Name = "Shape A"
)]
public CGModuleInputSlot InShapeA = new CGModuleInputSlot();

[HideInInspector]
[InputSlotInfo(
typeof(CGShape),
Name = "Shape B"
)]
public CGModuleInputSlot InShapeB = new CGModuleInputSlot();

In your case, you will need something like

[HideInInspector]
[InputSlotInfo(
typeof(CGShape),
Name = "Shapes",
Array = true
)]
public CGModuleInputSlot InShapes = new CGModuleInputSlot();

You would probably need another input which will be a list of weights.

I hope this helped.
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


Messages In This Thread
RE: Extending Curvy Generator for Advanced Lofting - Feasibility Check - by _Aka_ - 03-26-2024, 01:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 1 12 04-03-2024, 03:16 PM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_
  Generating GO only on CPs in Generator GameDeveloperek4123 1 7 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: