b@rtu$ said:
Zimke Zlovoljni said:
Hi mtarini, there is one thing I noticed lacking that could come in handy, exporting obj's with preserved hard edges and tangent directions, atm when you export obj's, hard edges and tangent directions get lost. For me this is a big "must be" since often I want to rework something and then basicly I have to work on hard edges over again and every little time consumer is a big nuisance.
+1
I must have it too....
Are
hard-edges not preserved in exported OBJs? if so, that should be considered a bug.
ps: but, mmm, it seems they are! If I export a OBJ in OpenBRF, then directly re-import it, it has exactly the same hard edges it originally had.
(for example, try this: take a model and "recompute normals" multiple times, with different amount of hard edges, and export it in different OBJ every time; now re-import each model, and you'll see each has the correct amount of hard edges).
I think the problem might be with the other application you are using to retouch the models (blender, maya, wings3D... whatever). Either it is failing to load the hard edges from the OBJ, or it fails to store them when it exports it back.
As for
tangent directions, it is a different issue: OBJ cannot store them, so there's no way to preserve them in a OBJ file.
Digression: on the other hand, I think I remember that the situation with tangent directions is a bit different that what OpenBRF would lead you to think, and what I originally assumed when I wrote support for tangent dirs (I think my source is the usual Cmpxchg8b).
In short, I think the game will recompute them if they are not present in a mesh. The way OpenBRF computes them might be a bit different, but not really much (there's not mush space for interpretation when it comes to defining tangent dirs, given a UV map).
If that's correct, it means that even if, within OpenBRF, absence of tangent directions will cause bumpmapping to go horribly wrong, in the game it won't.
If that's confirmed (anyone?), it would mean:
(1) that you can save yourself the hassle to restore them after reimporting a OBJ, except for previewing purposes inside (current versions of) OpenBRF'
(2) that future versions of openBRF (if there will be any) should, probably, silently compute and use tangent dir every time they are needed, for previewing purposes (recall openBRF preview has the only objective to be as similar as possible as the game);
(3) that I don't really understand why TW has chosen to include tangent directions in the BRF format in the first place -- if it is only to save the time to recompute them: then my bet is that loading them is more time consuming than computing them anyway.