AssetConversion should generate tangents and normals
AssetConversion should generate tangents and normals to wherever they are needed. The KmfLoader already loads up existing J3M files. They can and should be enchanted. If the loader detects a normal map used in the material -> generate tangents and normals for the mesh.
This should be already done (and it is trivial) so that artists or playful developers can play with the graphics.
Well, this is not as trivial as I thought... The generator crashes. I've seen few warnings from the models. And I think I know why... The normals (looking at Tablet.kmf here, but quite possibly many many others) aren't correct. I see a lot of NaNs etc.
It is not impossible to calculate the normals, with this detail, polygon count, almost any algorithm will do. But if the original normals are modified by artists.. I'll have to really look into this before going to generate the normals.
Yeah... I'm no graphic artist, but this is a bad set of normals? Look how the light embraces the model...

This is even better angle:

The normals don´t look right at all... Did you make a comparision to DK? AFAIK it had some features that weren´t correctly implemented at all, due to lack of computing power (like bumpmapping).
I don't know how to properly compare it. The lighting system in DK is not probably a real thing, just baked. And shadows calculated from 4 points. And where there is light, it is Goraud shading. As opposed to Phong that we use. And as just said, the bumpmapping is not used. So there was only little use for normals? Although there is few bumpmaps there which can actually be enabled with some flag. I've never tried it. I think it was for lava mainly.
Ill go with the generating. I checked and I think we read the normal correctly. As far as the format is known. The generating isn't really that hard. Except the results may not be 100% correct for all models, but probably better than this..
This is my source: http://www.bytehazard.com/articles/vertnorm.html
Well the water looks horrible, the lava on the other side looks a little bit better. You even see how static the lighting is on the water, because the pattern is always the same.
If you want to check it out just add -enablebumpmapping -enablebumpluminance in the shortcut
I have to try tomorrow :) I looked up some of the models and some are ok. Let's see how the generation goes. It can be flagged, it can be try catched to the tangent generation (or sanity check about the NaNs on normals..).
Tangents are now generated. But of course there is the issue with the animations. They don't update or have separate normals or tangents for the frames.