yoob
06-11-2008, 07:09 PM
Hello.
I am making a mod for a game based on the unreal engine. It's kinda hard to mod, because even though the engine is pretty popular, the game itself changed it very heavily, and because of no assistance from the developers, the modding tools rely mostly on backwards engineering.
Recently a tool that allowed people to import their own objects into the game code popped up. However, there is a problem with it - it will only "like" certain types of .obj files.
I have no idea what this is called, so i'm just going to explain it simply. If you open an .obj file in a text editor, for example notepad, you will see lots of numbers. If you scroll down, at some point you will see values put in a x/y/z format, for example:
f 657/533/917 650/535/925 610/499/856
f 664/536/926 630/511/882 659/534/919
f 651/528/911 652/529/912 654/527/914
f 662/531/923 665/532/927 622/508/874
Now, the only type of .obj files that the program i mentioned before will be able to process properly, is the one in which all these values are equal. for example:
f 298/298/298 252/252/252 212/212/212
f 607/607/607 404/404/404 221/221/221
f 619/619/619 244/244/244 404/404/404
f 357/357/357 300/300/300 214/214/214
I have managed to achieve such equality in the values by exporting and importing the obj file several times through 3ds max before saving for the final time. However, this only is true when i am manipulating objects i have extracted from the game. In the case of objects i made entirely by myself from scratch, i can never make those values perfectly equal.
Ive researched a bit and realized that these numbers represent vertexes, texture coordinates, and normals. I always seem to be able to make two of these numbers equal, and by trial and error i have estabilished that the value that is always off, is the value assigned to texture coordinates. I just saved the obj without the texture coordinates, and the numbers that were off just disappeared into nothing, leaving out the two equal values.
This:
f 32/64/32 45/93/45 46/95/46
f 32/64/32 46/95/46 33/67/33
f 33/66/33 46/96/46 47/97/47
f 33/66/33 47/97/47 34/69/34
Turned into this:
f 32//32 45//45 46//46
f 32//32 46//46 33//33
f 33//33 46//46 47//47
f 33//33 47//47 34//34
Now, i have to say that i have never bothered with these numbers, because well.. i just didnt see a reason to. The UV mapping, rotation, and everything shows up just fine in every imaginable 3d application, even if the numbers are jumpled up like in my first example. The game however, does require them all to be the same.
So, I ask you this, cgtalk: Is there a way to make uv maps that when exported in an obj file, would make those three numbers equal? So far i have tried programs called Ultimate Unwrap 3d, and Bodypaint 3d to make the coordinates. I've tried to do it manually and automatically, but never succeeded. I use 3ds max 7 for modelling.
Also, obviously, i could change those numbers in notepad by myself, but it would take really long for some advanced objects, and i dont imagine such manipulating of the file would create any pretty uv maps that i could paint on.
I am making a mod for a game based on the unreal engine. It's kinda hard to mod, because even though the engine is pretty popular, the game itself changed it very heavily, and because of no assistance from the developers, the modding tools rely mostly on backwards engineering.
Recently a tool that allowed people to import their own objects into the game code popped up. However, there is a problem with it - it will only "like" certain types of .obj files.
I have no idea what this is called, so i'm just going to explain it simply. If you open an .obj file in a text editor, for example notepad, you will see lots of numbers. If you scroll down, at some point you will see values put in a x/y/z format, for example:
f 657/533/917 650/535/925 610/499/856
f 664/536/926 630/511/882 659/534/919
f 651/528/911 652/529/912 654/527/914
f 662/531/923 665/532/927 622/508/874
Now, the only type of .obj files that the program i mentioned before will be able to process properly, is the one in which all these values are equal. for example:
f 298/298/298 252/252/252 212/212/212
f 607/607/607 404/404/404 221/221/221
f 619/619/619 244/244/244 404/404/404
f 357/357/357 300/300/300 214/214/214
I have managed to achieve such equality in the values by exporting and importing the obj file several times through 3ds max before saving for the final time. However, this only is true when i am manipulating objects i have extracted from the game. In the case of objects i made entirely by myself from scratch, i can never make those values perfectly equal.
Ive researched a bit and realized that these numbers represent vertexes, texture coordinates, and normals. I always seem to be able to make two of these numbers equal, and by trial and error i have estabilished that the value that is always off, is the value assigned to texture coordinates. I just saved the obj without the texture coordinates, and the numbers that were off just disappeared into nothing, leaving out the two equal values.
This:
f 32/64/32 45/93/45 46/95/46
f 32/64/32 46/95/46 33/67/33
f 33/66/33 46/96/46 47/97/47
f 33/66/33 47/97/47 34/69/34
Turned into this:
f 32//32 45//45 46//46
f 32//32 46//46 33//33
f 33//33 46//46 47//47
f 33//33 47//47 34//34
Now, i have to say that i have never bothered with these numbers, because well.. i just didnt see a reason to. The UV mapping, rotation, and everything shows up just fine in every imaginable 3d application, even if the numbers are jumpled up like in my first example. The game however, does require them all to be the same.
So, I ask you this, cgtalk: Is there a way to make uv maps that when exported in an obj file, would make those three numbers equal? So far i have tried programs called Ultimate Unwrap 3d, and Bodypaint 3d to make the coordinates. I've tried to do it manually and automatically, but never succeeded. I use 3ds max 7 for modelling.
Also, obviously, i could change those numbers in notepad by myself, but it would take really long for some advanced objects, and i dont imagine such manipulating of the file would create any pretty uv maps that i could paint on.
