Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mesh Lines - Horizontal and Vertical Edges
#1
Dear Curvy support,

Using curvy in a production visualization project that requires rendering meshes as lines.  Is there a way to get a struct of horizontal and vertical lines that make up the generated mesh?

Cheers    
Reply
#2
Hi,
When generating meshes, Curvy Splines produces instances of Mesh. Using Unity's API, you can get the list of vertices and triangles of that mesh. From that, you can produce the list of lines making your mesh. Via dot product (or other means), you can deduce what lines are horizontal or vertical.
I hope this helped. If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day
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
(09-19-2020, 04:59 PM)_Aka_ Wrote: Hi,
When generating meshes, Curvy Splines produces instances of Mesh. Using Unity's API, you can get the list of vertices and triangles of that mesh. From that, you can produce the list of lines making your mesh. Via dot product (or other means), you can deduce what lines are horizontal or vertical.
I hope this helped. If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day

Are you creating the mesh with your own code or with unity?
Reply
#4
Curvy Splines uses Unity's API to create meshes. That way the produced meshes are compatible with all existing code and tools made for Unity's meshes.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#5
(09-19-2020, 05:03 PM)Krypton Wrote: Are you creating the mesh with your own code or with unity?

So in other words: with both my code and Unity
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#6
Great, can you show where I can extract this information directly from your code because we don't want generate the entire mesh with UV and triangles.  Just the edges.
Reply
#7
When generating a mesh through shape extrusion in the Curvy Generator, and if you don't want to work with the Unity mesh the Create Mesh module creates, you can get the relevant data from the Volume Mesh module. It has an output called V Mesh, an instance of the CGVMesh class. In it you can find the list of vertices and triangles.
The relevant work happens in BuildVolumeMesh.Refresh().
Each CG module has a On Before Refresh and an On Refresh events.
You can create your own custom CG module if needed: https://curvyeditor.com/documentation/ex..._generator
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#8
Can you suggest how to get the Horizontal and Vertical data from the Volume Mesh module.
I needed to integrate another asset called Procedural primitive with Linefy and he helped with getting the structs for Horizontal and Vertical edges.
Would you be able to give pointers of how this can be done also with Curvy's mesh generation code.

Thanks in advance.
Will also leave an awesome review for your help.
Reply
#9
Same as here:
(09-19-2020, 04:59 PM)_Aka_ Wrote: Using Unity's API, you can get the list of vertices and triangles of that mesh. From that, you can produce the list of lines making your mesh. Via dot product (or other means), you can deduce what lines are horizontal or vertical.
To get vertices : CGVMesh.Vertex.To get triangles CGVMesh.SubMeshes.Triangles
Examples of "other means": check the value of Vector3.Angle(Vector3.up, yourVector)
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#10
"Extending the Curvy Generator is the most sophisticated way to extend Curvy, but the most fun part, too! Though not rocket science, you'll need a good understanding of the Generator internals to successfully write quality modules."

Do you have more detailed documentation of how the Generators internals work?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Replace deform mesh on volume spots Kokoriko49 1 1,879 06-09-2025, 06:49 PM
Last Post: _Aka_
  Mesh Generation between two splines vatan 4 2,814 02-14-2025, 07:11 AM
Last Post: vatan
  Maintaining vertical orientation of extruded meshes rickgplus 3 1,873 01-24-2025, 09:24 PM
Last Post: _Aka_
  Create Mesh Node, Make Static Options rickgplus 1 1,466 01-23-2025, 10:12 AM
Last Post: _Aka_

Forum Jump: