Milkshape, Smoothing Groups and CMP Exporter
-
Did any of you experienced FL modelers ever have the problem of smoothing groups in Milkshape not working at all in Freelancer?
Like, if the model looks right in Milkshape, you’d assume the same smoothing will be ingame - but thats not the case.
Smoothing groups (any sort of welding/unwelding done in Milkshape, actually) is completely ignored, or so it seems.
It looks like the cmp exporter is doing its own business when it comes to smoothing alltogether.I can gain a little control over smoothing by making an actual mesh group out of every smoothing group I manually created.
But overall it seems like any sort of smoothing should not be done in Milkshape when it comes to Freelancer models. (maybe smoothing/unsmoothing in Autodesk 3DStudio Max and then import into Milkshape and export into .cmp works? anybody?)Does anybody do smoothing in Milkshape with proper results ingame?
-
the mesh groups are relevant only. it seems, that whenever two faces have one edge on the same coordinates, these faces are being welded ingame unless they are different mesh groups in milkshape. however i experienced unwelding a geometry entirely, converting it to cmp and seing the welding on some face pairs while not on others.
-
Gisteron wrote:
however i experienced unwelding a geometry entirely, converting it to cmp and seing the welding on some face pairs while not on others.Indeed, which led me to believe that maybe Milkshape smoothing is not compatible with the CMP exporter (or something like that), because the cmp exporter does definately not smooth everything which is in one mesh group.
Im also pretty sure that this has nothing to do with the FL engine itself, but is rather an exporter problem.Is the source for the cmp exporter public?
-
Just thought I’d throw my rusty 2 cents into this one, I hope I can help you, w0dk4.
I remember reading a thread once, a long time ago - there were even pictures attached to prove its relevancy. It was about getting smoothing in FL right. Well, based on long-term memory, here it goes:
Smoothing groups are not exported by the CMP exporter in any way, in fact, the FL engine does smoothing on its own. The way smoothing is implemented in FL is not based on smoothing groups of any kind, but, surprisingly enough, texture coordinates.
To put things short, if a texture is continued/repeated over an edge, that edge is going to be smoothed. If there is a texture boundary, like a border with a different texture (this seems to explain your partial control over smoothing), or just a “break” in the continuity of the UV map - that is, the UV map continues on the same texture, only at different coordinates, FL considers that edge to be, well, an “edge” and so it won’t be smoothed.I know that this implies that, contrary to what you just said, it has to do with the engine and not the exporter, I am almost confident that I have fixed a smoothing problem using this method a long-long time ago.
See if this helps you out. -
Funnily enough you had the same problem in the past but didnt post a solution
http://the-starport.net/modules/newbb/viewtopic.php?topic_id=449&forum=9
Anyways, I’ll do some testing and try to get to the root of all of this
-
Ok, this is definately an exporter problem and not being done by the engine.
To reproduce, just do a simple test. Create a box in milkshape. It will automatically have the proper smoothing groups and will have its edges unsmoothed.
Now, export that to a .cmp file.
Open up the .cmp file and look at the VMeshData. It will have normals that are interpolated (-> smoothed). To verify that the exporter screwed up, re-import into Milkshape and render it with smoothing enabled. You will see that two corners of the box are smoothed.Same happens when you export a sphere for example.
The smoothing you do in any modeling program wont matter, the exporter will apply its own smoothing, based on mesh groups it seems. That would be “okay” if the exporter would smooth reliably based on mesh groups, but what’s really bad about all this is that the exporter doesnt even smooth correctly.
Try the sphere example, there will be hard-edges on it.How on earth did nobody ever notice this? Am I doing something wrong?
(btw. it doesnt matter if you use cmp exporter 0.2 or 0.3, both have the same issue)
-
I always thought it was because MilkShape does not weld all close vertices.
This can be easily seen by doing the weld operation on a sample mesh and then zooming in very very closely - several joints will not be welded still.
I couldn’t find any solution, e.g. how close 2 vertices have to be for automatic welding. Somewhere I read it was the snap distance, but this was far greater when I had the problems.
So the only way I could get some models to look right was to reweld each and every joint manually with Ctrl-N and then Ctrl-W.
-
The problem over there, if my memory serves me correctly, was a simple duplicate poly that was invisible in Milkshape, but caused the above mentioned thing.
The model was also a bit troubled, because of all the manually created faces. Never ever got a SUR file to work properly on that one, though I remember Lancer’s Sur builder produced very good results. Too bad it always forgot about a wing.
Back to topic: in this case, that thread about smoothing was completely wrong. I do remember seeing one, can’t find it, though. If that’s the case, sorry for messing things up. Really, I wonder what’s up with this one, though. If the normals exist but are bad in the produced CMP file, it’s definately the exporter, that’s for sure.
-
+1 for above post…lol