meshfx // GLB NORMALS
How to fix flipped normals in a GLB file
You fix flipped normals in a GLB by correcting face orientation in your 3D editor and exporting again, because glTF draws only counter-clockwise front faces unless a material is marked doubleSided. Check for a negative scale too: in glTF, a mirrored node reverses the winding, which turns everything under it inside out.
pyrofx effects work today, and new accounts start with $5 of usage.
meshfx measures faults, checks repairs and makes LODs for a triangle budget. meshfx runs on the hosted API: try it in the Playground.
- Front face: counter-clockwise winding
- Material
doubleSidedis false by default - A negative node scale reverses the winding
01 // WHY
What decides the front face in glTF
The glTF spec defines the front face by vertex order: counter-clockwise as seen from the front. The stored normals (the NORMAL attribute) only affect lighting, so a face can be culled for its winding while its normal points the right way. When a file has no normals, the spec tells viewers to compute flat ones from the winding.
A node whose transform mirrors the model, such as a scale of -1 on one axis, reverses the winding of every mesh under it.
02 // HOW TO
Fix the faces and export the GLB
- Open the GLB in a glTF viewer or your engine and note whether faces vanish (winding) or draw dark (normals).
- Import it into your 3D editor, turn on face orientation, and apply any negative scale.
- Recalculate normals outside, and flip faces that stay wrong.
- Export the GLB with normals included.
- Leave materials single-sided unless the mesh is a card, such as leaves or a flag; for those, turn on the material's double-sided option so the exporter writes
doubleSided: true.
meshfx retains existing UVs during triangle reduction. Create the texture atlas in your editor. Hosted meshfx runs are available in the Playground.
03 // IN THE ENGINE
How engines read doubleSided
GLTFLoader in three.js turns doubleSided: true into side: THREE.DoubleSide, and Godot's importer sets the material's Cull Mode to Disabled. Both cull back faces otherwise. Setting material.side = THREE.DoubleSide yourself hides missing faces in three.js, but their lighting stays wrong until the file is fixed.
If the model is still missing in three.js, measure it with Box3, check the camera's near value, and check whether it loaded far from the origin.
How do I flip normals in three.js?
Fix the GLB in your 3D editor and export again. In code, THREE.DoubleSide hides the symptom while a real flip reverses triangle index order.
How do I fix flipped normals on a GLB in Godot?
Fix the mesh in your 3D editor and reimport. Setting the material's Cull Mode to Disabled draws both sides as a temporary stopgap.
Why does my GLB look black or inside out in the engine?
Either its normals point inward, darkening lighting or its winding is reversed by a mirrored node, culling front faces. Apply scale and recalculate normals.
Why are parts of my glTF missing when three.js loads it?
Faces wound the wrong way are culled because doubleSided is false by default. Check face orientation in your 3D editor, camera near plane and size.
Explore meshfx outputs
Inspect compiled meshfx outputs and their reports. Hosted meshfx runs are available in the Playground.