OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username:
Password:
CapsLock is on.
Remember me (for 1 year)
Log in
Home
Tutorials
Tutorials Home
Basic Tutorials
Intermediate Tutorials
Mad Marx Tutorials
In Depth Tutorials
Older Tutorials
External Tutorials
Cookbook
Cookbook Home
CodeBank
Snippets
Experiences
Ogre Articles
Libraries
Libraries Home
Alternative Languages
Assembling A Toolset
Development Tools
OGRE Libraries
List of Libraries
Tools
Tools Home
DCC Tools
DCC Tutorials
DCC Articles
DCC Resources
Assembling a production pipeline
Development
Development Home
Roadmap
Building Ogre
Installing the Ogre SDK
Setting Up An Application
Ogre Wiki Tutorial Framework
Frequently Asked Questions
Google Summer Of Code
Help Requested
Ogre Core Articles
Community
Community Home
Projects Using Ogre
Recommended Reading
Contractors
Wiki
Immediate Wiki Tasklist
Wiki Ideas
Wiki Guidelines
Article Writing Guidelines
Wiki Styles
Wiki Page Tracker
Ogre Wiki Help
Ogre Wiki Help Overview
Help - Basic Syntax
Help - Images
Help - Pages and Structures
Help - Wiki Plugins
Toolbox
Freetags
Categories
List Pages
Structures
Trackers
Statistics
Rankings
List Galleries
Ogre Lexicon
Comments
History: ArtisticallyDisabled
View page
Source of version: 3
(current)
{maketoc} !!Setup This tutorial assumes you are using 3DSMax for your modelling. Please note that the links for the Octopus exporter are not active, so you will not be able to use 3DS Max following these steps. Visit this link to find other Ogre Exporters for 3DsMax: [http://www.ogre3d.org/wiki/index.php/OGRE_Exporters] First we need to get your environment set up. Get the Octopus exporter from: [http://www.yake.org/index.php?option=com_docman&task=cat_view&gid=16&Itemid=38] Install it as described in the wiki: [http://www.yake.org/wiki/doku.php?id=octopus:octopus] If you use the version from 08/24/2004, apply the fix found in the forum thread: [http://www.yake.org/forum/viewtopic.php?t=452] If you don't already have the Ogre ModelViewer, get it at: [http://www.ogre3d.org/index.php?option=com_remository&Itemid=74&func=selectcat&cat=5] !!Octopus Settings #Press the "Export scene to Octopus" button created when you installed Octopus. #Open the "Export Plug-in Options" section and hit the "Open OctopusScript.ini" button. #Change all the directories to be correct for your setup. Save and close the INI file. #Make sure the Units are set correctly in the same section. #Open the "Default Mesh Settings" and make sure that the "Scale" is set to 1.0, and the "Flip Y/Z" checkbox is enabled. #Close the Octopus dialog box. !!Simple Mesh Now let's make a simple, multi-meshed model. Fire up 3DSMax. Create two boxes with some distance between them. {img src="img/wiki_up/Boxes01.jpg" alt="Boxes01.jpg"} Now add one bone in the center of each box, and give them fins to increase their influence area. {img src="img/wiki_up/Boxes02.jpg" alt="Boxes02.jpg"} Convert both boxes to Editable Meshes. !!Create materials for your objects Hit 'M' to bring up the Material Editor. Hit the "Get Material" button and double-click "OGRE (single/pass)". Rename the material to something friendly, with no unusual characters. It's safest to stick with alpha-numeric characters with no spaces. {img src="img/wiki_up/MaterialSettings02.jpg" alt="MaterialSettings02.jpg"} At the "Map 1:" location, first change the dropdown list from "--hide--" to "Diffuse", then hit the button labelled "None". {img src="img/wiki_up/MaterialSettings01.jpg" alt="MaterialSettings01.jpg"} Double-click "OGRE Texture Unit". Rename this section to a friendly name, as above. Under the "Bitmap Parameters" section, click the button labelled "None". Select an existing image file, and be sure a copy of it resides in your Octopus ouput directory (so the MeshViewer can access it). Now drag this new material to Box01. Do this procedure again for another material, selecting a different image file this time. Drag this second material to Box02. !!Combine both boxes into one object Select one of the boxes, and go to the Modify panel. Under the "Edit Geometry" section, click the "Attach" button, and select the other box. Click the "Attach" button again to deselect it. You've now got one object consisting of the two boxes. It will be named whatever the first box was that you selected. (Box01 in this tutorial) If you need to modify them individually again, select the object and pick "Element" under the "Selection" section. Then you can select each of the boxes individually, and if necessary, detach them (under "Edit Geometry" section). !!Add the Skin From the "Modifier List" dropdown, add a "Skin" modifier to your new object. Scroll down to the bottom of the panel, and under the "Advanced Parameters" section, change the "Bone Affect Limit" to 4. This is the maximum that Ogre will allow. Now scroll the panel back to the top, and click the "Add" button at the top of the "Parameters" section. In the popup window, select all four bones, and hit "Select". Hit the "Edit Envelopes" button under the "Parameters" section. Now you can adjust the bone envelopes if necessary. Make sure the envelopes don't overlap the opposite box. Refer to the 3DSMax manual if you need further instructions regarding the envelopes. {img src="img/wiki_up/Boxes03.jpg" alt="Boxes03.jpg"} Hit the "Edit Envelopes" button again to deselect it. The envelopes should disappear from the display. Select one of the large bones, and rotate it a bit to verify the envelopes are correct. Do the same thing to the other large bone (once for each box). If the boxes don't spin along with the bone, or part of the opposite box spins with the bone, fix the envelopes until it is correct. !!Create an Animation Now we're going to add a simple animation. Select the large bone on the left. Move the time slider to frame zero and hit the Key button. {img src="img/wiki_up/KeyButton.jpg" alt="KeyButton.jpg"} Do the same thing to the large bone on the right (add a Key). Right-click on the Play Animation button and change the Length of the animation to 29. {img src="img/wiki_up/PlayAnimationButton.jpg" alt="PlayAnimationButton.jpg"} Press the Auto Key button. It should turn red and stay red. Move to frame 7, and rotate each of the large bones 1/4 turn (90 degrees). Move them in opposite directions to make the animation more obvious that it's correct. Now move to frame 15 and do the same thing. Do it again at frames 22 and 29. Press the Auto Key button again to turn it off. Press the Play Animation button and both boxes should spin in 360 degrees smoothly. !!Add the Octopus modifier Select the Box01 object. From the Modifier List, add a OctopusExport modifier to the object. The "Skeleton Animation Type" should be "Skin only". Change the Frames numbers to run from 0 to 29, and set the "Animation Length" to 1.0 (assuming 30 frames per second). Type a name for your animation ("spin") in the edit box and hit the "Add name to list" button. {img src="img/wiki_up/OctopusSettings.jpg" alt="OctopusSettings.jpg"} !!Finally, export it! Select the Box01 object and press the "Export scene to Octopus" button. Type in a name for you mesh in the "Scene name" edit box. Be sure "Export meshes", "Export skeletons", "Export Materials", and "Run XMLconvertor" are checked, and the "Meshes folder" has your correct output directory. {img src="img/wiki_up/ExportDialog.jpg" alt="ExportDialog.jpg"} Hit the "Export scene" button, and hopefully you'll get the pop-up box saying "Exported 1 of 1 meshes". !!View your new Ogre mesh Using Windows Explorer (assuming you're using Windows), browse to the Meshes folder. You should find several files created by Octopus there. {img src="img/wiki_up/DirListing.jpg" alt="DirListing.jpg"} Open the file "Box01.mesh" with the MeshViewer utility. In the left panel, click the "+" next to "Animations" to open that section up. Here you should see the "spin" animation we created. Select it, and the boxes should start spinning!
Search by Tags
Search Wiki by Freetags
Latest Changes
Minimal Ogre Collision
Artifex Terra
OpenMB
Advanced Mogre Framework
MogreSocks
Critter AI
Mogre Add-ons
MOGRE
Mogre MyGUI wrapper
MOGRE Editable Terrain Manager
...more
Search
Find
Advanced
Search Help
Online Users
19 online users