Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: Newbie problem - invisible unit

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    FakeTwin's Avatar Libertus
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    77

    Default Newbie problem - invisible unit

    First a small foreword/explanation:
    I am a complete newbie to medieval 2-modding. I also never before worked with a 3D-programm like milkshape. I didn't even do some retexturing. Nevertheless I started to work on a small submod for the "Call of Warhammer"-mod. To get started I read "Alletuns tome of knowledge" and some tutorial-threads on this forum like "How to add a new unit into game".


    Now to my problem: My newly created unit is invisible.
    I'll write down what I did step by step so you can identify possible mistakes I might have made during the process:

    1) I created a new model by merging different existing models using the merge-function of "grumpy old mens mesh converter".

    2) After that I opened the model in milkshape and deleted all the groups I didn't want to use and slightly remodelled some others (weapons, for example). I also checked the bone assignment. Everything seemed to be okay.

    3) I saved my work as a new ms3d and converted it to mesh (with "grumpy's" again) just to check if worked. It did: The model showed correctly ingame, without textures of course (= brightly shining "silver surfer"-model).

    4) Next I loaded the model with "lithunwrap" to create the UV-maps.

    5) I saved the finished UV-Maps as a luv-file. Then I opened milkshape, loaded my model and imported the luv-file (in another thread I read this way I won't loose my comments and prevent bone-assignment mess-ups). I saved the model again and converted it to mesh for a test-run. The model was invisible now ingame.

    6) Next I used the "WriteUVMaps2DDS" python programm to create the needed texture files.

    7) Now I did the texturing in "Photoshop" and saved the files as dds. with the following options: DXT5 – ARGB – 8bpp – interpolated alpha.

    8) As you can see in this picture, the textures seemed to be alright:
    Spoiler Alert, click show to read: 


    9) Next I created normal maps using the "Nvidia normal map filter" in "Photoshop" and converted the 4 dds-files to texture files and copied them to my mod-folder.

    My problem is: The unit is still invisible. In "Alletuns tome of knowledge" I read that there are only 2 possible reasons for this:
    a) The entry in the modelDB is wrong
    b) The alpha-channels of the textures are messed up

    I checked the modelDB-entry twice and thrice – its correct. So the alpha-channels should be the reason. "Alletuns tome of knowledge" states they should be black. I checked them and they were all white. So I thought: Easy! Just paint them black! But no – ingame the unit was still invisible.

    So, can someone please explain to me, step by step, what I have to do to get this ing unit into the game? It took me much time to get aquainted with the needed tools and programs and even more time to finish this first model. I must say I'm extremely frustrated right now! I am thankful for every advice!


    EDIT: Here are my EDU and modeldb-entries:

    1.) EDU:
    Spoiler Alert, click show to read: 
    type Norse_warriors
    dictionary Norse_warriors ; Norse warriors
    category infantry
    class light
    voice_type Heavy
    accent East_European
    banner faction main_infantry
    banner holy crusade
    soldier Norse_warriors, 50, 0, 1.25
    attributes sea_faring, can_withdraw, warcry, hardy, mercenary_unit
    formation 1.1, 1.1, 2, 2, 5, square
    stat_health 1, 0
    stat_pri 8, 6, no, 0, 0, melee, melee_blade, slashing, axe, 0, 1
    stat_pri_attr no
    stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 1
    stat_sec_attr no
    stat_pri_armour 3, 5, 3, flesh
    stat_sec_armour 0, 0, flesh
    stat_heat 2
    stat_ground 0, -4, -4, 2
    stat_mental 10, impetuous, trained
    stat_charge_dist 30
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 600, 120, 100, 100, 600, 6, 200
    armour_ug_levels 1
    armour_ug_models Norse_warriors
    ownership hre, scotland, russia, spain, portugal, sicily, venice, milan, saxons, france
    recruit_priority_offset 60


    2) modeldb
    Spoiler Alert, click show to read: 
    14 Norse_warriors
    1 4
    79 unit_models/_units/warhammer/merc/model/Norse_warriors/Norse_warriors_lod0.mesh 121
    79 unit_models/_units/warhammer/merc/model/Norse_warriors/Norse_warriors_lod0.mesh 900
    79 unit_models/_units/warhammer/merc/model/Norse_warriors/Norse_warriors_lod0.mesh 2500
    79 unit_models/_units/warhammer/merc/model/Norse_warriors/Norse_warriors_lod0.mesh 6400
    2
    4 merc
    77 unit_models/_units/warhammer/merc/model/Norse_warriors/Norse_warriors.texture
    84 unit_models/_units/warhammer/merc/model/Norse_warriors/Norse_warriors_normal.texture
    33 unit_sprites/Marauders_sprite.spr
    5 slave
    77 unit_models/_units/warhammer/merc/model/Norse_warriors/Norse_warriors.texture
    84 unit_models/_units/warhammer/merc/model/Norse_warriors/Norse_warriors_normal.texture
    33 unit_sprites/Marauders_sprite.spr
    2
    4 merc
    81 unit_models/_units/warhammer/merc/model/Norse_warriors/att_Norse_warriors.texture
    88 unit_models/_units/warhammer/merc/model/Norse_warriors/att_Norse_warriors_normal.texture 0
    5 slave
    81 unit_models/_units/warhammer/merc/model/Norse_warriors/att_Norse_warriors.texture
    88 unit_models/_units/warhammer/merc/model/Norse_warriors/att_Norse_warriors_normal.texture 0
    1
    4 None
    9 MTW2_Mace 0
    2
    17 MTW2_Mace_Primary
    14 fs_test_shield 0
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002


    3) If you want to compare my modeldb-entry: here's an entry of a unit from "Call of Warhammer":
    Spoiler Alert, click show to read: 
    13 Ragnar_wolves
    1
    1
    77 unit_models/_units/warhammer/merc/model/Ragnar_wolves/Ragnar_wolves_lod0.mesh 6400
    2
    4 merc
    80 unit_models/_units/warhammer/merc/model/Ragnar_wolves/Ragnar_wolves_diff.texture
    80 unit_models/_units/warhammer/merc/model/Ragnar_wolves/Ragnar_wolves_norm.texture
    42 unit_sprites/merc_Ragnar_wolves_sprite.spr
    5 slave
    80 unit_models/_units/warhammer/merc/model/Ragnar_wolves/Ragnar_wolves_diff.texture
    80 unit_models/_units/warhammer/merc/model/Ragnar_wolves/Ragnar_wolves_norm.texture
    42 unit_sprites/merc_Ragnar_wolves_sprite.spr
    2
    4 merc
    84 unit_models/_units/warhammer/merc/model/Ragnar_wolves/att_Ragnar_wolves_diff.texture
    84 unit_models/_units/warhammer/merc/model/Ragnar_wolves/att_Ragnar_wolves_norm.texture 0
    5 slave
    84 unit_models/_units/warhammer/merc/model/Ragnar_wolves/att_Ragnar_wolves_diff.texture
    84 unit_models/_units/warhammer/merc/model/Ragnar_wolves/att_Ragnar_wolves_norm.texture 0
    1
    5 Horse
    12 MTW2_HR_Mace
    0
    1
    17 MTW2_Mace_Primary
    0
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    Last edited by FakeTwin; October 13, 2010 at 02:22 PM.

  2. #2
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Newbie problem - invisible unit

    did you assigned the texture to the model on battle_models.modeldb?
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  3. #3
    FakeTwin's Avatar Libertus
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    77

    Default Re: Newbie problem - invisible unit

    Quote Originally Posted by Swagger View Post
    did you assigned the texture to the model on battle_models.modeldb?
    Yes, I did. I'll post my modeldb-entry tomorrow (I don't have acces to the files right now because I'm not at home).

  4. #4

    Default Re: Newbie problem - invisible unit

    Make sure the serialization count is true in the BMDB. After we add a model entry we increase it by 1 and suppose we have a model with 2 more upgrades then it's 3.
    So if it's 768 then it becomes 771.

  5. #5

    Default Re: Newbie problem - invisible unit

    I bet Ishan is right ! I had the same problem and I just increased the serialization number in BMDB and my unit appeared on the battlefield...

    Nice model!

  6. #6
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Newbie problem - invisible unit

    Always use KnightErrant's syntax checker, which will check to make sure that the serialization value you have is the right one. The serialization value is merely the total number of entries, and the checker is able to do that much easier than you or I.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  7. #7
    FakeTwin's Avatar Libertus
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    77

    Default Re: Newbie problem - invisible unit

    Quote Originally Posted by Ishan View Post
    Make sure the serialization count is true in the BMDB. After we add a model entry we increase it by 1 and suppose we have a model with 2 more upgrades then it's 3.
    So if it's 768 then it becomes 771.
    Quote Originally Posted by Briariuss View Post
    I bet Ishan is right ! I had the same problem and I just increased the serialization number in BMDB and my unit appeared on the battlefield...

    Nice model!
    Quote Originally Posted by SigniferOne View Post
    Always use KnightErrant's syntax checker, which will check to make sure that the serialization value you have is the right one. The serialization value is merely the total number of entries, and the checker is able to do that much easier than you or I.
    Wouldn't the game crash if I had a wrong serialization-number?
    Nevertheless, thanks for your replies! I just took a look at my backup of the original modeldb, it had 485 entries. My model has no upgrades, so I increased the serialization by 1 to 486.
    So, unfortunately that wasn't the problem....

    I just added my EDU- and modeldb-entries to the first post of the thread, maybe someone might take a look at them?

    PS: I forgot to mention it before: The unit isn't completely invisible: The sprites are shown (i used the sprites of a different unit), and if you zoom in to a certain distance and/or angle you can see something that looks similar to shadows...!? Maybe I should post a few screenshots.

  8. #8
    T&D's Avatar Vicarius
    Join Date
    Dec 2009
    Location
    Shoe store...
    Posts
    2,843

    Default Re: Newbie problem - invisible unit

    Propably you are having some bugs with uvmapping.Maybe simply download python and GOAT(have tool to create uvmaps).

  9. #9

    Default Re: Newbie problem - invisible unit

    The problem is your BMDB entry.
    You have to add ownership of textures and attachments in the BMDB(modeldb file) to all the factions that have the ownership of the unit in the EDU otherwise they will appear as silver surfers.
    Currently u have only slave and merc so add the rest scotland.....

    Eothese is right i oversaw the merc attrib in the EDU and he is right then we don't need other faction textures seprately they will all use the merc textures.
    Last edited by Ishan; September 28, 2010 at 06:48 PM.

  10. #10

    Default Re: Newbie problem - invisible unit

    I have units working with the same setup, mercenary_unit attribute in EDU and just merc and slave in the .db If you can see shadows, it might be that your normal is too bright/dark or that using lithunwrap has messed up your alpha. I only use GOAT and Gimp for my model's and have never used lithunwrap, so I can't say if your settings are correct. With the tools I use, if you've made a model from existing parts, you dont need to re-map the textures, the info is retained.

    If you still have the model that showed up as a silver surfer, I'd suggest working from there. Unless you want to upload the model and textures etc.

  11. #11
    FakeTwin's Avatar Libertus
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    77

    Default Re: Newbie problem - invisible unit

    I swear if I'll ever be able to solve this riddle, I'll write a tutorial even more basic than the one Alletun wrote!

    Quote Originally Posted by Eothese View Post
    I have units working with the same setup, mercenary_unit attribute in EDU and just merc and slave in the .db If you can see shadows, it might be that your normal is too bright/dark or that using lithunwrap has messed up your alpha. I only use GOAT and Gimp for my model's and have never used lithunwrap, so I can't say if your settings are correct.
    Just a quick question here: what do you mean with the normal map being "too bright/dark". After reading "Alletuns tome of knowledge" and checking the textures of some existing units I thought the alpha channel of the normal map should always be 100% black?

    Quote Originally Posted by Eothese View Post
    With the tools I use, if you've made a model from existing parts, you dont need to re-map the textures, the info is retained.
    That's strange, because after loading my model in lithunwrap it looked like this. As you can see it's a complete mess-up.:

    Spoiler Alert, click show to read: 


    I first rearranged it to this:
    Spoiler Alert, click show to read: 


    And then to this:
    Spoiler Alert, click show to read: 



    Quote Originally Posted by Eothese View Post
    If you still have the model that showed up as a silver surfer, I'd suggest working from there. Unless you want to upload the model and textures etc.
    If everything else fails I'll do it. But before I do that, I'll try everything on my own first. It's personal now, you know!

    Maybe I should point you to something which seemed odd to me from the beginning. I quote myself, the most important part is in bold:

    Quote Originally Posted by FakeTwin View Post
    5)I saved the finished UV-Maps as a luv-file. Then I opened milkshape, loaded my model and imported the luv-file (in another thread I read this way I won't loose my comments and prevent bone-assignment mess-ups). I saved the model again and converted it to mesh for a test-run. The model was invisible now ingame.
    Is this normal?
    Last edited by FakeTwin; September 29, 2010 at 04:45 PM.

  12. #12

    Default Re: Newbie problem - invisible unit

    I dont mean the apha channel of the normal map, I mean the normal map itself. You can increase or reduce brightness to suit.

    I stated in my post that I have never used lithunwrap, I've heared too many bad things about it and about mixing tools. I just use the texture coordinator in milkshape, its really easy to use.

  13. #13

    Default Re: Newbie problem - invisible unit

    some things wich make units invisible can be not assignment of some part of the model (not assigned to any bone) and also the missing comment on some group also causes invisible units.
    Common sense removed due being Disruptive.

  14. #14
    T&D's Avatar Vicarius
    Join Date
    Dec 2009
    Location
    Shoe store...
    Posts
    2,843

    Default Re: Newbie problem - invisible unit

    Quote Originally Posted by Ataegina View Post
    some things wich make units invisible can be not assignment of some part of the model (not assigned to any bone) and also the missing comment on some group also causes invisible units.
    He posted that ,,silver model'' without textures works...

  15. #15
    FakeTwin's Avatar Libertus
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    77

    Default Re: Newbie problem - invisible unit

    After some more testing I'm nearly 100% sure now what the problem ist. In fact, it's 2 problems (Eothese assuptions are correct):
    1) After using Lithunwrap the model is definitely messed up. As suggested I'll do the mapping with milkshape's "texture coordinate editor" in the future.
    2) The textures are also messed up: for testing purposes, I assigned them to an already existing (and definitely working) model: It became invisible.

    I'll upload my textures anytime soon. Maybe someone can take a look at them and tell me what I have to change in order to make them working?

    Best regards

  16. #16
    T&D's Avatar Vicarius
    Join Date
    Dec 2009
    Location
    Shoe store...
    Posts
    2,843

    Default Re: Newbie problem - invisible unit

    Quote Originally Posted by FakeTwin View Post
    After some more testing I'm nearly 100% sure now what the problem ist. In fact, it's 2 problems (Eothese assuptions are correct):
    1) After using Lithunwrap the model is definitely messed up. As suggested I'll do the mapping with milkshape's "texture coordinate editor" in the future.
    2) The textures are also messed up: for testing purposes, I assigned them to an already existing (and definitely working) model: It became invisible.

    I'll upload my textures anytime soon. Maybe someone can take a look at them and tell me what I have to change in order to make them working?

    Best regards
    You guys are right-lithunwrap mess up models...

  17. #17
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Newbie problem - invisible unit

    I find Milkshape's UVW editor to be quite good myself, so Lithunwrap isn't even that necessary.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  18. #18
    FakeTwin's Avatar Libertus
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    77

    Default Re: Newbie problem - invisible unit

    I added one of my textures as well as the corresponding normal map to the first post. It would be awesome if someone could take a look at them and tell me what I did wrong. He or she will of course be credited in my mod once it's finished...

    Best regards

  19. #19

    Default Re: Newbie problem - invisible unit

    @FakeTwin
    Try this one i did some changes and let me know if the unit texture works now or not.

  20. #20
    FakeTwin's Avatar Libertus
    Join Date
    Mar 2005
    Location
    Germany
    Posts
    77

    Default Re: Newbie problem - invisible unit

    Quote Originally Posted by Ishan View Post
    @FakeTwin
    Try this one i did some changes and let me know if the unit texture works now or not.
    Wow, that was fast! Thanks!
    I'll test the textures asap and report right back!

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •