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.
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply
#3
Helpful methods:
CurvySpline.GetTangent
BuildRasterizedPath.From
BuildRasterizedPath.To
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is it possible to make the face at the end of mesh? Chanon 3 6 11-14-2024, 04:38 PM
Last Post: _Aka_
  Mesh deform - baby guide jmh1804 7 11 08-22-2024, 07:18 AM
Last Post: _Aka_
  Incorrect mesh alignment after extrusion on curved path Thinkurvy 10 22 04-17-2024, 10:57 AM
Last Post: _Aka_
Heart Create beautiful curves ShiroeYamamoto 3 13 03-26-2024, 06:25 PM
Last Post: _Aka_

Forum Jump: