Example Suite Everything guide v. 0.14
Posted: 27 Jan 2016, 09:26
by DestinedToDie
Want to try your hand at making objects for the Example Suite, but finding it difficult to navigate the mess of old installation guides, broken links and missing xml files? Here's something I combined from them that works easily.
Link to our issue tracker!
https://gitlab.com/OpenMW/example-suite/issues
Installing OpenMW-Template:
viewtopic.php?f=20&t=3003
Blender 2.49 tools installation
Quick package (untested) http://www.nexusmods.com/oblivion/mods/42755/?
No idea how to do these. If anyone knows, write instructions and I'll include them here.
OSG animations
https://wiki.openmw.org/index.php?title=TextureModding
When uploading to Redmine
Link to our issue tracker!
https://gitlab.com/OpenMW/example-suite/issues
Installing OpenMW-Template:
viewtopic.php?f=20&t=3003
Blender 2.49 tools installation
Quick package (untested) http://www.nexusmods.com/oblivion/mods/42755/?
- Spoiler: Show
- 1. Download and install Python 2.6 http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi
2. Download and install Pyffi http://sourceforge.net/projects/pyffi/f ... e/download
3. Download Blender 2.49B http://download.blender.org/release/Ble ... indows.exe
4. Download this Nifscripts zip https://github.com/niftools/blender_nif ... 7b0815.zip
Install.bat doesn't work for me, so this is what you need to do for a manual install. You need to find blender/.blender/scripts and dump the scripts from your zip in there. However sometimes the scripts folder is not even located in the program files Blender directory.
If it isn't in there, look for users/myusername/appdata/roaming/blender foundation/blender/.blender/scripts.
5. (Optional) Now if you want to view your nifs in Nifskope, then download and install it https://github.com/niftools/nifskope/re ... indows.exe
Nifskope is kind of like a limited tool that lets you view your files easily, as well as play around with /texture locations, make rectangular collision boxes, change how your mesh interacts with lights and edit the little numerical values you wouldn't normally be able to see in Blender.
///////////////////////////////
Alternatively, you can use this link. http://www.nexusmods.com/oblivion/mods/40980/ I have not used it myself, but Linux/Debian users John_D and Psi29a down below vouch for it.
- Spoiler: Show
- Make your model, UV unwrap it and texture. After that, press A to select all and ctrl+T to triangulate, so all faces carry over correctly. Then save as, with the legacy option selected:
http://i.imgur.com/pJKXoTy.png
Open it up in Blender 2.49. You will notice that it has no textures, but the materials and UV unwrap are intact. All you needd to do is reapply textures.
Keep in mind that all animation is lost, so any animating needs to be done in 2.49 at the moment. I don´t use .obj because it resulted in some weird stuff that was sometimes not noticeable, sometimes ruined the model.
- Spoiler: Show
- So first things first. You want to test it out, see if the nif exporter works. You select File->export->NetImmerse/Gamebryo (nif, kf, egm), select Morrowind as the nif version you want to export to and... get an error about map import UV something something. First, find your texture slots.
http://i.imgur.com/QzH3koq.png
Set all textures on every material to map input UV.
http://i.imgur.com/GJ64j1Y.png
When exporting, make sure that you have your mesh selected. Blender nif exporter only exports what is selected.
- Spoiler: Show
- If you were just introduced to Blender, don't bother with this yet. But somewhere down the line you will want to think about object collision. If a mesh has no collision, then the OpenMW engine simply generates it based on mesh polygons. However some meshes have a looooooooooooot of polygons. Colliding against 10 000 surfaces can confuse the engine and make it go slow for a bit, or even let you pass through the object. For this reason you might want to add a simplified version of the mesh from which the collision will be generated.
NPCs and Creatures currently only have 1 rectangular collision box. Rectangular collision boxes can be added in Nifskope. Here's how:
http://i.imgur.com/kUlu95C.png
As you can see, it is extremely tedious to move the rectangle around. You have to insert coordinates by hand. But what if your mesh is more complex than a rectangular collision box can represent? Then the collision model has to be done in Blender and as a separate object from the actual mesh:
Step 1: http://i.imgur.com/00SXlQI.png
Step 2: http://i.imgur.com/n8VRQku.png
When you want to export it, make sure you select BOTH the collision mesh and original mesh. Blender will only export what is selected.
Partial collision. Lets say you have a palm tree. You want the bark of the tree to have collision, but the leaves should not have any. What you could do is make a bounding box in Nifskope in the shape of a rectangle and cover the bark part. But a rectangular collision box won´t cover a bent palm tree, so no go. If you use the triangle mesh via blender, the tree leaves still retain their collision. So how do we get rid of the leaf collision while keeping the bark?
For that we need to go into Nifskope. We have 2 NiTriShapes here. The leaves and bark. Insert a new node.
http://i.imgur.com/nXlrARs.png
Choose NiNode.
http://i.imgur.com/Q5HrOgb.png
Now we will bring the Leaves NiTriShape under our second NiNode.
http://i.imgur.com/wT53dDz.png
As you will now see, we have Leaves under both NiNodes.
http://i.imgur.com/0MgFY5o.png
We don´t need both. So simply change the block node on the first to not include leaves.
http://i.imgur.com/QkSMgrd.png
Once again insert a new node. This time it´s NiStringExtraData.
http://i.imgur.com/uZEJqT6.png
It will probably pop up somewhere random. What you need to to is select the NiNode you want to apply no collision to and edit the ExtraData block to have the corresponding number to your NiStringExtraData node.
http://i.imgur.com/coUds2A.png
Final Step. Click on NiStringExtraData, change the bytes remaining to 7 and value to NCO.
http://i.imgur.com/4wztJKK.png
You now have a palm tree with no collision on the leaves and mesh generated collision on the bark.
- Spoiler: Show
- I'm not going to teach you how to animate, you can learn on your own on Youtube. However I am going to let you know how the OpenMW engine interprets these animations. You see, there are things such as animation groups. Refer to the link here: http://www.preik.net/morrowind/animationgroups.html
In order for OpenMW to know from which keyframe your character starts walking, and at which he stops, you need to go into text editor, make a txt file named anim (important) and write the keyframes together with animation groups. See example here:
http://i.imgur.com/2iTMHtS.png
When exporting your animated mesh, be sure to export nif+xnif+kf.
http://i.imgur.com/WfkXEeD.png
Nif contains the mesh, together with animation and everything.
xnif contains the mesh, but without any animation.
kf contains the animation, but without the mesh.
Store them all in your data files/meshes.
- Spoiler: Show
- Download and install one of the newer versions of Blender http://mirror.cs.umn.edu/blender.org/re ... dows64.msi
Download https://github.com/OpenMW/osgexport/archive/master.zip and put the osg folder into blender foundation/blender/2.76/scripts/addons. Launch Blender and do the following:
http://i.imgur.com/4JQhBur.png
You can now export osgt files by going to file->export->osgt in Blender.
- Spoiler: Show
- Just like nif, OSG export has its own quirks. First of all, it exports everything in the scene. This includes the light source. So if you have a light source that you do not want to include along with the model, delete that. I don't know if the camera is included as well, but delete it just in case it adds anything to the file size.
When exporting to osgt, you need to make sure that your blender file and image file are in the same folder, like in this screenshot:
http://i.imgur.com/XoE0x5E.png
When done, a textures folder with your .tga texture will appear. Put it in your game/data files/textures folder and the osg file to game/data files/meshes.
OSG exporter works with the following image formats: BMP, IRIS, PNG, JPEG, TARGA, TARGA_RAW, AVI_JPEG, AVI_RAW, FRAMESERVER
Yes, you read that right. There is no support for .dds format yet. So how to switch to it? Start with converting the image file to .tga and replacing whatever format is used in the mesh. To do so, find the textures tab in Blender:
http://i.imgur.com/i0pPJVS.png
Then switch off specular, normalmaps. For whatever reason specular makes the mesh black and normal makes it pure white, so I got rid of them. Switch the image to the .tga version of it:
http://i.imgur.com/i0ld7ec.png
Now use the OSG export. You will get a meshname.osgt file. Go edit it in notepad or whatever pleases you. Lines like these must be changed to use .dds:
http://i.imgur.com/iX7Lr6U.png
Now save it, put it in /meshes, put your .dds image in /textures, load it up in OpenMW-CS and see if the preview looks correct:
http://i.imgur.com/QUzd5Eo.png
No idea how to do these. If anyone knows, write instructions and I'll include them here.
OSG animations
- Spoiler: Show
- Osgt files currently do not support animations in OpenMW.
https://wiki.openmw.org/index.php?title=TextureModding
When uploading to Redmine
- Spoiler: Show
- Make sure you're including the original files (.blend, image files, etc).
http://i.imgur.com/mPNRkpp.png
It should also be apparent where the model came from if it isn't your making. If your source is stated in the issue comments, I think that's enough. The source must be CC BY 3.0 or CC0.
Phew. Now that that´s off the way, let´s get to modeling those assets.
- Spoiler: Show
- For weapons. Type of weapon comes first, then material, then any additional information. DaggerIron, DaggerSteel, BladeSteel2hand, AxeAxeGrinder (Axe Grinder unique axe),
Buildings. The set it´s part of comes first. First of all, it´s part of the Linnus set. But which part of the set? The wall part of it. The rest is descriptive of which part of the wall it is. LinnusWallShort, LinnusWallEntrance, LinnusWallTower8Plain
Textures. Usually tied to their respective mesh name. LinnusWallBrick, LinnusWallStone, LinnusWallWindow...
- Spoiler: Show
- All meshes with no collision, such as ingredients, armor, weapons, potions, books, etc are to be ported to the OSG format.
Because we have yet to figure out how to do collision boxes in OSG format, complex objects with collision shapes need to be ported to NIF format.
Due to OSG not yet supporting animations, all animated things also need to be in NIF format.
Placeholder assets are made low-poly.
The polycount for non-placeholder meshes is medium. If you think this is vague, look at Oblivion assets. That´s the quality we want to achieve for this project.
Non-placeholder meshes should utilize normal maps, parallax maps and/or specular maps.
We will not do PBR materials until PBR is implemented into the engine.
We have no specific art syle. Meshes are made for the purpose of showcasing the engine.