Object Shade Flat
ComfyUI Node Guide
- BPY_OBJ
- BPY_OBJ
Object Shade Flat is about as simple as this pack's nodes get - one button, no parameters - and it's the opposite of the polish work most of Avatar Graph's shading nodes do. Avatar Graph is Avatech's node pack for rigging static character illustrations into real-time interactive avatars inside ComfyUI, and while a lot of its shading-adjacent nodes (like Mesh Smooth Normals) exist to soften faceted-looking geometry, this one deliberately does the reverse.
It wraps Blender's bpy.ops.object.shade_flat operator - the "Shade Flat" command from the object right-click menu, the counterpart to Shade Smooth. Where smooth shading interpolates normals across a surface so it reads as continuous and curved even on relatively low-poly geometry, flat shading forces every single face to render with its own hard, uninterpolated normal - every polygon edge becomes visually distinct, giving that classic low-poly, faceted look.
There's nothing to configure beyond the object itself:
- BPY_OBJ - the mesh you want to switch to flat shading.
Output is the same BPY_OBJ, now shaded flat.
Where this fits in an avatar workflow: most of the time, for organic character parts (eyes, mouths, faces), you want smooth shading - that's the default look most avatar rigs are going for. But if part of your rig is intentionally stylized, low-poly, or geometric (an accessory, a prop, a deliberately blocky design choice), or if an earlier node in your graph applied smooth shading and you need to undo that for a specific part, this is the node that flips it back. It's also just a handy reset if you're troubleshooting shading weirdness and want to isolate whether the issue is actually in the geometry/normals or just in how it's being shaded.
Installing it: no standalone install - this comes bundled with the entire Avatar Graph pack. Easiest path is ComfyUI Manager, searching "Avatar Graph" or avatar-graph-comfyui. Manual install: cd ComfyUI/custom_nodes, then git clone https://github.com/avatechai/avatar-graph-comfyui, cd in, pip install -r requirements.txt, restart ComfyUI.
The install detail that actually causes headaches: Avatar Graph requires Python 3.10.x, exactly, because its bpy dependency - Blender's API packaged as a standalone library - only ships wheels for that version. Anything newer, which is the default on most fresh ComfyUI setups, and the install just fails. The README's own suggested fix is a dedicated environment: conda create --name comfyui python=3.10, activate it, install ComfyUI's requirements first, then this pack's. If you want the live avatar preview inside Avatech's web editor, also launch with --enable-cors-header (Mac users add --force-fp16); skip that flag and everything still computes correctly, you just export .glb/.gltf and view results in Blender instead of a live in-browser update.
One small thing to keep in mind: shading is purely visual - it doesn't touch geometry, UVs, or vertex positions at all. If you're expecting this node to fix a mesh problem beyond how it looks under light, it won't; you'd want one of the pack's actual mesh-editing nodes (Remove Doubles, Tris To Quads, and so on) for that.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |