Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make mesh appear only on curves?
#1
Hi there,

I'm working with Curvy Splines to make a track generator. I want to make the race curbs (the thing that has a white-red pattern) only appear on the curve zones, and disappear on the straight lines.

[Image: AptAPL1.png]

I'm trying to make a script that makes that, but I'm not getting it working. The API reference is just that, but there aren't many script examples out there.

Any suggestion will be appreciated, thanks in advance  Blush
Reply
#2
Hi
It seems that you didn't receive my answer to your email. Maybe it went into your spam folder? Here is the answer I send you in that email:

There is no out of the box tool for this. You can do this though using the API:

basically, you need first to divide your mesh to 3 meshes: the road, the left curbs, the right curb. You will use each mesh in a separate curvy generator. The road one will be on the full spline, but the curbs ones will apply only on the turns. Using the API,  you traverse the spline and detect the spline's tangent variation, in other words, you detect the track turns. Then you create or modify already created generators to make the generation of the curbs mesh applied only on the relevant part of the splines. The Range parameter in the Input Spline Path Rasterize Path module is key.

I hope this helped.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#3
Helpful methods:
CurvySpline.GetTangent
BuildRasterizedPath.From
BuildRasterizedPath.To
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Mesh Generation between two splines vatan 4 466 02-14-2025, 07:11 AM
Last Post: vatan
  Create Mesh Node, Make Static Options rickgplus 1 249 01-23-2025, 10:12 AM
Last Post: _Aka_
  Extrude mesh along spline. New and confused user GhostStalker 3 348 01-02-2025, 09:58 AM
Last Post: _Aka_
  Is it possible to make the face at the end of mesh? Chanon 3 266 11-14-2024, 04:38 PM
Last Post: _Aka_

Forum Jump: