WB 3D Art How do I create an empty mesh?

Users who are viewing this thread

Wolfynator

Recruit
I'm trying to create a troop without a visible head (headless), is there a way to create an empty mesh?

EDIT: Found out how to create an empty mesh file.
1) Create a new text document called empty.txt (or whatever you prefer, just keep in mind this name will be the name of the empty mesh)
2) Change it's extension to .obj
3) Go to OpenBRF and import static mesh --> the .obj file you just created
4) Save the brf to the Resources folder of your module
5) Make necessary changes to module.ini so that your new brf gets loaded
6) Enjoy the empty mesh
 
Last edited:
Solution
Holy..I just searched for errors and there are a lot of them. Missing mesh "empty" is one of them. Is this something to do with the GoG version?
Nah, that's pretty normal for the Native module. Some start with fixing the errors first at their module before starting the rest.

Here is an empty mesh of mine:
Replace the material name with any name which exists at your module

Yes, all is good. I have been making many other edits earlier and they all came through.
I still wonder how your helm looks like ingame since even the missing empty mesh should have caused an error message ingame about missing mesh.

Wolfynator

Recruit
If it is just a bot, you can mark the armour with itp_covers_head, so he is headless. If the unit wears a helmet, mark the helmet with that flag.

Is there any way to do it without giving the troop armor? Also, I don't quite understand what you mean by "marking the armour with itp_covers_head". Doesn't the mesh of the armor also need to be empty?
 
Upvote 0

Wolfynator

Recruit
So it's a totally invisibly unit? I thought only the head is invisible.

Oh, I intend for the troop to have its head invisible. Not for the head to be the only thing visible.

The reason why I'm hoping for a way without giving it armor is because I was thinking of replacing the head mesh with an empty one would make it invisible, but I don't know how to do that.
 
Upvote 0

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
If it is just a bot, you can mark the armour with itp_covers_head, so he is headless. If the unit wears a helmet, mark the helmet with that flag.
Is there any way to do it without giving the troop armor?
Do you want a naked troop running around without a head?
Also, I don't quite understand what you mean by "marking the armour with itp_covers_head".
Are you using the module system (py-files) or Morghs' Editor or how are you doing stuff?
Doesn't the mesh of the armor also need to be empty?
If you only want an invisible head, no.
 
Upvote 0

Wolfynator

Recruit
Do you want a naked troop running around without a head?
Ok so the troop I have added is an undead which is why I don't want any armor on it, for now at least.
Are you using the module system (py-files) or Morghs' Editor or how are you doing stuff?
Yes I am making my edits in the .py files. Currently trying OpenBRF to make the invisible mesh.
If you only want an invisible head, no.
By armor I only mean the helmet.

Python:
(
    "undead", 0,
    "undead_body", "undead_calf_l", "undead_handL",
    "undead_head", undead_face_keys,
    [], #Hair meshes
    [], #Beard meshes
    [], #Hair textures
    [], #Beard textures
    [("undeadface_a",0xffffffff,["hair_blonde"],[]),
     #("undeadface_b",0xffcaffc0,["hair_blonde"],[]),
     ], #undead_face_textures
    [], #voice sounds
    "skel_human", 1.0,
    psys_game_blood,psys_game_blood_2,
  ),
This is what I have in module_skins.py for the undead. There are no crashes or anything, I just have trouble getting the head to be invisible.
 
Upvote 0

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
Ok so the troop I have added is an undead which is why I don't want any armor on it, for now at least.
So you have introduced them as a new race, yes? And some have a head and some don't? In that case you can just write a new item entry for a helmet. Quoting kalarhan here
you don't need a invisible mesh with the 3D object, just a empty mesh.

then use the item flags to override the head/etc. This is a example from VC:
Code:
["sarranid_horseman_helmet", "No head", [("empty",0)], itp_type_head_armor|itp_fit_to_head|itp_covers_head   ,0,
180 , weight(2)|abundance(100)|head_armor(15)|body_armor(0)|leg_armor(0)|difficulty(0) ,imodbits_plate ],

note the use of the mesh "empty", and the flags "itp_type_head_armor|itp_fit_to_head|itp_covers_head". You can apply those with .txt files, and possible Morgh's as well (if you don't want to use the modsys)

if in doubt you can see how VC created the empty mesh by checking their BRF
I marked the important parts in red.
 
Upvote 0

Wolfynator

Recruit
Oh lol, that post was actually the reason why I'm asking this question. That mesh called "empty", how to create that?

So you have introduced them as a new race, yes? And some have a head and some don't? In that case you can just write a new item entry for a helmet.
Yes they are a new race. And no, I don't have some without heads and some with heads. They are all with a visible head.
 
Upvote 0

Wolfynator

Recruit
It should already exist by default, just try it out ingame ^^
So I should be able to replace "undead_head" with "empty"?
Code:
(
    "undead", 0,
    "undead_body", "undead_calf_l", "undead_handL",
    "undead_head", undead_face_keys,
    [], #Hair meshes
    [], #Beard meshes
    [], #Hair textures
    [], #Beard textures
    [("undeadface_a",0xffffffff,["hair_blonde"],[]),
     #("undeadface_b",0xffcaffc0,["hair_blonde"],[]),
     ], #undead_face_textures
    [], #voice sounds
    "skel_human", 1.0,
    psys_game_blood,psys_game_blood_2,
  ),

I tried giving the troop the helmet with the mesh "empty" but it doesn't make the head disappear. I copied the itm code from above. Also searched my module + commonres with OpenBRF for the mesh "empty" but it is not there.
 
Last edited:
Upvote 0

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
No! We are talking about an item entry in module_items, not about the skin entry!
I tried giving the troop the helmet with the mesh "empty" but it doesn't make the head disappear. I copied the itm code from above.
What happens? It must at least give you an error message if nothing happens. Or you did something wrong.
 
Upvote 0

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
I tried giving the troop the helmet with the mesh "empty" but it doesn't make the head disappear. I copied the itm code from above.
What happens? It must at least give you an error message if nothing happens. Or you did something wrong.

Yes, I added the code into module_items. I was thinking since there was a mesh called "empty", why not use that instead of the head mesh?
Not sure how exactly it works at module_skins.
 
Upvote 0

Wolfynator

Recruit
What happens? It must at least give you an error message if nothing happens. Or you did something wrong.
No error or crash, the troop gets the helmet as per usual. All visible as well.

This is my code for the troop in module_troops.py
Code:
["skeleton", "Skeleton", "Skeletons",tf_undead|tf_guarantee_helmet,0,0,fac_undeads,
   [itm_warhammer, itm_sarranid_horseman_helmet],
   def_attrib|level(1),wp_two_handed(150),knows_power_strike_2|knows_weapon_master_2,
   undead_face1, undead_face2
  ],

The code in module_items.py is the exact same as the one by kalarhan.

If there is a way to create an empty mesh, it would be so much simpler.
 
Upvote 0

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
What does Openbrf tell you when you click for the error search? If the empty mesh is there, you shouldn't see the helmet and if it is not there you should still get a message for a missing mesh. Make also sure you have saved the module_item entry and compiled it again at the correct place.
 
Upvote 0

Wolfynator

Recruit
What does Openbrf tell you when you click for the error search?
Holy..I just searched for errors and there are a lot of them. Missing mesh "empty" is one of them. Is this something to do with the GoG version?
Here's the exact error:
Missing in txt: cannot find Mesh empty, referred in 'item_kinds1.txt'

Make also sure you have saved the module_item entry and compiled it again at the correct place.
Yes, all is good. I have been making many other edits earlier and they all came through.
 
Upvote 0

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
Holy..I just searched for errors and there are a lot of them. Missing mesh "empty" is one of them. Is this something to do with the GoG version?
Nah, that's pretty normal for the Native module. Some start with fixing the errors first at their module before starting the rest.

Here is an empty mesh of mine:
Replace the material name with any name which exists at your module

Yes, all is good. I have been making many other edits earlier and they all came through.
I still wonder how your helm looks like ingame since even the missing empty mesh should have caused an error message ingame about missing mesh.
 
Upvote 0
Solution
Top Bottom