Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Circle shape spline normals are not straight ?
#1
Hello, I just got the asset !

I realised that the basic circle shape you can choose when using a generator has angled normals, which is quite problematic in my use case, because I need to displace the mesh vertices according to straight normals. Is there any reason for that, and/or any solution ?

Thanks a lot !

Vincent.

EDIT : Here's an image to make things more clear. As you can see, the normals are not pointing towards the circle center.

[Image: ice-screenshot-20210501-000806.png]
Reply
#2
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
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
(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
#4
Hi
A proper solution would be a fix that would work for all spline types. This is on my todo list, but I have some other tasks planned before that one. So what I am going to do is to provide you with a quick-fix that would work with Bezier splines only. I believe you are using a Bezier spline for your circle, right?
Do you have any deadline regarding this issue?
And sorry for the issue in the first place.
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#5
And by the way, one of those tasks higher on the todo list is mesh deformation. It will be part of Curvy Splines 8.0.0
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#6
(05-02-2021, 07:46 AM)_Aka_ Wrote: Hi
A proper solution would be a fix that would work for all spline types. This is on my todo list, but I have some other tasks planned before that one. So what I am going to do is to provide you with a quick-fix that would work with Bezier splines only. I believe you are using a Bezier spline for your circle, right?
Do you have any deadline regarding this issue?
And sorry for the issue in the first place.
Have a nice day

Thanks a lot ! I'm not sure it's bezier (I just took the default circle from the shape component), but if it's not I can easily change it. I don't have any short term deadline for it. But thank you, tha fix will really be appreciated.

Have a nice week-end
Reply
#7
Hi
A small update: The cause is different than what I initially thought. The fix will take more time than initially thought, but hopefully the fix will be ready by end of this week.
Thanks for your patience, and have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#8
Update: I send you a fix in a PM
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#9
(05-06-2021, 12:55 PM)_Aka_ Wrote: Update: I send you a fix in a PM

Awesome ! Thank you Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Spline Shape not centering around Spline Path tfunitydev 3 121 05-13-2021, 08:50 AM
Last Post: _Aka_
  Get position on spline relative to world position Mos Def 5 120 05-10-2021, 07:35 PM
Last Post: _Aka_
Question Smoothly animate spline growth. boriskourt 3 172 04-26-2021, 08:29 AM
Last Post: _Aka_
  Create spline at run time AnAppGames 2 182 04-20-2021, 07:14 PM
Last Post: _Aka_

Forum Jump: