I don't quite understand what's a "smoothing group" in this context.
In Blender the model has all double vertices deleted, "sharp edges" set (those in cyan), but not applied on export (the original "skin render" models distributed ages ago had this same sharp edge setup)
Somehow the wheels don't show up in the modeler and vehicle editor.
Are there any settings affecting this (other than the 'show wheels' option)?
I came into the modeler via the vehicle editor.
I'm running LFS 0.6W43 and the editor via PlayOnMac on a macbook (that could be an issue). Wheels do work perfectly in-game though.
I'm not sure how familiar you are with LFS modeller, but a smoothing group is a property of a triangle that allows it to share normals ("be smoothed with") neighbouring triangles that have the same smoothing group.
Consider a cube. It has only 8 vertices in the editor. Each corner doesn't have 3 vertices with a different normal (it does in the 'output mesh' that is ready for drawing, but in the LFS editor model there is only one vertex at each corner). The 3 faces that meet at that single vertex must have different smoothing groups, so that the cube has sharp edges. A cube needs 3 smoothing groups in total. A cylinder would use one for the curved surface and one for the ends.
When you export from blender, you do produce multiple vertices at a single point if there is a sharp edge there. LFS will merge these vertices into a single vertex, but only after analysing the mesh and assigning smoothing groups, so that the sharp edges are retained after processing.
When it says it ran out of smoothing groups, that means that it had difficulty assigning a smoothing group to one of the surfaces. This may mean that a lot of different smoothing groups shared an edge with that surface. It might not be a real problem - it might just mean there isn't a sharp edge where there should be.
You might need your human brain to fix it, if it is a problem. The thing to do, is go into "tri" mode in the modeller, and select "groups" at the bottom right, and see how it has assigned the smoothing groups (they are colour coded). You might find a clue there, maybe something where there are loads of smoothing groups but it's completely unnecessary. It's hard to know. I had a few test meshes for Blender exports but probably haven't covered everything that could go wrong.
Running out of smoothing groups means you reached 24 smoothing groups. But normally a mesh only needs 5, 6 or 7 groups. In 'subob' mode there is a 'compress groups' button to reduce the number of groups without changing the appearance. So it's worth having a look in there to see what's up. Maybe a lot of smoothing groups meeting at a point so LFS wasn't about to assign low group numbers. Or you could send us the OBJ file if you'd like me to have a look.
thanks for the in-depth reply. There's something odd going on with the smoothing groups then, as this is what the "groups" mode shows:
the uninterrupted mesh is the part of the model from that old "Blender skin render" package, and the harlekin mesh is everything I did new.. I'm sure this is more an issue of Blender than your Editor, given this is at its core some very old mesh that moved through generations of Blender through the years.
ok, went about trying to do the "copy the old mesh into a new Blender instance and join it to the default cube" trick, which is regularly advised to clean old mesh data of superfluous leftovers.. it didn't quite work as intended:
send you a mail via contact with the files. Maybe there's some weird quirks with the OBJ exporter going on, I'm on 2.93.0 beta
Looking at your first picture, there must be some reason why Blender is exporting those separate pairs of triangles of the window (or the front splitter, etc) as separate surfaces.
I noticed in Aleksandr_124rus's post something about edge angles. Could it possibly be the edge angle is too small on yours?
One way or another, your Blender export is creating multiple vertices so that those pairs of triangles are being exported not actually connected with their neighbours. Can you detect multiple vertices there in Blender? Those smooth surfaces need to be single surfaces (though I don't know what the terms are in Blender).
I'd have to ask my son but he's at school. I have no idea about Blender and he isn't really good at it either. Could try later if you don't figure it out before then.
so ofc I tried another thing right after that post and sending the email: I applied the Edge Split modifier (which will split up the mesh and duplicate vertices at the desired edges), and then in the export settings unticked all the boxes under "Geometry" - that somehow made it import fine. So I assume Blender's exporter is the culprit here
No, apparently you can't right now, that exactly was my result of those trials above. The moment I hit "Apply" on the Edge Split modifier in Blender, the mesh is split up according to the smoothing settings I created with those sharp edges. The LFS Editor imports this raw mesh with its Normals and bundles them into Smoothing groups according to each meshs Normals' orientation.
oh well, that modifier does indeed completely separate the mesh geometry.. I don't know if it's ok with the actual game engine, I am pretty sure it wouldn't do well with the future real time shadows if you want to do something for the long term.
it's what other game engines do as well, at least Unity and the Assetto Corsa engine (or any that use the FBX format, as that one will separate the mesh just the same as I did here). I'm not even sure any game engine doing hard edges does it any different
I'm not certain what you are saying, but I'll say this in case it helps:
The mesh geometry needs to be separated in the OBJ export (from another program) so that LFS can assign smoothing groups by flood-filling separated sections of smoothed geometry (would you say 'surfaces'?). But after the smoothing group assignment, the matching vertices are merged to LFS editor model 'points' which are shared between smoothing groups and colours (mappings).
All triangles have a mapping. If you want them to use a different mapping, then select them all and click on the mapping's name down at the bottom left of the screen in tri mode.
Triangles don't have a cutout. They only have a mapping, which in turn has a cutout. A cutout may have a real texture or maybe a blank texture page.
You can't delete a mapping if triangles are using that mapping. They will first need to be assigned to another mapping. Then the mapping will appear red (unused) and can be deleted.
I'm not sure if that helps, because I can't clearly understand what you want to do.