Using Blender to create a model for Doomsday
Max bones you can have is 64
vertices can have at max four different bone weights, any more and doomsday will output errors
You must have a root bone located 0,0,0 with scale of 1,1,1 and no animation on it.
Static models do not needs bones, but doomsday will log about missing animation
Calculating "thing" speedObjects.ded from libdoom.pk3 said
ID = "SERGEANT" Speed = 10;And another string said
ID = "SARG_RUN" Tics = 2;And there are 8 "SARG_RUN" states
This means that the Demon walk cycle lasts 8*2=16 game tics, and it moves 10*8=80 world units per walk cycle or (35/16)*80=175 world units per second.
Make the model world units size
Blender scale seems to be different than doomsdays to get the model the right size you should get the object pixels height, times it by 1.2, then divide it by 20, then when exporting the model export with 0.10 scale.
This example is for the Pinky demon
Height = 56;
So you can use
56*1.2(pixel factor)= 67.2
Then divide by 20
(67.2 / 20 = 3.36)
You now have the size to scale to in blenders metric units. To export, export at 0.20 the scale.
Now you can animate Demon model to have a speed of ???175??? Blender's metric units per second. You can make wider steps and slower gait (as we did for Ettin) or narrow steps and faster gait.
Monster heights (blender metric mesurements) [pixel hight * 1.2 / 20]
- Former Human =
- Shotgun guy =
- Heavy weapons dude =
- Imp =
- Pinky Demon/spectre = 3.36m
- Lost soul = 1.92m
- Cacodemon = bottom to tip of horns 4.02m. body height 3.42m
- Pain elemental =
- Baron of hell/hellknight = 4.32m
- revenant =
- archvile =
- ss guard =
- mancubus = 3.84m
- arachnatron =
- spider mastermind =
- cyberdemon = 4.45m
- doomguy = 3.36m
3) Export to FBX and turn off "Autoscale" option. (edited)
Animating your model
- Create a new window in blender.
- Chose that window to show "dope sheet".
- To the right of "Channel" and "key" click on "dope sheet" and change it to Action editor.
- Make sure to be in the armature "pose mode" (do not do this while the model mesh is selected!)
- Move the timeline in the dope sheet editor window to "1".
- Move your bones about, then select all and press "I" choose "locrotscale" move to your next frame and repeat process.
- When you want to make a new action, still make sure the bones are in pose mode (don't have the mesh selected!) now press the "+"[plus sign] this will create a new action.
- Make sure the new action is selected, [you can delete what keyframes are in the new action. Repeat step 6.
Note: If you do select the mesh while doing actions, blender will save a mesh action, this will also be exported by blender and will make your life harder when writing the dei file for your model.
Exporting from Blender
Select your meshes that you will export and select your bones last.
File > Export > .fbx
- Make sure it's set to Export as a Binary file
- Tcik the "selected objects" box
- Choose the scale that you need
- Select Armature and mesh [shift click]
- Untick "add leaf bones"
- Click Export
The states for the animatiosn must be in all caps e.g. "state CHAIN1" if it is "state chain1" the sequence won't load
player weapon model
The below settings have the player weapon model facing away from the play (what we want)
front <0, 0, -1> up <0, 1, 0> worldOffset <0, -10, 0>
The below settings have a world object facing the correct way in doom(according to the maps object placement)
front <0, 0, 1> up <0, 1, 0>
Below are tip on how to make the model look really great
If your export only exports the first or no actions.
If you have deleted a bone after animating an action, make sure you also delete the bone in the animations actions (it's under the dope sheet summary)
If doomsday complains about too many vertices for a bone (Max four) make sure vertices have at maximum four bone weights on it, (to require less weights, make sure bones are parented correctly. if you weight a parent, only weight the child bone for what part you want moved separately)
pressing "ctrl" + "a" while selecting an object can fix(will set the current object scale as it is, to zero without scaling it) the scale of the model. I think it apply's the edit size to the object size (edit and object sizes and seperate)