Jump to content

Home

PMHH01 clipping fix, but still has problems


redrob41

Recommended Posts

I'm curious, when you hex edited your version of PMHH01 on the clipping, did you manage to fix the eyes in the prologue?

 

Sorry, but I wasn't able to fix that. I think it has more to do with the animations than the model, since it happens with at least one other head (PMHC04)

Link to comment
Share on other sites

  • Replies 52
  • Created
  • Last Reply

Well, I was searching around, and came across this older post

Hello all,

 

Here is more than you ever wanted to know about the internals of a kotor model. ;) If you were to peek into an .mdx you would see the data stored this way:

 

vertex x, vertex y, vertex z, normal x, normal y, normal z, texture u, texture v

 

As you can see geometry, shader, and texture information are stored together. This is why we have that annoying 1 to 1 relationship for geometry vertices and texture vertices. This one is kotors fault. If you want more texture verts you have to break vertices apart, which brings us to the next problem.

 

Since NWMax does not calculate normals for us and kotor can't compile models on the fly, MDLOps has to do the calculations. Right now MDLOps assumes that all polygons with welded vertices should be smoothed together. And of course all unwelded vertices will not be smoothed, even if they are in the same smooth group. This is my fault.

 

Now that I look at an ascii model output from NWMax It does appear that NWMax outputs smooth group information. I will have to see if I can use the smooth group info when calculating the vertex normals.

I then looked through the MDLOps thead and posts #114 to #120 are about smooth groups. That's where I saw this:

The idea is that KAurora will be able to import/export any model when I'm finished. I'm completing work on emitters to release the 0.3; after that, I'll tackle animations and the "missing" node types (like skinmeshes and danglymeshes). So in the end KAurora will work a bit like MDLops on steroids. I wouldn't hold my breath though; progress will be slow.

 

As for the specific question, I'm not sure I understand it fully. NWMax does export smooth group info (it's one of the values of the face array), but as far as I know there's no place within the Kotor face structure in which to put this info. I don't have the code at hand right now, but IIRC I decoded enough of the fields stored within Kotor faces to realize there was simply no place in which to put smooth group values. So unless you're proposing some built-in model preprocessing that results in... whatever it is that Max does with its smooth groups, there's no way of using that info with the Kotor engine.

 

OTOH, if you *are* proprosing model preprocessing, I could certainly do it, but I need to understand what to do first...

Maybe I should try out KAurora?

 

Also, while poking around on the internet, I found this website:

https://github.com/niv/nwn-tools/blob/master/_NwnLib/NwnMdlDecomp.cpp

Since I don't understand a thing about coding (It's an arcane language that requires sacrifices to the gods, as far as I can figure out :lol:) I have no idea if any of the commands are compatible with Kotor models. I did see that there are some lines with the word "smooth" in them, like fIncludeSmoothing. I'm hoping that someone with more coding knowledge can tell me what it all means, and if it can solve my mdl edge smoothing woes :D

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...