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
  [Volume Spot]Fits the End Features mydayz 1 61 11-20-2021, 01:30 PM
Last Post: _Aka_
  Bending splines can break the mesh yanke 3 158 11-14-2021, 10:15 PM
Last Post: _Aka_
  Volume Spots and Distance from generator topquarkone 5 518 09-16-2021, 08:17 PM
Last Post: _Aka_
  Volume Spot GO layer - set children leeharris 8 948 08-06-2021, 10:36 AM
Last Post: _Aka_

Forum Jump: