<< Prev Next >>


Primitives and Demos

Primitives

At the path Assets/CurvedPoly/Assets/Primites you will find a set of 28 Premade Curved Poly model which should be your starting point every time you need to shape a new Model. Curved Poly - Shape Editor does not allow you to add polygons or edges to the model, so I tried to put together a good set of instrument to start. Primitives cover both closed surfaces and a little set of opened surfaces. Here a summary of them:

  • Sphere : a very simple closed shape with eight curved triangles making a sphere. The best way to start learning curved poly and at the same time a very flexible instrument to model simple shapes.
  • Circle : opened surface made of 4 curved triangles making a circle.
  • Cylinders : there are 3 cylinders, with an increasing number of polygons. Each cylinder is made of 4 curved triangles on the top and on the bottom, and, respectively, 4, 8 and 12 curved quads on the sides. There are also the opened versions called CylinderBorder without caps.
  • Donuts : there are 3 donuts, with an increasing number of polygons. Donuts are made of 16, 24 and 32 curved quads.
  • ChamferBoxes : there are 4 chamfer box, each one made with 6 grids of curved quads, connected by other polygons to form a cube with rounded borders. In each corner is made with a smooth curved triangle.
  • Plates : similar to ChamferBoxes, but they only use 2 grids of quads and they extend on x and z directions. You can also find the opened versions missing the grids and called PlateBorders.
  • Quads : simple opened grids, like the ones used in ChamferBoxes and Plates, with an increasing number of polygons.

Primitives Display Demo

In the Demo folder (Assets/CurvedPoly/Demo) you will find two important Demo Scene called PrimitivesDisplayPartA and PrimitivesDisplayPartB. The two demos show all the primitives at once (Sphere, Circle, Cylinders and Donuts in the first; Boxes, Plates and Quads in the second). For each primitive an entire array of Game Object is shown, where each GameObject will have a different LoD applied. If you start editing one of the primitives from one of the GameObjects, you will see that changes are applied on all gameobjects at once.

Shaped Examples

There are a few demo objects which you can use to take inspiration and that you can even import and use in place of primitives, even if they are all derived by one or more of the Primitives discussed in the previous section. The Curved Poly Assets for this objects are located in Assets/CurvedPoly/Demo/Models.

Some of these objects are a composition of more geometric parts, so I also have a set of Prefabs which show the result of the composition. Such prefabs are located in Assets/CurvedPoly/Demo/Prefabs. You will also find a set of simple materials (all derived from Unity Standard Shader) in Assets/CurvedPoly/Demo/Materials that I only use for demo purposes.

If you want to see all the Shaped Examples at once, you will find a complete scene in the Demo folder called Shaped Examples.

LoD Group Demo

The Demo LodsGroupDemo will show you how to use Unity LODGroups together with CurvedPoly. You can do this by following this steps:

  • Create a new GameObject and add a LODGroup behaviour to it.
  • Create more GameObjects (one for each LoD you need) below the first one. Add the Curved Poly Behaviour to all of them, and use the same Curved Poly Asset on all of them.
  • Set each Sub-GameObject with a different LoD from the same LoDs asset.
  • Set the LODGroup in the parent GameObject as explained in Unity Documentation

Runtime LoD

The Demo Scene called RuntimeLoDs will show you how to change LoDs at runtime. The core of the demo is a simple script you can find at Assets/CurvedPoly/Demo/Scripts/ChangeLodIndex.cs. The script contains two simple methods which increase/decrease the LoDIndex of a set of assigned CurvedPoly behaviour, so that you can control tessellation.

The scene has some Curved Poly and two buttons. In Play mode, you can see that pressing the buttons will change the tessellation on all the models.




<< Prev Next >>