Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing range affects generated mesh
#1
Hi _Aka_,

I noticed that changing the range of the Shape Extrusion node causes the cross shape of the generated mesh to change as well. The change is very subtle, but it does affect my use case. I am generated multiple meshes with different ranges overlayed on top of each other using the same spline path. Here's a video of it in action:

Video: https://imgur.com/GD4a3fZ
Chehttps://imgur.com/GD4a3fZ
Check this part of the video:
[Image: 4XaXRke.png]

Thanks as always!
Reply
#2
Hi
The extruded polygonal shape is only an approximation of the perfect geometrical shape that represents the extrusion. The less polygons, the worst the approximation is. In the video you send, the shape of the last couple of polygons (the last quad) matchs more or less the perfect shape depending on its length, and that's normal. The important thing is that when an extrusion is made of multiple parts, those parts match with each other. This is illustrated in the scene I attached to this post. It contains 3 generators, one that make generates a full mesh, and the two others that generate the same mesh but in two parts. Both shapes are coherent.
If you increase the resolution of the extrusion and/or disable the Optimize option and/or reduce the optimization's Angle Threshold, the generated mesh will have more polygons making what you described less pronounced.
Did I answer your question?
Have a nice day


Attached Files
.unity   GameJazz Change of shape.unity (Size: 94.84 KB / Downloads: 1)
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
(08-12-2022, 05:03 PM)_Aka_ Wrote: Hi
The extruded polygonal shape is only an approximation of the perfect geometrical shape that represents the extrusion. The less polygons, the worst the approximation is. In the video you send, the shape of the last couple of polygons (the last quad) matchs more or less the perfect shape depending on its length, and that's normal. The important thing is that when an extrusion is made of multiple parts, those parts match with each other. This is illustrated in the scene I attached to this post. It contains 3 generators, one that make generates a full mesh, and the two others that generate the same mesh but in two parts. Both shapes are coherent.
If you increase the resolution of the extrusion and/or disable the Optimize option and/or reduce the optimization's Angle Threshold, the generated mesh will have more polygons making what you described less pronounced.
Did I answer your question?
Have a nice day

Thank you for providing the example. 

"The important thing is that when an extrusion is made of multiple parts, those parts match with each other."
This only happens when the start/end of the range falls perfectly on the start/end of a new polygon. If the range is changed, you can see that the extrusion shapes don't match. This is problematic for the use case where gaps are needed in overlapping extrusions. I attached a screenshot to elaborate. Thanks again for your help!

[Image: uNnxQDK.png]
Reply
#4
I see. Can you please send me that scene?
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
(08-12-2022, 07:03 PM)_Aka_ Wrote: I see. Can you please send me that scene?

Sure. It's the same scene you sent me. I only changed the range parameter


Attached Files
.unity   GameJazz Change of shape.unity (Size: 127 KB / Downloads: 1)
Reply
#6
Hi



Here is an basic drawing explaining the phenomena you are highlighting:

   

In black is a spline

In blue annotations, showing 4 points, each one corresponding to a range value.

In red and green two extrusions with minimal polygon count. This is an exaggerated case, but it is perfect to show the phenomenon.

As you can see, when you change the range of the extrusion (red vs green), the extruded shapes will diverge and not overlap each other. This issue is less present when you increase the polygon count. Besides increasing the polygon count, the other solution is to make the full extrusion made of several smaller ones, to match the shape of the partial extrusions you already have. This is what I done in the attached scene. Now Total is made of 3 parts, 2 of which matching your partial extrusions, and one matching the gap. That way, everything overlaps.

Did this help?
Have a nice day


Attached Files
.unity   GameJazz Change of shape 3.unity (Size: 147.39 KB / Downloads: 1)
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#7
(08-16-2022, 12:16 PM)_Aka_ Wrote: Hi



Here is an basic drawing explaining the phenomena you are highlighting:



In black is a spline

In blue annotations, showing 4 points, each one corresponding to a range value.

In red and green two extrusions with minimal polygon count. This is an exaggerated case, but it is perfect to show the phenomenon.

As you can see, when you change the range of the extrusion (red vs green), the extruded shapes will diverge and not overlap each other. This issue is less present when you increase the polygon count. Besides increasing the polygon count, the other solution is to make the full extrusion made of several smaller ones, to match the shape of the partial extrusions you already have. This is what I done in the attached scene. Now Total is made of 3 parts, 2 of which matching your partial extrusions, and one matching the gap. That way, everything overlaps.

Did this help?
Have a nice day

Thank you for the explanation. This workaround should work for my current use case. In the future, are there any plans to generate the partial extrusion based on the shape of the full extrusion?
Reply
#8
Hi
No plans to do so, because doing so will go against other constraints. For example, imagine someone sets a constant mesh resolution of one polygons row every meter, then sets the length of the partial extrusion to 1.5 meters (out of a 2 meters spline). The 2nd row will be only half meter long. If the extrusion is on the full spline, the second row will be 1m long, and will not match the shape of the 0.5m long row. If we apply what you suggested, the shapes will match, but the total extrusion will have 3 rows, the first one of 1m length, and the two other of 0.5m length each, breaking the constraint of having 1m long rows.
I hope my explanation was clear.
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
Video Scale Mesh at ControlPoints harshad 3 8 Yesterday, 02:11 PM
Last Post: _Aka_
  Scale Deform Mesh Along Spline? / aligning colliders MamasToast 6 31 09-25-2022, 08:47 PM
Last Post: _Aka_
  Multiple Mesh Extrude Generator bakin 1 6 09-17-2022, 12:40 PM
Last Post: _Aka_
  Generate walls on non-uniformly scaled mesh GameJazz 7 15 08-16-2022, 11:50 AM
Last Post: _Aka_

Forum Jump: