Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regarding static orientation
#1
   
I am using Generator as the attached screen shot.
My problem is that
1. I added several CP into the spline path. It is just the line. Some of them are rotated along Z-axis.
2. I expected that Shape of mesh would be twisted by. the spline path.
3. However the result as the attached screen shot was not what I expected.
4. Using spline.GetOrientation(tf), I get the correct the rotation.
5. But the mesh is not.

I am using static orientation for the spline path. The orientation is following correctly along my CPs. But the shape of mesh does not following that orientation.
Please let me know what I missed.
Reply
#2
Hi
It should work. I don't know where the issue comes from. I am attaching to this scene a scene. First please open it and confirm that the result matches the screenshot
   
Then, if it matches, please see what it is different between my scene and yours. If you can't find the source of the difference, please send me your scene.


Attached Files
.zip   mydayz.zip (Size: 16.11 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
(12-02-2021, 01:06 PM)_Aka_ Wrote: Hi
It should work. I don't know where the issue comes from. I am attaching to this scene a scene. First please open it and confirm that the result matches the screenshot

Then, if it matches, please see what it is different between my scene and yours. If you can't find the source of the difference, please send me your scene.

Thank you
I've attached my sample scene.
It contains freeform shape. It is different from yours.
Please refer to my attached scene.


Attached Files
.zip   mydayz2.zip (Size: 6.36 KB / Downloads: 1)
Reply
#4
In the Shape Extrusion module, in its Path tab, please disable the Optimize option. That should do it. Did it?
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
(12-02-2021, 01:50 PM)_Aka_ Wrote: In the Shape Extrusion module, in its Path tab, please disable the Optimize option. That should do it. Did it?

Yes it works!
However it causes error messages with the followings when unchecking the optimize option.
FYI, With resolution 100, it casues error. But with resolution 50, it does not.

[Error] [Curvy] He's dead, Jim! Deadloop in SplineInputModuleBase.GetSplineData (Even)! Please send a bug report.
SplineInputModuleBase.GetSplineData() at /Plugins/Curvy/Base/CG Modules/Base/SplineInputModuleBase.cs:408
406:  }
407:  if (dead <= 0)
-->408:      Debug.LogError("[Curvy] He's dead, Jim! Deadloop in SplineInputModuleBase.GetSplineData (Even)! Please send a bug report.");
409:  // store the last open patch
410:  patch.End = positions.Count - 1;

InputSplinePath.OnSlotDataRequest() at /Plugins/Curvy/Base/CG Modules/InputSplinePath.cs:89
87:      return null;
-->89:  CGData data = GetSplineData(Spline, true, raster, options);
91:  return new CGData[1] { data };

CGModuleInputSlot.GetData<FluffyUnderware.Curvy.Generator.CGPath>() at /Plugins/Curvy/Base/CG/CGModuleSlot.cs:395
393:  #endif
394:                      source.Module.UIMessages.Clear();//TODO Find a way to move this line of code inside OnSlotDataRequest
-->395:                      source.SetData(((IOnRequestProcessing)source.Module).OnSlotDataRequest(this, source, requests));
396:  #if UNITY_EDITOR || CURVY_DEBUG
397:                      source.Module.DEBUG_ExecutionTime.Stop();

CGModuleInputSlot.GetData<FluffyUnderware.Curvy.Generator.CGPath>() at /Plugins/Curvy/Base/CG/CGModuleSlot.cs:317
315:          public T GetData<T>(params CGDataRequestParameter[] requests) where T : CGData
316:          {
-->317:              CGData[] data = GetData<T>(0, requests);
318:  #if UNITY_EDITOR
319:              LastDataCountINTERNAL = (data == null || data.Length == 0) ? 0 : data.Length;

BuildShapeExtrusion.Refresh() at /Plugins/Curvy/Base/CG Modules/BuildShapeExtrusion.cs:729
727:          Resolution,
728:          AngleThreshold, (Optimize) ? CGDataRequestRasterization.ModeEnum.Optimized : CGDataRequestRasterization.ModeEnum.Even));
-->729:      path = InPath.GetData<CGPath>(req.ToArray());
730:      req.Clear();
731:  }

CGModule.doRefresh() at /Plugins/Curvy/Base/CG/CGModule.cs:833
831:      Random.InitState(Seed);
832:  OnBeforeRefreshEvent(new CurvyCGEventArgs(this));
-->833:  Refresh();
834:  Random.InitState(unchecked((int)System.DateTime.Now.Ticks));

CurvyGenerator.Refresh() at /Plugins/Curvy/Base/CG/CurvyGenerator.cs:600
598:          }
-->600:          Modules[i].doRefresh();
601:      }
602:  }

CurvyGenerator.TryAutoRefresh() at /Plugins/Curvy/Base/CG/CurvyGenerator.cs:636
634:      {
635:          mLastEditorUpdateTime = DTTime.TimeSinceStartup;
-->636:          Refresh();
637:      }
638:  }

CurvyGenerator.Update() at /Plugins/Curvy/Base/CG/CurvyGenerator.cs:265
263:          Initialize();
264:      else
-->265:          TryAutoRefresh();
266:  }

CurvyGenerator.editorUpdate() at /Plugins/Curvy/Base/CG/CurvyGenerator.cs:255
253:                  else
254:  #endif
-->255:                      Update();
256:              }
257:          }

EditorApplication.Internal_CallUpdateFunctions() at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:327
Reply
#6
Hi
Tried with the scene you send but couldn't reproduce the issue. Can you please send me a scene with the exact settings that trigger the error?
Thanks
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
(12-02-2021, 11:04 PM)_Aka_ Wrote: Hi
Tried with the scene you send but couldn't reproduce the issue. Can you please send me a scene with the exact settings that trigger the error?
Thanks

I've attached error scene.

And one more question, 

as you see, when I use Curvy generator which I made, my scene file size is more than 100 MB. It is very huge for SCM like Git.
Isn't it a problem?

I've tested something then I guess longer path length gets bigger scene file size.
The optimize is enabled, the file size gets smaller.
Maybe the vertices info size gets smaller with the optimize option.

However, I loose the orientation control without the optimize option.

Is there any solution for this?


Attached Files
.zip   Sample_Error.unity.zip (Size: 47.29 MB / Downloads: 1)
Reply
#8
Hi
About the file size issue: The issue is that the scene includes the generated meshes. The more detailed the meshes are, the bigger the scene will be. This will be fixed in the upcoming Curvy 8, which should be available early 2022. For now, please remove the generated meshes from your scene before saving it. When opening the scene, the generator refreshes automatically, regenerating the meshes.
About the error: will check this soon, will keep you updated
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
About the error: it is a false positive. To avoid it, go to Plugins\Curvy\Base\CG Modules\Base\SplineInputModuleBase.cs, line 316:
int dead = 100000;
replace it with
int dead = 2000000;
This should work. Did it?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#10
(12-03-2021, 12:49 PM)_Aka_ Wrote: About the error: it is a false positive. To avoid it, go to Plugins\Curvy\Base\CG Modules\Base\SplineInputModuleBase.cs, line 316:
int dead = 100000;
replace it with
int dead = 2000000;
This should work. Did it?

Hi,
As you described, the error has been fixed with your work-around method.

To make sure I'd like to ask one more question.
Is the optimization making trouble with the orientation? 
I understand that the optimization reduces the mesh info such as vertices and triangles. If the optimization looses the orientation information, it might be critical.
Is it a kind of bug?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Shapes points orientation itsGama 3 8 01-18-2023, 02:51 PM
Last Post: _Aka_
  2d - orientation looping_co 1 5 09-01-2022, 04:17 PM
Last Post: _Aka_
  Spline controller orientation itsGama 4 30 01-24-2022, 06:38 PM
Last Post: _Aka_
  locking vertical orientation/alignment BenStorch 9 2,478 05-16-2021, 08:28 AM
Last Post: _Aka_

Forum Jump: