Making a river, varying width along path


09-09-2013 21:21:28

I'm trying to create a river where the width of the river should be different for each point along the path.
How could i achive this? Multishape? :?


09-09-2013 22:41:09

Ok now i found the scale track thing, can't get to scale the way i want it.

For each point in path i also add a certain scale "point" to my "scale spline" that i then convert to scale track.
The rivers scales now, but i looks like i get the same scale everywhere. :/

for (int i = 0; i < worldRiver.segmentList.size(); i++)
int addPoint = i % 4;

if (addPoint == 0)
spline.addPoint(worldRiver.segmentList.start.x, pSurfaceManager->getHeightAt(worldRiver.segmentList.start.x, worldRiver.segmentList.start.y), worldRiver.segmentList.start.y);

scaleTrack = scaleSpline.realizeShape().convertToTrack(Procedural::Track::AM_POINT);


27-09-2013 23:23:29

That's because when you define
the first parameter must correspond to the point of the path where you want to define scale ("i"), and the second is the scale (worldRiver.segmentListWidth).

From the documentation:
AM_POINT : the key represents the index of a point in the main curve.