Source Filmmaker

Source Filmmaker

drull Oct 3, 2021 @ 8:00am
Blender to SFM model error
Hi, I'm trying to port a very simple model to SFM but I don't know why it looks different in SFM, it's like new faces are created that are not created in Blender. Here are the screenshots:

https://imgur.com/a/gyy76Th

I have ported more complex models before but this has never happened to me
< >
Showing 1-5 of 5 comments
Zappy Oct 3, 2021 @ 9:44am 
Originally posted by Drull:
Hi, I'm trying to port a very simple model to SFM but I don't know why it looks different in SFM, it's like new faces are created that are not created in Blender. - [Screenshots] -
The front/back of the cherry shape is a concave polygon. 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 without turning both clockwise and counter-clockwise? If so, it's convex, which is good.
But if it has to turn both ways 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: You 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.
Last edited by Zappy; Oct 3, 2021 @ 12:17pm
Pte Jack Oct 3, 2021 @ 11:14am 
The front and back faces of the cherry are N-Gons (meaning that they are made up of more than 4 vertexes.)

Like Zappy says, StudioMDL does not like Ngons very much (it's an old compiler) and when it does it's optimization process to convert to mesh to TRIs, it tries to fill in gaps, especially in concave/convert mesh (that's the added faces in the crossed stems).

As Zappy suggests, the best way to fix this is to slice the model's N-Gon faces into Quads or Tris yourself. Whether or not Blender will create the Tris or Quads using the convert to Tris or a triangulate modifier for you, I don't think so, not in a mesh like this one. I think you're going to either knife in the edges manually or get rid of the N-Gon faces, select edges and press F to add new faces. (The knifing option would be better because the mesh is already unwrapped to use the textures).
Zappy Oct 3, 2021 @ 12:15pm 
Originally posted by Pte Jack:
- N-Gons (meaning that they are made up of more than 4 vertexes.) -
Technically, an n-gon is simply a polygon with an unspecified amount of vertices (much like "polygon" itself, too). Triangles, quads, hexagons, and more are all n-gons.

Originally posted by Pte Jack:
- the best way to fix this is to slice the model's N-Gon faces into Quads or Tris yourself. -
As long as all polygons are convex (and flat, and have consistent UV-mapping), it doesn't really matter too much how many vertices each polygon has.
(Additionally, even a quad can be concave (if you make it like a "V" kind of shape), which can still run into this issue too. Only triangles are guaranteed to be safe.)

Of course, manually triangulating a mesh to make the triangles as evenly-sized and non-stretched as possible will be better than automatic triangulation when it comes to vertex-based shading and such, and Blender's triangulation is better than StudioMDL's (in general), but for the sake of avoiding "out-of-bounds" triangulation, it doesn't matter as long as all polygons are just convex (and flat).
drull Oct 7, 2021 @ 6:07am 
Sorry!! I completely forgot to thank you, you were really helpful and it was fixed perfectly. You gave a long and clear explanation, which helped me. I had no idea about this, it's something I will keep in mind from now on, thank you both very much!
drull Oct 7, 2021 @ 6:09am 
Originally posted by Zappy:
Originally posted by Drull:
Hi, I'm trying to port a very simple model to SFM but I don't know why it looks different in SFM, it's like new faces are created that are not created in Blender. - [Screenshots] -
The front/back of the cherry shape is a concave polygon. 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 without turning both clockwise and counter-clockwise? If so, it's convex, which is good.
But if it has to turn both ways 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: You 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.

Yeah, in fact the "triangulate" modifier did it by itself and saved me from having to do it myself.
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Oct 3, 2021 @ 8:00am
Posts: 5