The Curved Poly Behaviour has three parameters:
Your GameObject will also have a MeshFilter and a MeshRenderer, they are automatically added together with the behaviour. The Curved Poly Behaviour assigns a new Mesh to the mesh Filter when the LoD change (either by changing the LoD asset of the LodIndex). For this reason you should never assign a Mesh manually. You should, instead, setup the MeshRenderer the way you like, first of all by selecting a good material. CurvedPoly - Shape Editor comes with a pair of materials called Normals Mat and Bisided Normals Mat, which are helpful to understand your shapes while you edit them. Both materials are base on a shader called NormalsShader which colors the surface of the mesh with a color based on normals coordinates (x component maps to red, y component maps to green, z component map to blue); such shader has 3 parameters:
The are aware that the Bisided Normals Mat will work only if you use the Unity Standard Pipeline. If you use one of the recent Pipelines (such as the Lightwave, the High Definition or the Universal one, or any custom pipeline not from Unity) it is not going to work. You can replace it with any material of course, it's only a material assigned to a Mesh Renderer. If you want to replicate the same effect of Bisided Normals Mat or Normals Mat for different pipelines, look for support at support.mushroomslabs.com
Curved Poly Data is stored in Curved Poly Assets. You can assign the same Curved Poly Asset on more GameObjects, even with different LoD/Tessellation settings.
Note: If two GameObjects share the same Curved Poly Asset and the same LoD settings, they will also share the same computed Mesh; such meshes are kept inside the Curved Poly Asset and generated on demand, both in Edit and Play mode. For this reason, you should never exceed in the number of LoDs you are using at Run-Time.Objects can’t be reshaped in Play mode. In Edit mode each Curved Poly Data will load an hidden editor object which responsible of all editing functions. GameObjects sharing the same Curved Poly Asset in the same Scene will access the same editor, so you can switch from one GameObject to the other to edit the content. The other GameObjects using the same asset will keep updating together. This is helpful if you plane to check how different LoDs will look on different Objects: create an aligned row of GameObjects with the same Curved Poly Asset, the same LoDs Asset and assign each one a different LoD; when you change something in the first GameObject with the Pointings or the Selection Operators you should see the changes applied on all the other GameObjects. If something goes wrong, try to click/select first each of the GameObjects: opening the inspector will force the editor to load their settings and will realign their data.
Fig. 1 A Curved Poly Asset shared among more Game Objects uses the same editor instance, but each Curved Poly can be assigned a different LoD.
The first time you create a Curved Poly Behaviour, a new Curved Poly Asset is generated in the editor, but its data is not saved in the project. So, you can shape your model, but if you close the editor or change scene you will lose everything. There are a few actions you can take to save/load your model in/from a valid Curved Poly Asset.
There are many ways to create a Duplicate of a Curved Poly Asset. One option is to load the asset on a new Curved Poly, then use the Save New option. Or you can create a new Curved Poly, Import the one you want to duplicate and save it with Save. You could also duplicate it in the inspector, but in that case Curved Poly will make a slightly different work: the duplicate may be broken into more parts when the original model has texture coordinates.
There is a reason. As explained in the next section, Curved Poly uses two data formats, one for real time operations and one for editing. The real time format is simplified compared to the editing one. When you use Unity Duplication in project explorer, only the real time format will be duplicated (while, for instance, Import will create a copy of both of them). Then, if you try to edit the Curved Poly Asset, the edit format will be generated from scratch and it will miss important informations from the original model.
There is a second asset saved together with the Curved Poly Asset when you press Save.
A few things about the Curved Poly Editor Asset:
There is a second location where Curved Poly looks for the Curved Poly Editor Asset. Such location is a folder named Editor inside the folder the Curved Poly Asset resides. So for instance, if you have your Curved Poly Asset at path Assets/Examples/CP/MyCurvedPolyAsset, the Curved Poly Editor Asset will be searched at path Assets/Examples/CP/Editor before checking the default Assets/CurvedPoly/User/Editor folder. So you can move the editing assets from the default location to a subfolder of your assets folder, which is useful when you need to move files from your project to another.
Another important editor feature of Curved Poly Editor Assets is locking, which is used for instance by our Curved Poly Primitives. You can lock a Curved Poly Asset (making it a custom primitive) by renaming its Curved Poly Editor Asset, adding the special string model0 at the end of the name. In this way, any attempt to save the Curved Poly Asset will be blocked with a warning message.
Fig. 2 A warning message, happening when you try to overwrite a primitive.
For instance, all the Primitives of Curved Poly - Shape Editor (find them at Assets/CurvedPoly/Assets/Primitives ) have theirs editing assets (find them at Assets/CurvedPoly/Assets/Primitives/Editor) renamed with the special model0 string.
This panel is part of the Inspector and it shows the count of vertices, curves and polygons your Curved Poly Asset is made of.
(new!) Now the panel will show separated statistics for the Edit Model and the Runtime Model. It also shows the number of geometries
This panel is part of the Inspector and it shows the count of vertices and faces (Triangles) of the last Mesh your Curved Poly Behaviour put in the MeshFilter. This is useful because Mesh Statistics change when you change LoD, and you may be interested to know how much vertices and triangles you are using at RunTime. You also have two additional buttons here, you need to use carefully:
Curved Poly - Shape Editor has its own History storing a reference to any change you make on the model. When you use Unity Undo or Redo actions on a Curved Poly Behaviour, the Editor will keep such History system aligned with Unity one.
At the same time, a maximum of ten actions you performed on the model will be listed in the Inspector. When you Undo, undone actions will have their font-color changed from black to gray, in order to help you understand at which step you are in the history. In this version of Curved Poly - Shape Editor only the last ten actions stored in the history will be shown, so if you Undo more times you will not be able to see undone actions in the Inspector.
Moreover: since the Editor is shared between Curved Poly Behaviours having the same Curved Poly Asset, also the History is shared and you will be able to see the actions you took also while Inspecting other GameObjects.
(new!) Now the panel will show a control to choose the maximum number of elements stored in curved poly history. Lower the number down if you think that curved poly is using too much of the editor memory.
You can edit the LoDs asset also in the Curved Poly Inspector. This is helpful when you are learning Curved Poly Editing for the first time. However, you should use this carefully because changing a LoDs asset within the Curved Poly Inspector will affect any other Curved Poly Behaviour using that LoDs asset, even the ones not being in the actually selected scene.
Update : this is an additional button, not present in the LoDs inspector, which allows you to update manually your Curved Poly Mesh after you have finished changing a LoDs tessellation data.