# Modeling a face with more than 3 vertices

**URL:** <https://discourse.threejs.org/t/modeling-a-face-with-more-than-3-vertices/623>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [July 17, 2017, 3:04pm UTC](https://discourse.threejs.org/t/modeling-a-face-with-more-than-3-vertices/623 "2017-07-17T15:04:38Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![hofk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hofk/32/44944_2.png) [@hofk](https://discourse.threejs.org/u/hofk)\
**Post date:** [July 17, 2017, 6:55pm UTC](https://discourse.threejs.org/t/modeling-a-face-with-more-than-3-vertices/623/3 "2017-07-17T18:55:19Z")

</div>

It was not my intention to model roofs, but a simple colorful roof also works with my addon  
[https://discourse.threejs.org/t/addon-produces-almost-infinite-many-time-varying-geometries-with-functions/262/14](https://discourse.threejs.org/t/addon-produces-almost-infinite-many-time-varying-geometries-with-functions/262/14)

See  
[http://sandbox.threejs.hofk.de/](http://sandbox.threejs.hofk.de/)

![](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/threejs/original/1X/1d9b91e35c9081a9e16822dbbbd213eaf98b4cc2.png)

In the sourcecode of **THREEf.js** one can see, however, how the surfaces are designed in color.

```
function morphFaces( time ) { 
...
  if ( g.isGeometry ) {
 ...
 // g is the geometry! 
   g.faces[fIdx].materialIndex = g.materialCover( ( j + 0.5 ) / rs, i / hs, t ); // by function

...

  g.faces[fIdx].materialIndex = g.fixedMaterial[fixMatIdx][j1]; // overwrite by array
```

---

_[View the full topic](https://discourse.threejs.org/t/modeling-a-face-with-more-than-3-vertices/623)._
