Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mesh index warning at extrusion
#1
Hello,

I'm trying to generate a rail track like in your example 25. I copied the generator from the example and fed it with my own spline.
Sadly, the wires and railtracks are not extruded. In the generator I get a warning: "Mesh of index X skipped because vertex count Y > 65534," where X and Y have different values. What does this mean? And why do the wires and the railtracks not extruded? How can I fix this?
It does export something, but it's definitely not right:
https://imgur.com/QWJSrGq

Thanks in advance!
Reply
#2
Hi,
This message means that you are trying to generate a mesh that has too many vertices. This limitation is there because Unity has a limit on how much vertices there can be in its meshes. This limitation was enhanced in recent Unity versions, but Curvy still uses the old limitation.
So to reduce the number of vertices, either reduce the level of detail of your mesh, of split you mesh into multiple submeshes. For the first solution look, take a look at the options of the Shape Extrusion module. For the second solution, use the Split parameter of the Volume Mesh module.
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
Thanks for your swift reply. I used the split option and changed the value until the warnings were gone.
The result: still not very good:
https://imgur.com/4JeCHk1

The meshes of the wires are missing. Also, for some reason I can't open the generator anymore.

The console keeps outputting this error:

NullReferenceException: Object reference not set to an instance of an object
FluffyUnderware.Curvy.Generator.CGGameObjectResourceLoader.Create (FluffyUnderware.Curvy.Generator.CGModule cgModule, System.String context) (at Assets/GeodanGo/3rdParty/Curvy Splines/Curvy/Base/CG/CGResource.cs:239)
FluffyUnderware.Curvy.Generator.CGResourceHandler.CreateResource (FluffyUnderware.Curvy.Generator.CGModule module, System.String resName, System.String context) (at Assets/GeodanGo/3rdParty/Curvy Splines/Curvy/Base/CG/CGResource.cs:49)
FluffyUnderware.Curvy.Generator.CGModule.AddManagedResource (System.String resourceName, System.String context, System.Int32 index) (at Assets/GeodanGo/3rdParty/Curvy Splines/Curvy/Base/CG/CGModule.cs:597)
FluffyUnderware.Curvy.Generator.Modules.CreateGameObject.Refresh () (at Assets/GeodanGo/3rdParty/Curvy Splines/Curvy/Base/CG Modules/CreateGameObject.cs:157)
FluffyUnderware.Curvy.Generator.CGModule.doRefresh () (at Assets/GeodanGo/3rdParty/Curvy Splines/Curvy/Base/CG/CGModule.cs:815)
FluffyUnderware.Curvy.Generator.CurvyGenerator.Refresh (System.Boolean forceUpdate) (at Assets/GeodanGo/3rdParty/Curvy Splines/Curvy/Base/CG/CurvyGenerator.cs:595)
FluffyUnderware.Curvy.Generator.CurvyGenerator.Initialize (System.Boolean force) (at Assets/GeodanGo/3rdParty/Curvy Splines/Curvy/Base/CG/CurvyGenerator.cs:550)
FluffyUnderware.CurvyEditor.Generator.CGGraph.Open (FluffyUnderware.Curvy.Generator.CurvyGenerator generator) (at Assets/GeodanGo/3rdParty/Curvy Splines/Curvy/Base/Editor/CG/CGGraph.cs:141)
FluffyUnderware.CurvyEditor.Generator.CurvyGeneratorEditor.OnInspectorGUI () (at Assets/GeodanGo/3rdParty/Curvy Splines/Curvy/Base/Editor/CG/CurvyGeneratorEditor.cs:45)
UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:445)
UnityEngine.GUIUtilityTonguerocessEvent(Int32, IntPtr)
Reply
#4
Hi,
I don't understand what I am looking at when I open your screenshot. Could you send me your scene?
The error you get happens in code related to pooling. From looking at the code, it happens when the pool has no more elements to provide. Try modifying the parameters of the pools used by the Curvy Generator.
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
(06-06-2019, 08:25 PM)_Aka_ Wrote: Hi,
I don't understand what I am looking at when I open your screenshot. Could you send me your scene?
The error you get happens in code related to pooling. From looking at the code, it happens when the pool has no more elements to provide. Try modifying the parameters of the pools used by the Curvy Generator.

Hi Aka,

Swift update: we're currently coping with some deadlines, but I will try to replicate the situation next week and send you that scene. 
What you're seeing is the mesh that is generated by Curvy for the ground underneath the rails. As you see, the mesh is all blown up. The mesh for the wires remains empty.

I will get back to you as soon as possible with an example scene.
Thanks for your time.
Reply
#6
Hello again,

I reproduces the problem and extracted it from the scene. You can download it here:
https://we.tl/t-V7P0uNw1Fs

Please let me know if you can find the problem. Thanks in advance!
Reply
#7
Hi,

Your issue comes from the the fact that your extrusion's cross is the same spline as your extrusion's path.
https://curvyeditor.com/documentation/ge...sion#input
By setting a rectangle for example as your extrusion's cross, your will have a coherent result. Then just follow the warnings displayed in the modules.

PS: If the spots limitations is too low for you, search for this code in BuildVolumeSpot.cs, and set whatever value you want:
const int MaxSpotsCount = 10000;
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#8
Thanks a lot, that fixed the mesh extrusion! It looks sweet now.
One last thing: I noticed that when the mesh is generated, the position is defaulted to (0, 0, 0) in world position. Therefore, there is an offset in where the mesh is placed (it's not placed exactly on the spline I drew - see screenshots for visualization). Is there a way to map the generated mesh exactly on the spline, instead of offsetting it manually?

https://imgur.com/oCXvAD3

https://imgur.com/3HYnnE4

Edit: I found out that I can copy the transform values of the spline into the generator, which fixed it, but I prefer to see an automatic solution if there is one.
Reply
#9
You are welcome.

In the Input Spline Path module, there is a Use Global Space option that you should activate
https://curvyeditor.com/documentation/ge...splinepath
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
Fantastic! Thanks a lot for your help and your awesome tool!
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Generator Shape Extrusion Range/Lenght precision UsernameHed 3 209 07-10-2019, 10:21 AM
Last Post: _Aka_
  Move the Create Mesh of a CurvyGenerator Out of the Main Parent UsernameHed 3 208 07-08-2019, 06:57 PM
Last Post: _Aka_
  Material stretched on generated mesh Tim1234 12 582 07-01-2019, 03:57 PM
Last Post: _Aka_
  Same Spline Extrusion with variable width MarioBag 3 273 06-27-2019, 12:41 PM
Last Post: _Aka_

Forum Jump: