project-navigation
Personal tools

Author Topic: A (Finally!) proper low-poly head without the headache  (Read 40071 times)

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #30 on: September 03, 2009, 03:07:01 am »
Whoa!  I re-exported the texture and got it to display in-game (2.3), and the good news is the size and position looks OK, but the lighting is totally effed-up, just on the head.

I've been using the modified MD2 export script for blender that's in the trunk SVN, under tools, I'm not sure if that's what the issue is or not.

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #31 on: September 03, 2009, 04:17:13 am »
Well, I've loaded the MD2 I made in other modeling programs, they show the model and texture just fine, but after re-exporting and trying to view it in-game, it still shows way too brightly.

If anyone else wants to try, the latest models are in that post on the second page (at the bottom).
« Last Edit: September 03, 2009, 06:18:37 am by Destructavator »

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: A (Finally!) proper low-poly head without the headache
« Reply #32 on: September 03, 2009, 07:39:46 am »
maybe progressive jpegs? try tgas - also make sure to set the four skins as .texture1, .texture2, .texture3 and .texture4

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #33 on: September 03, 2009, 09:49:21 pm »
thx for this funny screenshots :)

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #34 on: September 03, 2009, 10:06:40 pm »
maybe progressive jpegs? try tgas - also make sure to set the four skins as .texture1, .texture2, .texture3 and .texture4

Well, I'm stumped - it seems the clunky MD2 export script for Blender is broken.  I did some research on it, just yesterday they released a new version update for Blender with a new MD2 export script, and it still doesn't work right, the model in-game has way too much light and brightness.

I looked at the discussion in Blender forums on the updated MD2 script, apparently I'm not the only one having this issue, the new release was supposed to fix it - I saw the Python code but have no knowledge or skill whatsoever in programming in Python, so I can't fix it.

As for "set the four skins..."  the script doesn't even have that feature, it gives only three options: one for the desired MD2 output filename, one for the animation file, and one for a texture path.

This python script for Blender is clearly not working for UFO: AI and is far beyond my expertise to fix.

Migel got the texture to display right on the earlier versions I posted that simply had the wrong scale and position.

@Migel:  If you're reading this, would you please explain how you fixed the MD2 texture?  What software tool did you use and how did you do it?  I obviously can't get it to work from Blender, tried for hours, and of all the zillions of other MD2 tools out there I have no idea which one could convert it or fix it.

I was able to import the MD2 into MisFit Model 3d, another modeling program on SourceForge, but I can't figure out how to fix the texture within it.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: A (Finally!) proper low-poly head without the headache
« Reply #35 on: September 03, 2009, 10:50:20 pm »
you have seen the export script that hoehrer commited to our svn? it somewhere in src/tools

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #36 on: September 03, 2009, 11:02:38 pm »
you have seen the export script that hoehrer commited to our svn? it somewhere in src/tools

ah, there? I was looking for it recently. I thought it must be in contrib/scripts but it wasn't..

-geever

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #37 on: September 03, 2009, 11:05:13 pm »
you have seen the export script that hoehrer commited to our svn? it somewhere in src/tools

Yes, and that one doesn't work either, at least with the latest version of Blender.

Edit:  ..Unless I'm improperly testing the models - I tried to test them in-game by editing "team_humans.ufo" under "ufos" under "base."  Was this the wrong way to test it?
« Last Edit: September 03, 2009, 11:07:40 pm by Destructavator »

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #38 on: September 04, 2009, 04:20:32 am »
Ah-Ha!  I'm on to something!   ;D

In the SVN there are two customized python scripts for exporting to MD2 from Blender - the one I was using was meant for old versions, the one meant for newer releases of Blender crapped out with an error message every time so I never used it.

I actually looked at the error message carefully, and thought to myself "Well, I don't know python, but what the hell, I'll look at the line of code it is complaining about..."

Surprise, surprise - It turns out one of the authors of the customized export plugin has a non-American foreign name that contains a non-ASCII character, an "e" with one of those marks above it.  This non-standard character in the authors name (listed in the info part of the file) was confusing the compiler and causing the plug-in to bomb out with an error and never start.

The old code (before I changed it):

Code: [Select]
__version__ = '0.1'
__author__  = [ 'Damien Thébault', 'Erwan Mathieu' ]
__url__     = [ 'https://metabolsim.no-ip.org/trac/metabolsim' ]
__email__   = [ 'Damien Thébault <damien!thebault#laposte!net>', 'Erwan Mathieu <cyberwan#laposte!net>' ]

Notice the funky "e" is on two lines (Damien's last name), and Blender was complaining about both of them.  I changed it (no offense to the author) to this:

Code: [Select]
__version__ = '0.1'
__author__  = [ 'Damien Thebault', 'Erwan Mathieu' ]
__url__     = [ 'https://metabolsim.no-ip.org/trac/metabolsim' ]
__email__   = [ 'Damien Thebault <damien!thebault#laposte!net>', 'Erwan Mathieu <cyberwan#laposte!net>' ]

...And now the plugin loads properly and runs!

It also gives me more export options - Now to see if it will make the MD2 display properly in the game...

P.S. - I'd suggest someone with SVN access update the python script with this fix so the plug-in runs without crashing.

Offline Migel

  • Rookie
  • ***
  • Posts: 95
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #39 on: September 04, 2009, 06:48:34 am »
Quote
What software tool did you use and how did you do it?
I'm useing Milkshape, and I can recompile this models. It will be much easier then fixin export script.

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #40 on: September 04, 2009, 08:59:34 am »
I'm useing Milkshape, and I can recompile this models. It will be much easier then fixin export script.

Great!  Thanks, I think that's a big help for now until some coder has time to work on the scripts.

Offline bayo

  • Professional loser
  • Project Coder
  • Captain
  • ***
  • Posts: 733
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #41 on: September 04, 2009, 12:21:08 pm »
i can take a look at the script, but i am not sure i can fix something.

Anyway, IMO the head must have a right scale and right origin (into Blender), i dont think the script can do anything for it.

Then maybe it is a good idea to create a Blender file with a "template" (the size of 1 metter; common size of an actor, head...). But i dont know Blender. In Blender, do you model with an SI unit? or do you model with an abstract unit?


Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #42 on: September 04, 2009, 05:02:31 pm »
i can take a look at the script, but i am not sure i can fix something.

Anyway, IMO the head must have a right scale and right origin (into Blender), i dont think the script can do anything for it.

Then maybe it is a good idea to create a Blender file with a "template" (the size of 1 metter; common size of an actor, head...). But i dont know Blender. In Blender, do you model with an SI unit? or do you model with an abstract unit?

Thanks for offering to help fix the script.

I don't think the problem is scale or orientation anymore, if you look again at this latest screenshot, the scale is almost right and the head is facing in the proper direction, but the problem is how the export handles the material texture.  As you can see in this picture, the head is lit up very brightly with tons of light, reflecting much more light than it should.  The body of course looks normal, one of the old, existing body models.

I don't know if the export script has an issue with specular or lighting settings or what, but it just exports with way too much brightness.

Offline Migel

  • Rookie
  • ***
  • Posts: 95
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #43 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!

Offline Migel

  • Rookie
  • ***
  • Posts: 95
    • View Profile
Re: A (Finally!) proper low-poly head without the headache
« Reply #44 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.