Auto Chamfer 2.2 (build 20516)
for Substance Designer 2019 / Substance Painter 2019 and newer
(v2.0b for SP/SD 2018)
That filter takes mesh and curvature (prebaked normal is optional) then adds soft edges in normal slot.
From the first days of my professional hard surface modeling career I were frustrated that there was no fast and convenient way to bake out chamfers in normal map even if all of us know that that is a pure math inder the hood. Chamfers can be done already in Maya (via mia_roundcorner), 3D Max (via shaders in offline renders), Modo, Blender. But it always have huge drawbacks and can't be reliable for production and general pipeline. A few years ago we were experimenting with painting chamfers in Photoshop for our project. And after that I was inspired to try make solution in substance designer based compleatly on precise math algorithm that power dot3 bump mapping. So if that filter will inspire someone to make their own plugins or programs our industry will defenetly glad for it. Cheers!
Why 2.0 from the start?!
In 2018 I started working on that filter and made numerous iterations but they can't produce stable result that will satisfy me even though I used them in my projects. Version 2.0 is ready to be used in most cases so now you can try it out. Certainly it's not so perfect like I want it to be but I'm working on better versions. Unfortunately there is no intersection detection at the moment.
How To Use
- Make UV according to hardsurface modeling requirements (UV seams on every hard edge). Dont forget to triangulate your mesh before bake.
- Bake your shading if needed without chamfers.
- Import your mesh to SD or SP and make sure that smoothing groups are fine.
- Bake your base texture maps:
- SD - bake Curvature and Convert UV to SVG
- SP - bake separate Curvature with Generate from Normal method and Per Vertex algorithm and make UV selection via mask and anchor (see the pic.)
Don't use default baking method because it normalizes curvature values and can't provide exact angle value in curvature map.
- Create Fill layer and throw AutoChamfer filter in Normal slot.
- Put input maps in to filter and change Normal output format if needed.
Tips For Better Results
- Best results can be achieved if curvature baked in designer.
- If you have issue with significant seams in normal try to bake out curvature from Designer and plug it in to Painter. That issue related to inaccurate painter baker.
- Remember to add dilation at least 4px to your Curvature (not diffusion).
- Input maps need to be at least 2k.
- Remember to bake Per Vertex curvature if you using SP.
- UV map need to be as precise as posible without any dilation.
- In some cases it a good idea to work with 4k project size and after that import created normal map with chamfer in your project and set desired project size.
- There will be visible seams on soft edges. You need to bake hard edge shading on them and apply texture in AC2.
- There will be visible seams on hard edges without UV splits, please check your hard surface normal baking workflow.
If you have any feedback or questions please contact me via messages and thank you for buying me a cup of coffee!
[Added] - Settings presets
[Edited] - Conv/Conc correction now has 0.001 stepping
[Edited] - Removed useless preview quality setting
[Edited] - Enhanced calculation process increased general quality of chamfers
[Edited] - Manuals have more obvious setup
[Fixed] - Input map slots not showing in SP 2019
[Added] - Extra AA module on Ultra setting
[Added] - Normal intensity correction for low texel cases
[Edited] - Dilation slider now show value in pixels
[Fixed] - Crash at scene startup if correction mask were in use
[Added] - Auto output map size compression (no need of "output size" setting)
[Added] - Separate version of Auto Chamfer 2.0b (build 0608) for SP 2018.3.3
[Added] - Separate version of example scene for SP 2018.3.3
[Edited] - Conc/Conv Sliders now have range from -1 to 1
[Edited] - Deleted useless edges mask output for better performance
[Fixed] - default preset settings
[Edited] - minor optimisation tweaks
[Fixed] - Image Input switches now work like expected
[Fixed] - Flat Chamfer switch now works in 2019.2.0
[Added] - Default 16bit output mode
[Edited] - Significant optimization and doubled performance
[Added] - Example Scene [2020.1.1]
[Edited] - Manual for SP 2020 release (Curvature bake section)
Auto Chamfer 2.2 (build 20516) - LATEST
[Edited] - Minor fixes on medium settings