Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
curvy at small scale?
#1
I'm trying to use curvy to make some small detail objects, like cables or wires, that are only 1 or 2 cm in diameter. 

In Shape Extrusion > Cross I'm turning off optimise and putting the resolution at 100% but the resulting mesh seems to be optimised to 2 points in shape (a flat mesh) instead of a tube like shape.

Am I missing something here? Is it possible to work with Curvy at small scales?

       
www.hawkenking.com - interactive design & game development
Reply
#2
Hi,
Yes, Curvy can be used with small scaled shapes. You will need to increase the density of the cached spline points. Please select your shape, and in the inspector increase it's Cache Density to 100.
Did it work? If not, what is the radius of your shape?
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,

I tried to change the density but it didn't seem to have any effect, the mesh is optimised instead of a tube like shape. The radius is 0.01~0.06 (1 to 6cm)

   
   
www.hawkenking.com - interactive design & game development
Reply
#4
You are right, it didn't work as expected for things this small.
This bug will be fixed in the next curvy version. But for now, here is a quick fix for you:
In SplineInputModulBase.cs, line 146, replace
Code:
raster.Resolution = Mathf.Max(raster.Resolution, 2);
with
Code:
raster.Resolution = Mathf.Max(raster.Resolution, Mathf.Max(spline.CacheSize, 2));
For a 1cm radius circle with the default cache density value, it will produce a wire with a triangular cross section. I think that most games don't want to waste more polygons on something that small. But if you need Curvy to produce more detailed mesh, let me know and I will show you how.
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
Thanks for the code, I replaced but as you say its now just a triangle profile. Ideally I'd like a more detailed mesh at this scale, is it possible to turn off optimisation at scale?

   

here on a 1m sq plane

   
www.hawkenking.com - interactive design & game development
Reply
#6
Yes it is possible. You will need to set a higher value to the Max Cache PPU setting. A value of 20, combined with a Cache Density of 100, should be enough for your usage.


undefined

I strongly advise you to read the Curvy documentation about caching to be aware of the impacts of changing the Max Cache PPU.

There is a known issue with standalone builds when changing Max Cache PPU. It is described here, with a work around. I don't know if the same issue happens for IOS builds. If it does, the workaround concept can be applied on IOS builds too.
I am planning to fix this issue in the next update.
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
(02-08-2018, 01:36 PM)_Aka_ Wrote: Yes it is possible. You will need to set a higher value to the Max Cache PPU setting. A value of 20, combined with a Cache Density of 100, should be enough for your usage.


undefined

I strongly advise you to read the Curvy documentation about caching to be aware of the impacts of changing the Max Cache PPU.

There is a known issue with standalone builds when changing Max Cache PPU. It is described here, with a work around. I don't know if the same issue happens for IOS builds. If it does, the workaround concept can be applied on IOS builds too.
I am planning to fix this issue in the next update.

Thanks for this, the documentation goes in to some detail about working in different scales, 20 certainly is enough for the shape, but the path is still low resolution (I'm assuming this is because the angle threshold only goes down to 10cm)

Is there a way to make the angle threshold lower (1cm or so?) I tried to change in BuildShapeExtrusion.cs AngleThreshold but it didn't change

   
www.hawkenking.com - interactive design & game development
Reply
#8
(02-09-2018, 03:18 AM)hawken Wrote: Is there a way to make the angle threshold lower (1cm or so?)
The angle is measured in degrees. Thinking about it as a distance will just confuse you. Think about it as the minimal angle between two rasterized points on the spline. The minimal value of 0.1 degrees is small enough for any reasonable real-time 3D mesh. The issue you encounter comes from something else: the "Min Distance" parameter in the Curvy Generator's inspector
   
As the tooltip says, this is the "Minimum distance between rasterized sample points". Its default value is 0.1m (10 cm), which is too high for your scenario. Lower it and you will have a more detailed (as long as the input spline is also detailed, which is your case already).

I will try, in an upcoming update, to make it simpler to parameter the Curvy Generator to generate very detailed meshes for users who want to work with very small objects like you.
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
(02-09-2018, 02:39 PM)_Aka_ Wrote:
(02-09-2018, 03:18 AM)hawken Wrote: Is there a way to make the angle threshold lower (1cm or so?)
The angle is measured in degrees. Thinking about it as a distance will just confuse you. Think about it as the minimal angle between two rasterized points on the spline. The minimal value of 0.1 degrees is small enough for any reasonable real-time 3D mesh. The issue you encounter comes from something else: the "Min Distance" parameter in the Curvy Generator's inspector

As the tooltip says, this is the "Minimum distance between rasterized sample points". Its default value is 0.1m (10 cm), which is too high for your scenario. Lower it and you will have a more detailed (as long as the input spline is also detailed, which is your case already).

I will try, in an upcoming update, to make it simpler to parameter the Curvy Generator to generate very detailed meshes for users who want to work with very small objects like you.

I see thank you!!
www.hawkenking.com - interactive design & game development
Reply
#10
(02-08-2018, 01:36 PM)_Aka_ Wrote: Yes it is possible. You will need to set a higher value to the Max Cache PPU setting. A value of 20, combined with a Cache Density of 100, should be enough for your usage.


undefined

I strongly advise you to read the Curvy documentation about caching to be aware of the impacts of changing the Max Cache PPU.

There is a known issue with standalone builds when changing Max Cache PPU. It is described here, with a work around. I don't know if the same issue happens for IOS builds. If it does, the workaround concept can be applied on IOS builds too.
I am planning to fix this issue in the next update.

yes it seems this doesn't let Unity build to iOS, I get the following error:

Code:
NullReferenceException: Object reference not set to an instance of an object
FluffyUnderware.Curvy.Generator.CGModule.GetManagedResources (System.Collections.Generic.List`1& components, System.Collections.Generic.List`1& componentNames) (at Assets/Packages/Curvy/Base/CG/CGModule.cs:697)
FluffyUnderware.Curvy.Generator.CGModule.OnDestroy () (at Assets/Packages/Curvy/Base/CG/CGModule.cs:318)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
www.hawkenking.com - interactive design & game development
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 1 2 9 hours ago
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 1 1 10 hours ago
Last Post: _Aka_
Exclamation Extending Curvy Generator for Advanced Lofting - Feasibility Check amutp 2 4 03-27-2024, 07:25 AM
Last Post: amutp
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 0 6 03-27-2024, 03:23 AM
Last Post: _Aka_

Forum Jump: