]> de.git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Blender_to_dpm.textile
(Commit created by redmine exporter script from page "Halogene's_Newbie_Corner" versi...
[xonotic/xonotic.wiki.git] / Blender_to_dpm.textile
1 h1. Blender to dpm, a mini tutorial
2
3 h2. Pre-required tools and reading
4
5 * Go here - http://developer.valvesoftware.com/wiki/Blender#Installation and download the export script.
6 * Rig / Animate as outlined here - http://developer.valvesoftware.com/wiki/Animation_in_Blender.
7 * Only works with Blender 248a -- 249b (2.50 is a no go).
8
9
10 h2. Blender work flow 
11
12 * Select your mesh and armature, export as smd. select Static Mesh. You only need to re-export this smd if the mesh or the rig change.
13 * Now export as Animation Sequence. Preferably you have one track (and smd file) per animation. name it so you know what it is (modelname_attack1.smd for example).
14 * You could possibly use the "Animation Sequence ( ALL )" or "All..." options, but I haven't tried so i cant say if it works.
15
16
17 h2. dpmodel work flow
18
19 * dpmodel needs and a text file telling it how to bake the mesh and animation(s) into a dpm. This text file should look something like:
20
21 > <pre>
22 # save the model as model.dpm
23 model model
24 # move the model this much before saving
25 origin 0 0 0
26 # rotate the model 90 degrees around vertical
27 rotate 90
28 # scale the model by this amount, 0.5 would be half size and 2.0 would be double size
29 scale 1
30 # load the mesh file, this is stored into the dpm as frame 0
31 scene model.smd
32 # Each following (if any) smd's are animations
33 scene model_action1.smd fps 30
34 scene model_action2.smd fps 30
35 </pre>
36
37 * Place all smd's and the text file in the same place, execute "dpmodel whatever_you_named_that_text_file". If all goes well you should now have a working dpm (and .framegroups file if its animated)
38
39
40 h2. Caveats:
41
42  * Your mesh needs to have a material assigned to it. The name of the material is what dp will look for to use as texture/shader on the model/mesh/es.
43  * Blender exports what you got selected. make sure you have the relevant (and only the relevant) objects selected.
44  * If export script fail with a encoding error, open it in a text editor and remove the whole top comment block (lines starting with #). There's an illegal character in there according to pyton. I haven't bothered to check closer witch one it could be.