STEAM 组
Blender Source Tools BleST
STEAM 组
Blender Source Tools BleST
279
游戏中
1,783
在线
成立于
2013 年 11 月 8 日
所有讨论 > Help > 主题详情
Kerristrasz 2022 年 3 月 15 日 下午 5:54
Extra faces when exporting model
I've made a model that appears fine in Blender, but when I go to export it, I get a bunch of extra triangles where there should be a gap. I tried removing the collision model to see if that changed anything, and I got the same result. I have a feeling the problem has something to do with the reference mesh being concave, but from my searching online it doesn't seem like that's an issue. What exactly am I doing wrong here?

Blend file: https://pasteall.org/blend/5b83f349e3c34c01ae21e8bbae70b955
Qc file:
$modelname "props_doors/time2mine/oak_door.mdl" $scale 1 $surfaceprop "Wood" $staticprop $body mybody "oak_door.dmx" $sequence idle "oak_door.dmx" fps 1 $collisionmodel "oak_door_phys.dmx" { $concave }
Resulting model: https://imgur.com/a/1dHcs4J
引用自 Zappy:
引用自 java.lang.SkillException
- I have a feeling the problem has something to do with the reference mesh being concave, -
That's correct. StudioMDL's triangulation can sometimes mess up with concave polygons, so you should cut the concave polygon into multiple convex polygons instead.

For example, picture that your polygon's edge is a road, and place an imaginary car on it.
Can the car complete an entire lap around the polygon while only turning clockwise (or only counter-clockwise)? If so, it's convex, which is good.
But if it has to turn the other way at some point, the polygon is concave, and you have to split it (at the point where the car turns the second way) to try making multiple convex polygons instead.

In other words, the outside edge must always curve "inward", never "outward". If it curves "outward", you have to cut it where it starts curving out (even if this is for every vertex along a curve).


TL;DR: In this example image (with a cherry pin instead of a door), you'd have to cut at the blue lines in https://imgur.com/LBcHTXE ...or alternatively just use Blender's "Triangulate Faces" option to turn the polygon entirely into triangles.
< >
正在显示第 1 - 2 条,共 2 条留言
该讨论串的作者已表示此帖子解答了原先的主题。
Zappy 2022 年 3 月 16 日 上午 8:06 
引用自 java.lang.SkillException
- I have a feeling the problem has something to do with the reference mesh being concave, -
That's correct. StudioMDL's triangulation can sometimes mess up with concave polygons, so you should cut the concave polygon into multiple convex polygons instead.

For example, picture that your polygon's edge is a road, and place an imaginary car on it.
Can the car complete an entire lap around the polygon while only turning clockwise (or only counter-clockwise)? If so, it's convex, which is good.
But if it has to turn the other way at some point, the polygon is concave, and you have to split it (at the point where the car turns the second way) to try making multiple convex polygons instead.

In other words, the outside edge must always curve "inward", never "outward". If it curves "outward", you have to cut it where it starts curving out (even if this is for every vertex along a curve).


TL;DR: In this example image (with a cherry pin instead of a door), you'd have to cut at the blue lines in https://imgur.com/LBcHTXE ...or alternatively just use Blender's "Triangulate Faces" option to turn the polygon entirely into triangles.
Kerristrasz 2022 年 3 月 16 日 上午 10:57 
引用自 Zappy
...or alternatively just use Blender's "Triangulate Faces" option to turn the polygon entirely into triangles.
Yep, that worked perfectly. Thanks!
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50

所有讨论 > Help > 主题详情