# Chamfer / bevel the edges of the geometry

2802
4
06-14-2012 08:32 AM
New Contributor
To make my building geometry look a bit more realistic, I'd like to chamfer / bevel all the edges in the model.  This will just soften them slightly, and make them look just a bit more realistic when rendered... because the light reflects differently off chamfered corners, and few real-world objects have knife-sharp edges.

Is there a simple way to do this?

I suspect it involves comp(e), but I'm not sure after that....
Tags (3)
1 Solution

Accepted Solutions
Frequent Contributor
hi !

`Lot -->  extrude(10)  comp(f) {side : Bevel}  Bevel -->  roofGable(50,0,0,true) # use the vertical edge = rotate roof // angle must be larger than 45 degs because of following comp(f)   split(y){0.005: comp(f) {top : color(1,0,0) X. | all : X.}  | ~1 : NIL}`
4 Replies
Frequent Contributor
hi !

`Lot -->  extrude(10)  comp(f) {side : Bevel}  Bevel -->  roofGable(50,0,0,true) # use the vertical edge = rotate roof // angle must be larger than 45 degs because of following comp(f)   split(y){0.005: comp(f) {top : color(1,0,0) X. | all : X.}  | ~1 : NIL}`
New Contributor
Thank you Matthias, excellent help 😄

I played around with your suggestion, and this is what I came up with to fit my needs.

I share it here (liberally commented) because someone less experienced might find it useful.

```Lot -->
innerRect    // ensure the lot is a square, for simplicity
alignScopeToAxes(y)   // these two lines ensure that
s('1,0,'1)    // the lot is extruded vertically (world axes, not the local axes)
extrude(10)
comp(f) {top: Bevel | side : Bevel} // splits out the individual faces

Bevel -->
roofHip(45)     // each face becomes a hip roof, relative to the local axes
split(y){.1: comp(f) {bottom: NIL | all : Wall }}  // removes the bottom face (for efficiency)

Wall -->
color(0,5,0)    // give it a pretty color :)
Done.         // finished
```

[ATTACH=CONFIG]15266[/ATTACH]
Frequent Contributor
hey !

thanks for sharing ! :cool:
New Contributor
doh, I was implementing bevelled edges in LOD 0 of my city, and I realized that I forgot to take out the extra bit:

```Lot -->
innerRect    // ensure the lot is a square, for simplicity
alignScopeToAxes(y)   // these two lines ensure that
s('1,0,'1)    // the lot is extruded vertically (world axes, not the local axes)
extrude(10)
comp(f) {top: Bevel | side : Bevel} // splits out the individual faces

Bevel -->
roofHip(45)     // each face becomes a hip roof,
split(y){.1: comp(f) {bottom: NIL | all : Wall }  | ~1:NIL}  // removes the bottom face (for efficiency), then removes the excess

Wall -->
color(0,5,0)    // give it a pretty color :)
Done.         // finished```