Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Circle shape spline normals are not straight ?
#3
(05-01-2021, 08:17 AM)_Aka_ Wrote: Hi
I believe this is due to how the normals and tangents are computed in Curvy: instead of implementing a tangent and normal formula for each one of the spline types supported by Curvy, a single method is used for all of the spline types which is based on the spline points' position (interpolation) formula. Unfortunately, the downside of this method is that, when building a normals cache (what is displayed in your screenshot), its precision depends on the cache density.
I am intending to eventually change the tangent/normal computing code to have a more precise, per spline type code, but until then, you can avoid this issue by increasing the cache density.
I hope this help
Please let me know if I can help further
Have a nice day

Hello, thanks a lot for the quick response !

Increasing the cache density did help with the shape normals, but not with the final extruded mesh's normal. Hopefully you can help me, I'm trying adapt the workflow I had with an old spline system : I make a tube with the same radius along the whole spline, then I use shader vertex displacement to simply move vertices inside using their normal vector. With the old system, I could easily get all the vertices to retract to the same position, effectively making the whole mesh disappear. I could then easily grow it again by reexpanding the vertices to their base position. If that's not clear, here's a small video of the effect (the mesh tapering is entirely done inside the shader, the spline mesh is only a tube with a constant radius) : https://twitter.com/ABeginnersDevB1/stat...6751892483

When I try to do the same with th curvy's extrusion generator, I get two issues : the first one is that there is a bit of normal weirdness around the seam, and the second one is that, since the normals are not perfectly straight (even when increasing the shape density to a ridiculous amount), the vertices never reach the same center position. You can see both of these issues here :

https://imgur.com/a/Cxizkyn

Is there any way to do that with curvy ? I guess it might at least be done with mesh deformation rather than extrusion, but as far as I know curvy doesn't do that yet, and I like mesh extrusion better as it will have the right definition no matter how long the spline is... I hope I was clear and that you can help ! Thanks again for the asset Smile
Reply


Messages In This Thread
RE: Circle shape spline normals are not straight ? - by VincentAalbertsberg - 05-01-2021, 09:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 14 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: