Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shape extrusion scaling
#3
(06-04-2022, 04:11 AM)tairoark Wrote: I thought I could read the spline cp and get their meta data in a before render event, then generate the curve that the Shape Extrusion Scale X Multiplier uses.




Or I could do a similar thing using the curve for the Variable Mixed Shapes curve like you do in the demo video for that Module via E27_MixingAnimator. I would not need real-time changes so could also create the curve in the Start method instead. I could have a min and max width shapes and let the curve choose the width. This would be more precise than Scale Multiplier I think.




Both methods are viable




(06-04-2022, 04:11 AM)tairoark Wrote: I tried to test this second case by manually creating the curve in the graph. But it doesn't produce the results expected. It generates only one change from beginning to end of the following path. Maxing the resolution on the Path tab didn't to change it. See attached screen shot. Not sure what I'm doing wrong?




It's because of the Optimize option in the shape extrusion module. Set it to off and things should work.




(06-04-2022, 04:11 AM)tairoark Wrote: If I change the shapes from circles to rectangles with different widths (my end goal), the results make no sense to me. The extrusion doesn't wrap around the volume or show on all four sides. The sides are not parallel as if they are trying to match different order points on the rectangle. See the second screen shot.




It's because the first CP of both shapes are not on the same side. Please use this to change the first CP.

PS: you can also simply rotate the spline so that the first CPs (meaning CP0000) of both splines are aligned




(06-04-2022, 04:11 AM)tairoark Wrote: I'd like to understand what is going on in my failed scene example even if it is not the best way to achieve my results.


I updated your scene with all the steps I explained above



(06-04-2022, 04:11 AM)tairoark Wrote: There doesn't seem to be any modules that use Metadata from Spline Path Input to control things? Or am I missing it?



The Input Spline Shape module for uses the Meta CG Options component to compute the U coordinate of the shape's points



(06-04-2022, 04:11 AM)tairoark Wrote: Another is to use the OnBeforeRefresh event to setup the curve. This event could be sent to a method added to the CurvySpline reference in the Spline Path Input. Are their merits to one way over the other?



This method suffers from the issue discussed here:

https://forum.curvyeditor.com/thread-1436.html




(06-04-2022, 04:11 AM)tairoark Wrote: Since going out-of-band from the graph's data flow seemed a bit wrong, I looked at making my own Module but got lost trying to understanding the only Metadata example you have in the CGUtilities:GetControlPointWithOptions. 

Yeah, that one is complicated to understand Sad




(06-04-2022, 04:11 AM)tairoark Wrote: How I'd use that with a Path Input on my own Custom Module, I don't know! The Path Input doesn't seem to have the Metadata access.


The Path Input module outputs a path, which is not a spline, but a path (a set of points that approximate the spline). This set of points is also referred to as rasterized spline. The rasterized spline has no meta data. So if you need a module that has access to meta data, you need that module to have access to the spline directly.



(06-04-2022, 04:11 AM)tairoark Wrote: Getting at the CurvySpline and using the API to access the Metadata in either of the processes I described above seems simpler. I know how to get the Metadata from the spline with the API.



That's what I would recommend.




My answer to the second question in the next post.


Attached Files
.unity   ShapeExtrudeTest.unity (Size: 64.65 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


Messages In This Thread
Shape extrusion scaling - by tairoark - 06-04-2022, 04:11 AM
RE: Shape extrusion scaling - by _Aka_ - 06-05-2022, 05:09 PM
RE: Shape extrusion scaling - by _Aka_ - 06-06-2022, 05:59 AM
RE: Shape extrusion scaling - by _Aka_ - 06-06-2022, 06:06 AM
RE: Shape extrusion scaling - by tairoark - 06-06-2022, 07:10 PM
RE: Shape extrusion scaling - by _Aka_ - 06-07-2022, 05:35 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Incorrect mesh alignment after extrusion on curved path Thinkurvy 10 21 04-17-2024, 10:57 AM
Last Post: _Aka_
  Fading in/out extrusion mesh of a spline? _RicO 3 5 07-25-2023, 09:40 PM
Last Post: _Aka_
  Animating a shape on along a spline will not playback in scene or game views sam_bond 3 9 05-03-2023, 11:41 AM
Last Post: _Aka_
  Inaccuracies with offseted Shape Extrusions MichaelMenzi 6 15 12-14-2022, 10:22 AM
Last Post: _Aka_

Forum Jump: