﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
8999	Add option to save GLTF with faceted triangle appearance	kristen.browne@…	Eric Pettersen	"There is a GLTF header value material interpolation with values smooth or flat that controls if triangles are flat shaded.  Kristen wants flat shading for NIH3D pipeline when the output is single color models intended for 3D printing.


On May 11, 2023, at 2:19 PM, Browne, Kristen (NIH/NIAID) [C] wrote:

https://google.github.io/filament/Materials.html#materialdefinitions/materialblock/vertexandattributes:interpolation
 
I think this is what we’re after.  It’s defaulting to smooth and we need to set it to flat for any of the -print presets.
 
Thanks!
 
K
 
Kristen Browne, MSc, MscBMC
Contractor – MSC, Inc. | A Guidehouse Company 
3D Modeling and Biovisualization Specialist
Bioinformatics and Computational Biosciences Branch (BCBB)
OCICB/OSMO/OD/NIAID/NIH

---


From: Tom Goddard 
Subject: Re: gltf smoothing attribute:
Date: May 11, 2023 at 3:11:19 PM PDT
To: ""Browne, Kristen (NIH/NIAID) [C]""

Hi Kristen,

Wow!  I have read so much of the GLTF spec but still there are parts I never saw, and this is one of them.  So this material ""interpolation: flat"" setting tells it to not interpolate across triangles.  That is simpler than removing normal vectors.  I am a bit puzzled that it says that all fragments (ie pixels) inside a triangle get the same shading, but if normal vectors are provide how is that shading computed?  Does it use the average of the 3 normal vectors?  That would give a different appearance than if there were no normal vectors.

It should be easy to add an option when saving gltf to use flat interpolation instead of the default smooth.

	Tom


"	enhancement	assigned	high		Input/Output				Elaine Meng Tom Goddard				all	ChimeraX
