# Quick Question: Chamfer Every Corner?

**URL:** <https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038>\
**Category:** Architectural and Design Visualization\
**Tags:** unreal-engine\
**Created:** [March 12, 2016, 5:04pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038 "2016-03-12T17:04:12Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Gallagher](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@James\_Gallagher](https://forums.unrealengine.com/u/James_Gallagher)\
**Post date:** [March 12, 2016, 5:04pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/1 "2016-03-12T17:04:12Z")

</div>

Hey guys, just had a quick question. Do you chamfer every corner of every wall, countertop, etc. in the modeling program (3ds max)? Is there another way to do it? Or is it required at all? Thanks!

---

<div class="post-metadata">

**Author:** ![Chesire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chesire](https://forums.unrealengine.com/u/Chesire)\
**Post date:** [March 12, 2016, 5:32pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/2 "2016-03-12T17:32:04Z")

</div>

If your lighting is highly geometry dependent (ie no baked from high-poly normalmaps for props and all) I’d recommend chamfers on most things you suspect will end up being in screenshots, renders and cinematics of your scene. They might be very little improvements to single objects but overall they just add a touch improved looks. When working with displacement it also helps a bit.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6096f04f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6096f04f](https://forums.unrealengine.com/u/anonymous_user_6096f04f)\
**Post date:** [March 12, 2016, 5:59pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/3 "2016-03-12T17:59:37Z")

</div>

Depends on the budget for the job, low pay no way. 😛

---

<div class="post-metadata">

**Author:** ![James\_Gallagher](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@James\_Gallagher](https://forums.unrealengine.com/u/James_Gallagher)\
**Post date:** [March 12, 2016, 6:05pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/4 "2016-03-12T18:05:42Z")

</div>

Thanks for the quick response. I Just had a few outside corners and a counter to work on. I will add some chamfers on there.

---

<div class="post-metadata">

**Author:** ![heartlessphil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@heartlessphil](https://forums.unrealengine.com/u/heartlessphil)\
**Post date:** [March 13, 2016, 2:41am UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/5 "2016-03-13T02:41:07Z")

</div>

Wish we had a ‘‘ray traced round corner’’ option like in corona/vray hehe! In ue4 I try to chamfer as much as possible but sometimes I’m a bit lazy!

---

<div class="post-metadata">

**Author:** ![James\_Gallagher](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@James\_Gallagher](https://forums.unrealengine.com/u/James_Gallagher)\
**Post date:** [March 13, 2016, 5:30pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/6 "2016-03-13T17:30:02Z")

</div>

> [@;492093](#):
>
> Wish we had a ‘‘ray traced round corner’’ option like in corona/vray hehe! In ue4 I try to chamfer as much as possible but sometimes I’m a bit lazy!

Yeah that’s what I was hoping for! I don’t mind doing chamfers manually though. I was just hesitant about wasting time if there was an easier way.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_78b7ccfb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_78b7ccfb](https://forums.unrealengine.com/u/anonymous_user_78b7ccfb)\
**Post date:** [March 13, 2016, 5:54pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/7 "2016-03-13T17:54:09Z")

</div>

> [@RI3DVIZ;491903](#):
>
> Depends on the budget for the job, low pay no way. 😛

LOL! Brilliant!

---

<div class="post-metadata">

**Author:** ![Chesire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chesire](https://forums.unrealengine.com/u/Chesire)\
**Post date:** [March 13, 2016, 9:46pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/8 "2016-03-13T21:46:42Z")

</div>

Here’s a link to the DIY manual: [http://on-demand.gputechconf.com/gtc/2012/presentations/S0611-Edge-Aware-Shaders-for-RT-Computer-Graphics.pdf](http://on-demand.gputechconf.com/gtc/2012/presentations/S0611-Edge-Aware-Shaders-for-RT-Computer-Graphics.pdf)  
Looks fairly easy. All you need to do is put some custom stuff in a material and voila! 😃  
_sigh_ Where’s Brian when you need him. Brian? Hello??

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6096f04f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6096f04f](https://forums.unrealengine.com/u/anonymous_user_6096f04f)\
**Post date:** [March 13, 2016, 10:56pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/9 "2016-03-13T22:56:53Z")

</div>

> [@Chesire;492463](#):
>
> Here’s a link to the DIY manual: [http://on-demand.gputechconf.com/gtc/2012/presentations/S0611-Edge-Aware-Shaders-for-RT-Computer-Graphics.pdf](http://on-demand.gputechconf.com/gtc/2012/presentations/S0611-Edge-Aware-Shaders-for-RT-Computer-Graphics.pdf)  
> Looks fairly easy. All you need to do is put some custom stuff in a material and voila! 😃  
> _sigh_ Where’s Brian when you need him. Brian? Hello??

Yes we want this!

---

<div class="post-metadata">

**Author:** ![Chesire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chesire](https://forums.unrealengine.com/u/Chesire)\
**Post date:** [March 13, 2016, 11:51pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/10 "2016-03-13T23:51:13Z")

</div>

I’ll pm Ryan(!) so he’s at least aware of our most pressing matters.  
Given they’ve already implemented this spline thicken thingy in 4.2, I reckon  
we’re up for another very useful feature in terms of shading magic.

I’m sure Ryan will agree and make this happen in a heartbeat.  
Well, maybe not quite that fast but a day max and we should be good to go.

---

<div class="post-metadata">

**Author:** ![RyanB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanB](https://forums.unrealengine.com/u/RyanB)\
**Post date:** [March 14, 2016, 3:31pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/11 "2016-03-14T15:31:53Z")

</div>

The challenge here is not detecting the edges or corners or that math. The challenge is finding a place in the engine to both read and modify the gbuffer at the same time. Currently there is really nowhere in content where you have that ability so it would require some code hooks. I would have to do a bit of research and asking around to see how difficult it would be.

also fwiw, that method seems incredibly expensive. According to that paper it cost nearly 10ms. For that reason I cannot see us budgeting time to work on it.

---

<div class="post-metadata">

**Author:** ![heartlessphil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@heartlessphil](https://forums.unrealengine.com/u/heartlessphil)\
**Post date:** [March 16, 2016, 5:47am UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/12 "2016-03-16T05:47:02Z")

</div>

> [@Chesire;492463](#):
>
> Here’s a link to the DIY manual: [http://on-demand.gputechconf.com/gtc/2012/presentations/S0611-Edge-Aware-Shaders-for-RT-Computer-Graphics.pdf](http://on-demand.gputechconf.com/gtc/2012/presentations/S0611-Edge-Aware-Shaders-for-RT-Computer-Graphics.pdf)  
> Looks fairly easy. All you need to do is put some custom stuff in a material and voila! 😃  
> _sigh_ Where’s Brian when you need him. Brian? Hello??

That is sexy! Need!!!

---

<div class="post-metadata">

**Author:** ![Chesire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chesire](https://forums.unrealengine.com/u/Chesire)\
**Post date:** [March 16, 2016, 11:27am UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/13 "2016-03-16T11:27:11Z")

</div>

> [@RyanB;492942](#):
>
> also fwiw, that method seems incredibly expensive. According to that paper it cost nearly 10ms. For that reason I cannot see us budgeting time to work on it.

I see ☹ Something else maybe? If it’s relatively easy to put in the math for finding edges and corners, how far would you come by generating some kind of normal trickery out of those?  
Sth along the lines of generating a new normal out of the borders of a mask, which can produce pretty nice results. Your expertise of course so just babbling here. Do you reckon it’s worth a shot?

---

<div class="post-metadata">

**Author:** ![RyanB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanB](https://forums.unrealengine.com/u/RyanB)\
**Post date:** [March 18, 2016, 2:55pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/14 "2016-03-18T14:55:47Z")

</div>

So far the best solution I have seen is a simple max script that sort of auto chamfers and maintains crisp vertex normals.

Yes you could of course make some other solutions such as masks work, but then realize that you may not be saving much if any time from just doing the chamfer manually or with a script, plus the added complexity of having this as a ‘tech feature’ rather than built into your art means potentially more time down the line spent fixing and tweaking etc. It is important not to overlook tech debt, and I am the last person to admit that usually.

There was a really cool polycount thread about this script here that was removed for some reason so now all we have is the script. I have not yet tried it myself but it would be awesome if somebody could try it out and post back.

[http://pastebin.com/f0nYU37h](http://pastebin.com/f0nYU37h)

_edit_. if there is a place to do this procedurally its probably using deferred decals. Currently looks like the compiler prevents you from using a scenetexture lookup in a decal but it might be a bug. trying a test.

---

<div class="post-metadata">

**Author:** ![Chesire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chesire](https://forums.unrealengine.com/u/Chesire)\
**Post date:** [March 18, 2016, 5:52pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/15 "2016-03-18T17:52:02Z")

</div>

Hmmm yes, totally see your point. Not sure about the script you posted. What exactly is it supposed to do? There’s plenty of scripts around that autochamfer stuff (some very good, some very bad) so I take it that’s not it.  
When I run it in Max, I can’t make it do anything else then the attached screengrab. I take it that’s not what it is supposed to do though 😕 😉

 ![Smooth1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/3/230b8d050c2cd98ef2759ec94a7ffc2fea147968.jpeg)

---

<div class="post-metadata">

**Author:** ![RyanB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanB](https://forums.unrealengine.com/u/RyanB)\
**Post date:** [March 18, 2016, 6:03pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/16 "2016-03-18T18:03:42Z")

</div>

hmm that does not look good. Sadly the link to the polycount thread that had info on the script went bad. Turns out it was closed at the request of the employer of the OP as he was posting some NDA stuff without approval.

I am afraid we are probably stuck with whatever anybody can figure out. In terms of ‘how revolutionary was this script and what exactly does it do’… I am not sure, sorry. I thought it was making the chamfers based on selected edge loops but perhaps my memory is wrong and there was an extra step.

---

<div class="post-metadata">

**Author:** ![Chesire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chesire](https://forums.unrealengine.com/u/Chesire)\
**Post date:** [March 18, 2016, 6:20pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/17 "2016-03-18T18:20:59Z")

</div>

> [@RyanB;495688](#):
>
> if there is a place to do this procedurally its probably using deferred decals. Currently looks like the compiler prevents you from using a scenetexture lookup in a decal but it might be a bug. trying a test.

That wouldn’t be the same as talking about alpha blended decals by any chance now would it?:rolleyes:  
Would be a insane feature for sure.  
[http://docs.cryengine.com/display/SDKDOC2/Using+Decals+for+Destroyed+Structures](http://docs.cryengine.com/display/SDKDOC2/Using+Decals+for+Destroyed+Structures)  
Noticed some very nice POM decals in the Showdown VR demo (albeit using old POM but still, they looked pretty cool when not under close scrutiny) but with this technique you could probably do a whole lot of cooler things.  
Well…pfff, hows that for a derail of topic. Probably best for another time.

Thanks for your efforts as always Ryan!

---

<div class="post-metadata">

**Author:** ![Chesire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chesire](https://forums.unrealengine.com/u/Chesire)\
**Post date:** [March 18, 2016, 6:28pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/18 "2016-03-18T18:28:03Z")

</div>

For anyone that’s interested in best chamfer, normals and edges practises these are all interesting reads:

> **[Sharp Edges in One Smoothing Group \[UDK/3DS Max\]](https://polycount.com/discussion/125237/sharp-edges-in-one-smoothing-group-udk-3ds-max)**
>
> Hi there, I am working on some kind of temple and I ran into a problem.

> **[Face weighted normals](https://polycount.com/discussion/85809/face-weighted-normals)**
>
> Discuss face weighted normals. (or FWN for short)

> **[In-Game Vertex Counts - useful to know?](https://polycount.com/discussion/106108/in-game-vertex-counts-useful-to-know)**
>
> Greetings, I'm wondering how useful it would be to know the final, in game vertex count of a model - after UV and smoothing splits are calculated.

---

<div class="post-metadata">

**Author:** ![RyanB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanB](https://forums.unrealengine.com/u/RyanB)\
**Post date:** [March 18, 2016, 6:32pm UTC](https://forums.unrealengine.com/t/quick-question-chamfer-every-corner/58038/19 "2016-03-18T18:32:35Z")

</div>

> [@Chesire;495824](#):
>
> That wouldn’t be the same as talking about alpha blended decals by any chance now would it?:rolleyes:

No, completely unrelated. And turns out the compile warning is there for a reason. If you try to suppress it you can access it but directX does not let you both read and write to the same buffer at the same time, so you just end up reading either solid color grey/black or random noise. It would require an additional buffer most likely.

_edit_

Those decals from showdown were actually just meshes placed over surfaces and they were made using Bumpoffset only, without any POM. its pretty similar though.
