Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to tell volume spot to ignore mesh bound?
#1
Information 
Dear members of curvy spline community.

I am using Curvy spline v7.0.0 and I want to see if  there is a quick way to change the behaviour of volume spots spacing .

   

My understanding is that curvy spline takes in consideration the mesh bounds when it does the calculation for "Space before and after" parameters of the volume spots. This is really useful, but for special cases I would like to ignore the mesh bounds and place the objects to have a certain distance from pivot to pivot.

Is there a quick way to tell the Curvy Generator to ignore the mesh bounds when it calculates the position of the volume spots? 

I am currently subtracting half of the mesh bound dimensions before setting up the "space before/ after" but I would like to see if curvy has the option to do it.  

Thanks
Mario
Reply
#2
Hi
I see two solutions to reach your objective. I recommend the first one
1- Add a script that will automatically do what you already do by hand: modifying space before/after to subtract half of the mesh's depth. The advantage of this solution is that you will not have to modify the code of Curvy Splines, which will make updating Curvy to the latest version not a trivial operation anymore. Also, less chances to introduce bugs.
2- Modify Curvy's code of the Volume Spots module to completely ignore the depth of the input mesh.
API side, that depth is available at CGBounds.Depth. If you find all references to it in the code, which are all for now in BuildVolumeSpots.cs, you can modify those parts of the code to not take into account the depth. This solution will be more difficult to implement, since you will need to get familiar with the code of that class, which is easier said than done. The advantage of this solution is that you will not need to add any new script to your scenes for it to work, unlike for solution 1.
I hope this helped. Let me know if you have other questions
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
Hi Aka.

Thanks for the quick reply. I am happy to confirm your suggestions helped me.

What I wanted to achieve is to place different objects (using volume spots) in the exact location based on their pivot point (as different objects could have different bounds).

If anybody is interested, my solutions is:

  1. As Aka suggested, have a script that evaluates the bounds of the object.
  2. Set up the volume spot to be:
  • Space before: -depthOfObject/2.
  • Space after: desiredSpacing - (depthOfObject/2)
All the best and thanks for your help Smile
Reply
#4
You are welcome, glad to read that it helped. And thanks for sharing your solutions with other people.
If and when you feel like it, please leave a review for the asset, that helps a lot.
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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Adjust radius of generated mesh via script? Shackman 1 3 03-26-2024, 01:12 PM
Last Post: _Aka_
Question Volume Spots inter group distance Sacryn 1 3 02-27-2024, 04:08 PM
Last Post: _Aka_
  Not seeing mesh extended after following YT PaulM 1 3 02-02-2024, 12:01 PM
Last Post: _Aka_
  Trigger Zones along Spline Mesh dlees9191 1 5 01-05-2024, 10:18 AM
Last Post: _Aka_

Forum Jump: