fuag@Posted: Tue Aug 08, 2006 4:29 am    Post subject: Could use some help starting up: ok, I made a model in blender, uvmaped and exported an md5mesh

made a material file for the model and put it in the materials foldier of my mod

"monkey.mtr"
Quote:

models/monkey/monkey.md5mesh
{
qer_editorimage textures/monkey/monkey_d.tga
diffusemap textures/monkey/monkey_d.tga
bumpmap textures/monkey/monkey_h.tga
specularmap textures/monkey/monkey_s.tga
}


tried making a def for him

"monkey_static.def"
Quote:

entityDev monkey_static {
"inherit" "item_default"
"inv_item" "1"
"editor_usage" "Monkey Static"
"editor_model" "models/monkey/monkey.md5mesh"
"spawnclass" "idItem"
"model" "models/monkey/monkey.md5mesh"
"snd_aquire" "snd_shard_aquire"
"size" "32 32 32"
"inv_name" "Monkeyz"
"inv_armor" "100"
}


made him an item because I dont have any animations or a .af file for the mesh yet. And thought it would be funny to pick up a monkey and get 100 armor.

problem.. I don't know how to get radiant to see this. I've tried sticking my foldiers into the doom3 base foldier but the monkey entity doesnt show up. If possible, I'd like to be able to point radiant to my mod foldier and have it take waht it can find from there and anything else from the doom3base foldier. Running linux.

also, I'm not sure weather or not the diffuse bump and normal maps are applied to my model, does just making the mtr firle do it or do I have to somehow link the .def for the model with the .mtr file?



rich_is_bored@Posted: Tue Aug 08, 2006 7:32 am    Post subject: : When dealing with MD5mesh files, the model key/value pairs for your entity declaration need to reference a model declaration as opposed to the MD5mesh files themselves.

For instance, notice the model key/value pair here...

Code:
entityDef monster_boss_cyberdemon {
   "inherit"                  "monster_default"
   "editor_mins"               "-90 -90 0"
   "editor_maxs"               "90 90 300"
   "scriptobject"               "monster_boss_cyberdemon"
   "model"                     "monster_boss_cyberdemon"
   "ragdoll"                  "monster_boss_cyberdemon"
   "size"                     "100 100 300"
   "use_aas"                  "aas_cyberdemon"


And the cooresponding declaration here...

Code:
model monster_boss_cyberdemon {
   mesh                     models/md5/monsters/cyberdemon/cyberdemon.md5mesh
   channel torso               ( *Waist )
   channel legs               ( *Hips Body origin ROT -*Waist)

   anim af_pose               models/md5/monsters/cyberdemon/af_pose.md5anim
   anim ik_pose               models/md5/monsters/cyberdemon/ik_pose.md5anim


Also note how the MD5mesh file is referenced inside the model declaration.
_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



fuag@Posted: Wed Aug 09, 2006 6:25 am    Post subject: : how do you link a material to a model though I dun see where it gets info about what to use to texture it. It would seem to make sense that there would be a material key in the model def with the value bieng the name of the material file instead of the path to it but I don't know what to reference to look that up.

as it stands now i have this in

doom3/base/def/monkey_static.def

Quote:

model char_monkey_static {
"mesh" "models/monkey/monkey.md5mesh"
"material" "monkey"
}

entityDev monkey_static {
"inherit" "item_default"
"inv_item" "1"
"editor_mins" "-90 -90 0"
"editor_maxs" "90 90 300"
"editor_usage" "Monkey Static"
"editor_model" "models/monkey/monkey.md5mesh"
"spawnclass" "idItem"
"model" "models/monkey/monkey.md5mesh"
"snd_aquire" "snd_shard_aquire"
"size" "32 32 32"
"inv_name" "Monkeyz"
"inv_armor" "100"
}


and then this in

doom3/base/materials/monkey.mtr

Quote:

models/monkey/monkey.md5mesh
{
qer_editorimage textures/monkey/monkey_d.tga
diffusemap textures/monkey/monkey_d.tga
bumpmap textures/monkey/monkey_h.tga
specularmap textures/monkey/monkey_s.tga
}


does it look for a matching material file reference when it finds the model definition?

what else do i need to get the md5mesh into doom3 as just a mesh.



rich_is_bored@Posted: Wed Aug 09, 2006 7:36 am    Post subject: : The model file itself references the material shader.

For instance...

Code:
MD5Version 10
commandline "mesh models/monsters/zombie/cycles/idles/npcs_mesh.mb -dest models/md5/props/adrenaline.md5mesh -game Doom -prefix ZOMBIE_ -keep RHANDCONNECTOR -rename origin blah -rename RHANDCONNECTOR origin -clearorigin -range 1 1 -keepmesh adrenalinemesh -keepmesh adrenalinefxmesh"

numJoints 2
numMeshes 2

joints {
   "origin"   -1 ( 0 0 0 ) ( 0 0 0 )      //
   "adrenaline"   0 ( -2.3452484608 -3.9679763317 2.5343182087 ) ( 0.0439860895 0.000001688 0.0000019919 )      // origin
}

mesh {
   // meshes: adrenalinemesh
   shader "models/items/powerups/adrenalin"

   numverts 92
   vert 0 ( 0.3059248626 0.2395480871 ) 21 1


Notice the line...

Code:
   shader "models/items/powerups/adrenalin"

_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



fuag@Posted: Wed Aug 09, 2006 9:42 am    Post subject: : Schweet Very Happy Thanks for all your help so far, helped a lot and also is helping intuition about other things. Now the model can be loaded in the editor, and is textured correctly in the editor, but for some reason half its right leg and part of the left leg around the knee is missing polys. The map compiles but when i go to load it up where the monkey should be there is a black box, although the black box acts exactly like the monkey should.

Is it showing up as a box because there are missing polys and therefore it cant render the md5mesh or is the box thing an error in the .def files Confused

EDIT: Just redid the md5mesh with one bone and it shows up clean in the editor now, however it still only renders a box, could this be because i dont have an md5anim for it yet?



rich_is_bored@Posted: Wed Aug 09, 2006 10:35 am    Post subject: : Have you loaded the model in der_ton's model viewer to see if the polygons are missing there?

I have a feeling that your problem isn't so much the model as it might be the fact that the entity has no means to determine what animation to apply to the model.
_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



fuag@Posted: Wed Aug 09, 2006 10:59 am    Post subject: : hmm, checked in dir tons as well, they were gone. Found out i had forgot to link some of the verticies to bones before exporting. In specific the liwer right leg and parts of the left knee... Embarassed

I fixed that but its still just a box in game. I don't have an md5anim yet, guess I should make an initial md5anim frame for it to reference. I'ma head to bed tho, I'll make the md5anim tom and check back.. hopefully with some screenies Smile



fuag@Posted: Thu Aug 10, 2006 3:22 am    Post subject: : sigh, just exported a md5anim and declaired it as the afpose for the model and it still renders as a black box in the engine... The only thing I can think of that I'm missing now is a .af file for the mesh but I'm hoping thats not needed because I just want the thing to spawn and be viewable in game before I try making .af files and right now the whole mesh is one vertext group linked to a bone just to see if i can get it in the engine..


rich_is_bored@Posted: Thu Aug 10, 2006 4:24 am    Post subject: : I just noticed something odd about your entity delcaration...

Code:
entityDev monkey_static {


Notice the typo?

It should be...

Code:
entityDef monkey_static {

_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



fuag@Posted: Thu Aug 10, 2006 6:48 am    Post subject: : oh, sorry shoulda posted an update, i noticed it a while ago and corrected, it was why it wasn't showing up in the editor. Still trying to find out whats up with the box though, I thought it might be the size so i tried re-exporting a really really small version of it but the same thing hapened. Could it be something in my mins/maxs or size declarations, i just copied those from the shotgun or fat zombie, dunno how to actually find out what they should be.


fuag@Posted: Thu Aug 10, 2006 10:40 pm    Post subject: : ok found out the black box means the models not fully implemented yet.. but what am I missing... I have a model def, a .mtr an initial af pose and ik pose, have it inherit the item entity, spawn as idItem... it complains there is no .efx file for the map but that doesnt have anything to do with the model..

there isn't a .cm for the model but it auto generates that if there isn't one and I can't find any errors in the auto generation of the .cm as the map loads



rich_is_bored@Posted: Fri Aug 11, 2006 8:47 am    Post subject: : Have you tried the testmodel console command to see if the game can actually load the model?
_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



fuag@Posted: Fri Aug 11, 2006 10:08 am    Post subject: : whoa, it says "NULL joints on renderEntity" theres a clue, dunno what tho, I'll try to find out how to add joints


rich_is_bored@Posted: Sat Aug 12, 2006 5:56 am    Post subject: : You're telling me this whole time your model didn't have any bones?

Laughing
_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



fuag@Posted: Sat Aug 12, 2006 6:03 am    Post subject: : it does have bones though, sorry I'm still stuck on it.. the md5mesh is rigged even made an md5anim. bones are rigged weightpainted by vertex group and i exported the model as der_ton said from blender. Is there something special I need in the .def file.. i dont' have a .af file yet or a skin file but i thought you only needed .af files if you want it to automate the walk cycle and you only needed a .skin file if you wanted to dynamically changet the textures or hide parts of the model.

I've ben avoiding the .af files because thier complicated and I only have linux available to me so I have no editor.. tried to install it through cedega and wine but they come up with run errors so I'll just cross my fingers its not the .af... I know I'll need em eventually but was hoping to do em in college in the commonspace labs.

EDIT: double checked the exporting.. should be ok



fuag@Posted: Tue Aug 15, 2006 6:17 am    Post subject: : ok, it has to be a problem in my defs somewhere because when I do a testmodel using the model def name it shows up ok, slightly wierdly shaded but ok. Therefore the box must be happening when i try to spawn it as an idItem or a movable_item_default... my give up, heres a link to all the files i have so far, hopefully someone can find what I'm missing.

http://fuag.is-a-geek.com/filez/Marine



fuag@Posted: Tue Aug 08, 2006 4:29 am    Post subject: Could use some help starting up: ok, I made a model in blender, uvmaped and exported an md5mesh

made a material file for the model and put it in the materials foldier of my mod

"monkey.mtr"
Quote:

models/monkey/monkey.md5mesh
{
qer_editorimage textures/monkey/monkey_d.tga
diffusemap textures/monkey/monkey_d.tga
bumpmap textures/monkey/monkey_h.tga
specularmap textures/monkey/monkey_s.tga
}


tried making a def for him

"monkey_static.def"
Quote:

entityDev monkey_static {
"inherit" "item_default"
"inv_item" "1"
"editor_usage" "Monkey Static"
"editor_model" "models/monkey/monkey.md5mesh"
"spawnclass" "idItem"
"model" "models/monkey/monkey.md5mesh"
"snd_aquire" "snd_shard_aquire"
"size" "32 32 32"
"inv_name" "Monkeyz"
"inv_armor" "100"
}


made him an item because I dont have any animations or a .af file for the mesh yet. And thought it would be funny to pick up a monkey and get 100 armor.

problem.. I don't know how to get radiant to see this. I've tried sticking my foldiers into the doom3 base foldier but the monkey entity doesnt show up. If possible, I'd like to be able to point radiant to my mod foldier and have it take waht it can find from there and anything else from the doom3base foldier. Running linux.

also, I'm not sure weather or not the diffuse bump and normal maps are applied to my model, does just making the mtr firle do it or do I have to somehow link the .def for the model with the .mtr file?



rich_is_bored@Posted: Tue Aug 08, 2006 7:32 am    Post subject: : When dealing with MD5mesh files, the model key/value pairs for your entity declaration need to reference a model declaration as opposed to the MD5mesh files themselves.

For instance, notice the model key/value pair here...

Code:
entityDef monster_boss_cyberdemon {
   "inherit"                  "monster_default"
   "editor_mins"               "-90 -90 0"
   "editor_maxs"               "90 90 300"
   "scriptobject"               "monster_boss_cyberdemon"
   "model"                     "monster_boss_cyberdemon"
   "ragdoll"                  "monster_boss_cyberdemon"
   "size"                     "100 100 300"
   "use_aas"                  "aas_cyberdemon"


And the cooresponding declaration here...

Code:
model monster_boss_cyberdemon {
   mesh                     models/md5/monsters/cyberdemon/cyberdemon.md5mesh
   channel torso               ( *Waist )
   channel legs               ( *Hips Body origin ROT -*Waist)

   anim af_pose               models/md5/monsters/cyberdemon/af_pose.md5anim
   anim ik_pose               models/md5/monsters/cyberdemon/ik_pose.md5anim


Also note how the MD5mesh file is referenced inside the model declaration.
_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



fuag@Posted: Wed Aug 09, 2006 6:25 am    Post subject: : how do you link a material to a model though I dun see where it gets info about what to use to texture it. It would seem to make sense that there would be a material key in the model def with the value bieng the name of the material file instead of the path to it but I don't know what to reference to look that up.

as it stands now i have this in

doom3/base/def/monkey_static.def

Quote:

model char_monkey_static {
"mesh" "models/monkey/monkey.md5mesh"
"material" "monkey"
}

entityDev monkey_static {
"inherit" "item_default"
"inv_item" "1"
"editor_mins" "-90 -90 0"
"editor_maxs" "90 90 300"
"editor_usage" "Monkey Static"
"editor_model" "models/monkey/monkey.md5mesh"
"spawnclass" "idItem"
"model" "models/monkey/monkey.md5mesh"
"snd_aquire" "snd_shard_aquire"
"size" "32 32 32"
"inv_name" "Monkeyz"
"inv_armor" "100"
}


and then this in

doom3/base/materials/monkey.mtr

Quote:

models/monkey/monkey.md5mesh
{
qer_editorimage textures/monkey/monkey_d.tga
diffusemap textures/monkey/monkey_d.tga
bumpmap textures/monkey/monkey_h.tga
specularmap textures/monkey/monkey_s.tga
}


does it look for a matching material file reference when it finds the model definition?

what else do i need to get the md5mesh into doom3 as just a mesh.



rich_is_bored@Posted: Wed Aug 09, 2006 7:36 am    Post subject: : The model file itself references the material shader.

For instance...

Code:
MD5Version 10
commandline "mesh models/monsters/zombie/cycles/idles/npcs_mesh.mb -dest models/md5/props/adrenaline.md5mesh -game Doom -prefix ZOMBIE_ -keep RHANDCONNECTOR -rename origin blah -rename RHANDCONNECTOR origin -clearorigin -range 1 1 -keepmesh adrenalinemesh -keepmesh adrenalinefxmesh"

numJoints 2
numMeshes 2

joints {
   "origin"   -1 ( 0 0 0 ) ( 0 0 0 )      //
   "adrenaline"   0 ( -2.3452484608 -3.9679763317 2.5343182087 ) ( 0.0439860895 0.000001688 0.0000019919 )      // origin
}

mesh {
   // meshes: adrenalinemesh
   shader "models/items/powerups/adrenalin"

   numverts 92
   vert 0 ( 0.3059248626 0.2395480871 ) 21 1


Notice the line...

Code:
   shader "models/items/powerups/adrenalin"

_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



fuag@Posted: Wed Aug 09, 2006 9:42 am    Post subject: : Schweet Very Happy Thanks for all your help so far, helped a lot and also is helping intuition about other things. Now the model can be loaded in the editor, and is textured correctly in the editor, but for some reason half its right leg and part of the left leg around the knee is missing polys. The map compiles but when i go to load it up where the monkey should be there is a black box, although the black box acts exactly like the monkey should.

Is it showing up as a box because there are missing polys and therefore it cant render the md5mesh or is the box thing an error in the .def files Confused

EDIT: Just redid the md5mesh with one bone and it shows up clean in the editor now, however it still only renders a box, could this be because i dont have an md5anim for it yet?



rich_is_bored@Posted: Wed Aug 09, 2006 10:35 am    Post subject: : Have you loaded the model in der_ton's model viewer to see if the polygons are missing there?

I have a feeling that your problem isn't so much the model as it might be the fact that the entity has no means to determine what animation to apply to the model.
_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



fuag@Posted: Wed Aug 09, 2006 10:59 am    Post subject: : hmm, checked in dir tons as well, they were gone. Found out i had forgot to link some of the verticies to bones before exporting. In specific the liwer right leg and parts of the left knee... Embarassed

I fixed that but its still just a box in game. I don't have an md5anim yet, guess I should make an initial md5anim frame for it to reference. I'ma head to bed tho, I'll make the md5anim tom and check back.. hopefully with some screenies Smile



fuag@Posted: Thu Aug 10, 2006 3:22 am    Post subject: : sigh, just exported a md5anim and declaired it as the afpose for the model and it still renders as a black box in the engine... The only thing I can think of that I'm missing now is a .af file for the mesh but I'm hoping thats not needed because I just want the thing to spawn and be viewable in game before I try making .af files and right now the whole mesh is one vertext group linked to a bone just to see if i can get it in the engine..


rich_is_bored@Posted: Thu Aug 10, 2006 4:24 am    Post subject: : I just noticed something odd about your entity delcaration...

Code:
entityDev monkey_static {


Notice the typo?

It should be...

Code:
entityDef monkey_static {

_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



fuag@Posted: Thu Aug 10, 2006 6:48 am    Post subject: : oh, sorry shoulda posted an update, i noticed it a while ago and corrected, it was why it wasn't showing up in the editor. Still trying to find out whats up with the box though, I thought it might be the size so i tried re-exporting a really really small version of it but the same thing hapened. Could it be something in my mins/maxs or size declarations, i just copied those from the shotgun or fat zombie, dunno how to actually find out what they should be.


fuag@Posted: Thu Aug 10, 2006 10:40 pm    Post subject: : ok found out the black box means the models not fully implemented yet.. but what am I missing... I have a model def, a .mtr an initial af pose and ik pose, have it inherit the item entity, spawn as idItem... it complains there is no .efx file for the map but that doesnt have anything to do with the model..

there isn't a .cm for the model but it auto generates that if there isn't one and I can't find any errors in the auto generation of the .cm as the map loads



rich_is_bored@Posted: Fri Aug 11, 2006 8:47 am    Post subject: : Have you tried the testmodel console command to see if the game can actually load the model?
_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



fuag@Posted: Fri Aug 11, 2006 10:08 am    Post subject: : whoa, it says "NULL joints on renderEntity" theres a clue, dunno what tho, I'll try to find out how to add joints


rich_is_bored@Posted: Sat Aug 12, 2006 5:56 am    Post subject: : You're telling me this whole time your model didn't have any bones?

Laughing
_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



fuag@Posted: Sat Aug 12, 2006 6:03 am    Post subject: : it does have bones though, sorry I'm still stuck on it.. the md5mesh is rigged even made an md5anim. bones are rigged weightpainted by vertex group and i exported the model as der_ton said from blender. Is there something special I need in the .def file.. i dont' have a .af file yet or a skin file but i thought you only needed .af files if you want it to automate the walk cycle and you only needed a .skin file if you wanted to dynamically changet the textures or hide parts of the model.

I've ben avoiding the .af files because thier complicated and I only have linux available to me so I have no editor.. tried to install it through cedega and wine but they come up with run errors so I'll just cross my fingers its not the .af... I know I'll need em eventually but was hoping to do em in college in the commonspace labs.

EDIT: double checked the exporting.. should be ok



fuag@Posted: Tue Aug 15, 2006 6:17 am    Post subject: : ok, it has to be a problem in my defs somewhere because when I do a testmodel using the model def name it shows up ok, slightly wierdly shaded but ok. Therefore the box must be happening when i try to spawn it as an idItem or a movable_item_default... my give up, heres a link to all the files i have so far, hopefully someone can find what I'm missing.

http://fuag.is-a-geek.com/filez/Marine