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.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
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
  How to rotate generator asteroids patndan74 6 348 05-08-2025, 10:07 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 5 794 10-29-2024, 10:19 AM
Last Post: _Aka_
  I have to refresh generator manualy :( GameDeveloperek4123 4 578 10-07-2024, 05:36 PM
Last Post: _Aka_
  Bug: Save Generator Outputs still saves outputs if object is disabled curvymesher 1 287 08-30-2024, 09:19 AM
Last Post: _Aka_

Forum Jump: