Development > Artwork
A (Finally!) proper low-poly head without the headache
Destructavator:
--- Quote from: Migel on September 04, 2009, 06:24:15 pm ---Now I'll tell you my version of it. Maybe I miss something or don't understand - feel free to correct me. MD2 is just mech, it have no bones, no lightmap, just polygons. As I told you, I test it on 2.2.1 - and found no problems, but the texture is just to bright. In 2.3 I have the same problem as you, but I'm sure that it no more bright than the texture! And that's it! But don't you think that the brightness itself is too high - look at the old body - it's glowing!
--- End quote ---
--- Quote from: Migel on September 04, 2009, 07:13:03 pm ---Check this out. I play a bit with gamma\brightness\contrast in game - model is fine and the texture is ok (all but alliace - wrong again in FlatTop.md2, last post of 2nd page. How did you make them?). Default brigtness is bad.
--- End quote ---
I did some research on this issue - If I got all my information right, the problem lies in how the python export script for Blender tells Blender the brightness of the texture, normal graphics used for the texture, such as Jpeg, TGA, whatever - they have a color value range for all colors (red, blue, green) of 0 to 255, total of 256 possible values.
The Quake MD2 format uses a range of 0 to 162, a total of 163 possible values for each color, according to some research on the net.
Somehow the color values aren't being converted or read properly, and as Migel said, the default brightness is bad, getting mucked up by the buggy python export script for Blender. I looked again at the python script, but, not knowing how to program in python, I can't make heads or tails of the code. I did find a line with the number "162" in the code, in a spot where I think the code is faulty, but I don't know how to correct it.
I have a feeling the faulty Blender export script isn't converting the color values between the two ranges (0 to 256 and 0 to 162) properly, which shoves the default brightness way too high. In other words, I think the python script is telling the MD2 to incorrectly read the texture, with too much brightness.
I'm attaching the Jpeg skin texture, as you can see the brightness of the texture in this graphic file doesn't look way too bright, this is how Blender creates the texture file in Jpeg format. I also loaded this Jpeg texture in GIMP and checked the stats of it, I couldn't find anything wrong or out of the ordinary with it.
Of course I could be wrong on many of these points, anyone is free to correct me, but this is my best guess.
Edit: Did some more research on the MD2 format, it contains a "LightNormalIndex" property, which I think is messed up because of the faulty python export script.
bayo:
I read a little about MD2, but the 162 limitation have nothing to do with texture. Anyway it make no sens to only use 0..162 for each color components.
But i also read this model contain normal per vertices. You can have a problem with normal description (Blender, but i dont think) or normal generation (Python script). Maybe it exists some tool to check MD2 normals.
----
Hoo and if you can rotate the texture, to have a more natural orientation of the face, maybe it can be usefull for next artists.
Destructavator:
--- Quote from: bayo on September 04, 2009, 11:09:32 pm ---I read a little about MD2, but the 162 limitation have nothing to do with texture. Anyway it make no sens to only use 0..162 for each color components.
--- End quote ---
OK, I misunderstood some of what I researched then. Thanks for checking that out for me.
--- Quote ---But i also read this model contain normal per vertices. You can have a problem with normal description (Blender, but i dont think) or normal generation (Python script). Maybe it exists some tool to check MD2 normals.
--- End quote ---
I think its the python export script - It displays fine in Blender, and I heard other people have had similar problems with the normal generation with various versions of that script, from what I researched, in some cases resulting in the same problem with the amount of lighting and brightness.
Lots of MD2 tools are out there, I'll see if I can find one that can fix or at least analyze this.
--- Quote ---Hoo and if you can rotate the texture, to have a more natural orientation of the face, maybe it can be usefull for next artists.
--- End quote ---
Won't be necessary - Once we get past these issues and a test MD2 imports into the game OK, I'll upload full source files for all the textures, texture groups, and components used to build the face and all its parts. Then anyone who uses Blender can easily re-construct their own version of the face texture, much easier than taking that rendered texture and trying to draw on it. It would all go into the data source, although we're not quite there yet because these issues with the lighting/normals still need to be worked out.
@Migel: If you happen to be reading this, could you please upload (attach in a post) a fixed, working version of the model and texture that displays properly in the game? I'd like to compare it side by side with my version that comes out of Blender, to try and get a few more clues on how to solve these issues.
bayo:
Can you check https://svn.blender.org/svnroot/bf-blender/trunk/blender/release/scripts/md2_export.py ?
If it dont work, i need to have your last Blender file, and a little help to know how to export the head myself.
Destructavator:
Nope, I tried this latest script and it still shows way too much brightness.
Before digging deeper into what the python script is doing, perhaps I'm not testing it in the game properly - I only modified one .ufo file, the "team_humans.ufo" file, so it reads like this:
--- Code: ---models {
female {
soldiers/female body head01a 0
soldiers/female body head01b 0
soldiers/female body head01c 0
soldiers/female body head03a 0
soldiers/female body head03b 0
}
male {
soldiers/male body head01a 0
soldiers/male body head01b 0
soldiers/male body head02a 0
soldiers/male body head02b 0
soldiers/male body head03a 0
soldiers/male body head03b 0
soldiers/male body FlatTop 0
}
}
--- End code ---
Am I doing this right? (The md2 is called "FlatTop.md2".)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version