Alright, regarding md5mesh smoothing problems it's just been me and O'dium asking about it, cause we work on the same project.
I'm getting a better understanding of how the smoothing group for the md5mesh is created. But I'v started getting these new errors that I haven't encountered before. Maybe some of you guys who has more experience can figure out what's wrong, is it something with my workflow?
The places where the triangles show up hard has welded uv's so md5mesh isnt told to make a seam there.
Any idea what this is?
and the normal for that place
I'm eating my fingers, thank you for any assistance.
Replies
But if you think about it,. the bases of the triangles are were the seams go. They are always double the amount vertices there when I re-import, but welding them and re-exporting doesn't seem to do the trick.
And why does it only happen there?
edit: or actually it's not the bases of the triangles, either way its the vertices at the seams that keep getting the double amount of vertices.
Because der_ton's importer might be loading it in a way which causes the splitting. MD5meshes shouldn't have a problem with geometry like that.
The triangles are welded both on the UV map and the actual base mesh, and there are no hidden back faces.
I'd still suggest you have some dodgy geometry there. MD5mesh has never given me any visible issues like that before.
The problem only happens when you re-import the .md5mesh back into Max 08. The exported .md5mesh doesnt have this issue, so it works fine ingame.
I don't know whether the issue with der_ton's importer is for max 9 or something else. either way we have made a post on doom3world about this.
Is there a way in max to weld the vertices so that the faces gets the same smoothingroup as the surrounding faces? As I saw it though, the md5mesh SG in max was...well..not entirly easy to adjust by hand, if not impossible :P
Which means, we are stumped, because the scope is welded on the UV map, so it shouldn't do it.
HOWEVER...
Like we said, the actual EXPORT is fine. The model is fine and the .md5mesh, when viewed in other programs and ingame, is perfectly fine.
The problem comes from the .md5mesh importer, which for some reason wont import correctly.
Like MM said, is there anyway to weld everything together the same way .md5mesh works in the editor? Maybe we can't reimport with the correct smoothing, but as long as we have the correct smoothing to create the normals from it wont be a problem.
Thats the beauty of .md5mesh... they are a pain in the ass...
Its a pain in the arse becasue sometimes you need to hack it in various ways just to get the polyflow right so it doesn't produce odd smoothing errors, for example you need to add more loops or polies, or mess with the poly flow a lot, just to get it to look good.
You will find that if you export an MD5mesh (with 1 smoothing group over the whole mesh in 3dsmax), and then apply a flat grey material (no normalmap or special parameters, just a diffuse/spec pass), the mesh will be perfectly smooth.
The difference arises if you use "unsmoothedTangents" in the material stage where you declare your renderBump (since the renderBump parameter on its own automatically treats the whole mesh as 1 smoothing group). As soon as you use unsmoothedTangents, then the normals will be adjusted based on the UV seams.
It's not an MD5 thing, it's just something the doom3 engine does to unify all meshes. You will find the same results on ASE and LWO. If you apply a material with the renderbump parameter then the whole mesh will be smoothed. Specify the unsmoothedTangents parameter, and it will be smoothed based on UV seams. No renderbump parameter should mean the mesh preserves smoothing group info (although as Peppi says, md5 is all smoothed anyway, this will only apply to LWO and ASE).
So in summary, it is your material which might causing the smoothing change across UV seams, not the MD5 itself. If you don't want that, don't use the unsmoothedTangents flag.
It might also be worth trying the "forceSourceNormals" flag in a material if you want to preserve smoothing info, although I can't remember if this was added in ETQW or already existed in D3/Q4.
EDIT: Just spoke to our coder. Creating a normal map with unsmoothedTangents from Doom 3 will NOT work with our engine and will be wrong. So, thats not the way for us to go.
So it's more likely your programmer's fault for reading the MD5mesh file differently to Doom3/Q4/ETQW, or your exporter's fault for sending out incorrect files (since any MD5mesh exporter for Max is 3rd-party).
The .md5MESH is fine. It DISPLAYS fine ingame, with a flat local map, its perfectly fine. Remember this:
"It DOES look fine ingame, we came to the conclusion that it certainly IS the importer"
Its the importer, simple as that. When this thread was created, MM didn't know what it was, and now we know its der_tons importer that some how doesn't like some .md5mesh files.
Uh...
Please try to be consistent and provide useful information. This whole thread is basically a list of your own ignorance, and stuff you should have checked first before coming and asking silly questions.
Solution: Just weld all verts and bake with one smoothing group in Max. This whole thing is a non-issue anyway, why are you exporting to MD5mesh, then importing it again and complaining it's broken? Just use the source file.
The idea with the export importing was that I don't fully understand how the md5mesh gets it's smoothing group, cause once I reimported it, it didn't make much sence in my head. At first I did what you said, I welded all the vertices and added one smoothing groups to it and it worked fine baking until I had it ingame. The smoothing group applied to the mesh inside max didn't seem concur with the smoothing group of the md5. And I guess somewhere there I lost it, there were way to many question unsolved for me to come to a conclusion :P
Somehow I did manage to get one of the models we do have ingame to work fine both in max and in Overdose. So therefor when this "new" error showing up was cind of a mystery to me and the reason I asked was maybe, since MoP has worked with this, I could get some suggestions of what this might be.
Now I know that the problem occurs during the import, and so I'm trying to bake it using the source file with renderBump. So basiclly I have gotten an answer to the question and I thank you MoP again for the insight. I'll try to keep an update here if I come up with something new.
please ask for details if I'm still unclear about anything.
I wish Odium would take the time and effort to write such sensible and well-mannered replies
I tried first with renderBump, no luck, gave horrible smoothing and well didn't work (took a while to understand that renderBump don't like md5). I don't intend to go deeper when it's working now.
Anyway, so I started to experiment with what you guys said, and now I see what I did wrong the first time. I just added one smoothing group to the imported mesh(edit: no welding), which resolved it. However this would have never work if I haven't exported/imported, cause we tried that ages ago and it never came out right.
Well thank you guys and I hope this will help anyone who gets stuck with something like this in the future.
Excuse me? Maybe you missed the part where I said "Sorry my bad. Its not the .md5mesh at all, as such.".
Christ you can see why people cant stand you at other forums now.
I'm locking this thread now to prevent more flamebait. Please feel free to start a new thread if you run into any more MD5mesh or renderbump issues.