Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a way to generate UVs along deformed and copied mesh?
#1
My team is using a curvy generator to create cables by duplicating and deforming a single mesh segment along a spline. That gets baked down into one static mesh with a custom shader.

I'd like to be able to access the data about the meshes "progress" along the curve in the shader. Either with another set of UVs that maps 0 - 1 to the progress along the curve, a single color channel that does the same, or an index of the mesh copy. Are any of these possible?
Reply
#2
Hi,

The deformed meshes do not add any additional data to meshes, it only modifies the vertex coordinates.

In Curvy\Scripts\CG Modules\DeformMesh.cs, you will find a DeformMeshes method. This is where the deformation is done. Inside of it, when computing the data for a vertex, there is a local variable vertexF which contains the data you need. You can modify the code to override the UV2.y value of each data with that value.

Did this help?

PS: I assumed that in your team there are programmers able to do the described modification. If you prefer, you can commission me to implement the feature.
Please consider leaving a review for Curvy Splines, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Replace deform mesh on volume spots Kokoriko49 1 2,477 06-09-2025, 06:49 PM
Last Post: _Aka_
  Mesh Generation between two splines vatan 4 3,921 02-14-2025, 07:11 AM
Last Post: vatan
  Create Mesh Node, Make Static Options rickgplus 1 1,962 01-23-2025, 10:12 AM
Last Post: _Aka_
  Extrude mesh along spline. New and confused user GhostStalker 3 3,239 01-02-2025, 09:58 AM
Last Post: _Aka_

Forum Jump: