Well anyway lets get back on topic, I discovered a smd import/export plug in that is compatible with blender 2.5.
here is the the projects page: https://code.google.com/p/blender-smd/
the smd format support in sauerbraten is from what i can tell is fully fleshed out and has all the same options as its support for MD5 which what i was originally going for. So lets take a look on the steps involved in exporting to a SMD and then the process of configuring and setting it up so that it is ready to be used in the cube II engine.
Step 1
First of we need to download and install the blender-smd plugin. go to https://code.google.com/p/blender-smd/ and download the latest version of the plugin(io_smd_tools). Then extract the zip folder to any temporary path. Open up blender and click "File" >> "User Preferences" (shortcut Ctrl + Alt U) to get into blender's application settings. Then navigate to the "Add-Ons" then click install select the extracted file from the download earlier. Once you go the plugin file selected click "Install Add-On". Then in the Import/Export section "Import/Export SMD Tools" and check it to enable the plug in. Remember to click "Save As Default" at the end so that this plug in is enabled by default each time you open up blender.
Step 2
Now its time for the easy part which is making model and exporting it, there is a few things that you will need to keep in mind in regarded to exporting you models in SMD for the cube II engine. The main thing you need to keep in mind is that name of the material you use for the model. Though the actual settings i believe don't get transported into the export, this is so when it comes to adding the color, normal(bump), spec maps that you know the name of the material to apply it to. When it comes to actually exporting the model you will find the SMD tools menu in the scene menu in the buttons panels, its a simple process of selecting the output folder for the project and the models that you wish to export.
Step 3
Now move the model, and a copy of the textures you wish to apply to it in the game to sauerbraten's <base>/packages/model/<model's folder> so that the engine can find it when you call it. and now we need to create a file called "smd.cfg" inside the model's folder so that we configure the model for the game. here is an example of the "smd.cfg" and what it might look like.
example configureation
smdload crate02.smd // model no. 0
smdskin crate02 skin.png
mdlscale 1500
end of example configuration
The first line "smdload crate02.smd" tells the cube II engine where the model file is located. the second line "smdskin crate02 skin.png" instructs the engine to apply the objects texture map or "skin" as it is referred too to the material. (note: "crate02" is the name of the material inside "crate02.smd" remember if you did not name the material in blender then "smdskin Material skin.png" would be what you would have to enter.)
Lastly the "mdlscale 1500" this line is needed because blender units may look large in blender but the cube II engine to treats 1 blender unit as like 1 inch in size the 1500 actually tells it to scale the object 1500% of it original size.
(this is just a very basic configuration if you want to set things like the normal map (bump map) Look to the model documentation you may notice that the SMD section is not explained but that only because all the SMD options are identical to MD5 the only difference is that "md5" in all the commands is replaced with "smd" "md5load" = "smdload" etc.)
Step 4
now all that i s left is to import the model in the game engine to do so, in the command shell in the cube II engine whilst editing a map. Simply type "mmodel <model'd folder path>" eg. model's folder is in <base>/packages/models/crate02 then the command will be "mmodel crate02" to import the model. and the rest you should already know if you've messed around in the cube II map editor.
I followed your post and managed to get an smd player character to load and render correctly in Red Eclipse, but it never animated. I am not sure if the cube engine supports animated smd.
ReplyDeleteSauerbraten is not an update from AssaultCube, AssaultCube is an indepentend mod of Cube Engine, and Sauerbraten is an update the Cube Engine, not the AssaultCube.
ReplyDeleteThey are different games developed by different people, only built in the same engine, Cube :D