我的 3D 工具把掃描人頭弄得一團糟,問題不在工具本身
My 3D tool turned a scanned face into a mess. The tool wasn't the problem.
作者修正 3D 工具處理掃描頭部模型時出現的網格錯亂,並在 0.6.8 加入修復、精確面數預算及安全貼合功能。掃描頭部由 93 個獨立部分組成,修復功能會合併重複點、移除空面,並報告模型部分及開放邊。工具亦保留模型位置和比例,並能按設定面數重建模型,例如輸入 5,000,結果為 4,748 個多邊形。
My 3D tool turned a scanned face into a mess. The tool wasn't the problem.
I wrote a button that rebuilds a 3D model with fewer polygons — a normal step
before a model goes into a game. Then I pointed it at a scanned head and got
something I wouldn't show anyone.
Three things were wrong, and none of them was the button itself.
1. The head wasn't one model
It was 93 separate pieces, and many of them were open at the edges. The button
treated all of them as one surface, pulled the new mesh onto that surface, and
the result came out smeared.
Now there is a Repair button: it merges duplicate points, removes empty
faces, and tells you how many pieces the model is actually in. The rebuild also
warns about a broken model before producing the result.
2. The "how many polygons" setting did nothing
5,000 and 10,000 gave me the exact same model. The method I used can only
double the detail, so the number you type in mostly doesn't matter.
Now the tool searches for the right cell size instead, and the budget lands
where you set it: 5,000 → 4,748.
3. The model was tiny and far away
It came in scaled 26 times and sitting 300 metres from the centre of the scene.
The tool tried to fit the new surface to the origin — the wrong place — and
every point collapsed into one spot.
Two fixes: the tool now keeps the model's position and scale, and it snaps
points to the nearest part of the surface instead of pushing them through it.
What's in 0.6.8
- Repair — merges duplicate points, removes empty faces, reports pieces and open edges.
- Exact budget — the polygon count you type in is the count you get.
- Safer fitting — keeps the model's position and scale, and refuses to guess when the model is open.
- Delete the unused — shows the materials and images it will remove, then asks.
- The AI sees the buttons — a button's report now reaches the chat model.
- Fixed: a missing import made the repair silently do nothing.
blender #gamedev #3d #indiedev #python #blenderaddon
來源:DEV Community · dev.to