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 will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Helpful methods:
CurvySpline.GetTangent
BuildRasterizedPath.From
BuildRasterizedPath.To
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  building game changes UV spaces for generated mesh scr33ner 9 11 01-18-2023, 09:16 AM
Last Post: _Aka_
  Way to make gameobject follow splines 'human-ly'? yun844 3 5 01-17-2023, 10:18 AM
Last Post: _Aka_
  Spline mesh optimization itsGama 6 14 01-13-2023, 04:49 PM
Last Post: _Aka_
  Volume Mesh bug based on whether input spline is closed GameJazz 2 10 12-15-2022, 08:32 AM
Last Post: GameJazz

Forum Jump: