Hi! This is my tutorial on how to make a 3D model for your C# games. In this tutorial, we'll look at three things you need to know about 3D models and C#. Before we begin, you'll need to make sure you have a couple of things.
1)a C# editor (I use Visual C# 2005 because its free by microsoft.)
2)Anim8or (also free. You can find it at www.anim8or.com )
3)conv3ds ( by Microsoft, free, and found at http://francis.dupont.free.fr/coindev/english/direct3d/convert.htm )
STEP 1 - making a model
So, now that we have those, we can get started. We'll start by making a simple 3d model. To do this, open Anim8or. You should see a large blue grid near the center of the screen. Next to that, you'll see a set of buttons. These may appear confusing at first, but they're really simple. For this tutorial we'll only need one of these buttons; the sphere one (). Click this button and position your mouse somewhere around where the two white lines meet, on the large blue grid. Click and drag your mouse outward. You should now see a sphere in the center of your screen. Double click on the sphere. a window should pop up that is called "Sphere Editor".
Change the diameter to 40 and click "OK". Now press and hold the alt key and press E, L, and C. That centers the sphere around the "origin", wich is where the two white lines meet.
So, now you have your sphere. You still can't use it yet. In order to save your sphere press and hold alt and press J and E, select a folder to save your sphere in, set the "save as type" to "3D Studios", name the file ball, and click save. Now you have saved your ball and we're ready to go to step 2.
STEP 2 - converting your model to be used in C#
Now, we have a model, but we can't use it with C#, yet. To convert the .3ds file into a format that C# can use, we have to use conv3ds.exe. To prepare for this, you need to copy conv3ds.exe to the folder that you saved your model to. Now your ready to start. Open the "Start" menu and press "Run". Click browse and locate conv3ds.exe that is saved with your model. Now, here's where it get's a little difficult. Click in the text box to take you to the end of the text. After the end quote, type a space and then the name of your file. Click "OK". You should now have a .x file in the same folder as your .3ds file. (NOTE: It is now ok to delete the copy of conv3ds.exe that is saved with your model. However, always make sure to have a copy on your computer for future projects.) This .x file is what you'll use in C#. Now! ON TO STEP 3!!!!
STEP 3 - adding your model to your C# project
This is the final step of this tutorial. To begin, you need to open your C# editor and open your game solution (or you can create a new one if you haven't started one yet). So, once you have loaded your project in the solution explorer, right click on your project name.
Then, click "Add", "New Folder", and call the new folder "Content". Add another folder called "Models". Finaly, click "Add", "Existing Item". Select your model file and click "Add". You now have a model loaded into your C# solution.