Breaking and Joining Vertices

In this tutorial colored vertices are shown for all the examples but the same rules apply to textures. When using this tutorial for textured triangles replace the word color with texCoord.

0. Create a new Seamless file

Click on the new smls file button

1. Add some triangles

Add some triangles by adding a RectangleBuild node.
Set the RectangleBuild's staves and bands to 2 then right click on the part node and select:


So that the white part gets converted to a blue part and the RectangleBuild node that generated the triangles is removed. This allows us to be able to edit the triangles without the RectangleBuild node regenerating the triangles from scratch each time a build cycle is performed.
Editing triangles this way is known as "poly modelling".

2. Color triangles blue

To color all of the triangles blue first color a single vertex blue by selecting the vertex and using the color buttons

Then click copy and then click to paste the color into the vertices for the whole part.

3. Break coord

Suppose we want to break the selected triangle's vertex away from the other triangles.

We can do this by selecting break->coord from the F10 menu:


After breaking the coord join we can drag the vertex for the selected triangle away from the vertex it was once joined to:
Because the vertex is no longer joined, when its colour is changed using the color buttons , no other vertex's colour is changed.

4. Move vertex to nearest

To move the vertex to the nearest vertex, select:

Because moving a vertex does not join it, if we drag it we will see the vertex remains broken:

5. Join vertex keeping both colors

To join the selected vertex to the nearest vertex click :

Now if we drag the vertex we will see it is joined and all of the colors are retained:

6. Join vertex keeping only destination color

Break the vertex away again and this time click so that only the destination color is retained:



7. Join vertex keeping only source color

Break the vertex away again and this time select:


so that only the source (the vertex that was selected) color is retained:

8. Break joining color

We have seen how we can make a color for a vertex independent from the rest of the triangles by breaking the vertex's join and joining it back by clicking to join it but there is no need to break the whole vertex, we can break just the color by selecting:



This will be evident if we change the vertex's color for the selected triangle using the color buttons :



9. Join vertex to specific triangle

We can make another triangle's vertex share this color that is independent of the rest of the triangles by breaking the vertex away and dragging it to be within the triangle that owns the independent colour:


before clicking .

   

10. Change color for both joined by color

Because both triangles now share the independent colour, selecting either triangle while changing the color for the vertex changes the color for the other triangle:

 


11. Copy & paste vertex color

To copy a triangle's vertex's color and paste it to another triangle's vertex, select the triangle and its vertex and click copy and then select the other triangle and its vertex and click 

Pasting color into a vertex does not cause a vertex to loose its color independence simply because we have made it the same color as the rest. This will be evident if we change the color using the color buttons .
.

12. Conclusion

When we join a vertex we join the coord but the color can remain broken which allows for a joined vertex to be color independent.
When we drag a vertex all vertices that are joined are dragged.




Although when we join a vertex we are really replacing the selected vertex's coord for the destination vertex's coord and when we join a vertex's color we are really replacing the selected vertex's color for the destination vertex's color, it is generally easier to think in terms of joining rather than replacing.






Copyright © 2000-2008 Graham Perrett thyme@seamless3d.com