Modeling - Basic Tutorial: Difference between revisions
Nbohr1more (talk | contribs) |
m →Edit the ASE File: never use wordpad |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 12: | Line 12: | ||
Let's get a better look at it. Hold the middle mouse button {{MMB}} in the isometric window, and drag it somewhere. You'll see how it changes the view. (Alternately, use the numpad keys to do so.) | Let's get a better look at it. Hold the middle mouse button {{MMB}} in the isometric window, and drag it somewhere. You'll see how it changes the view. (Alternately, use the numpad keys to do so.) | ||
It will be evident whenever your object is selected. If at any time it is not (surrounded by a pink | It will be evident whenever your object is selected. If at any time it is not (surrounded by a pink outline in object mode, or yellow highlights in edit mode) {{RMB}} click it to select. | ||
== Assign a Material == | == Assign a Material == | ||
Line 37: | Line 37: | ||
== Edit the ASE File == | == Edit the ASE File == | ||
Open the .ASE file in | Open the .ASE file in notepad (or some safe text editor). Find the line similar to, | ||
*BITMAP "D:\programs\Blender2.42a\.blender\models\sometexture.tga" | *BITMAP "D:\programs\Blender2.42a\.blender\models\sometexture.tga" | ||
Line 58: | Line 58: | ||
Simple start to finish high poly and low poly creation and bake by Arcturus (Blender): [http://modetwo.net/darkmod/index.php?/topic/11198-sothas-mapping-thread/page__view__findpost__p__230663 link] | Simple start to finish high poly and low poly creation and bake by Arcturus (Blender): [http://modetwo.net/darkmod/index.php?/topic/11198-sothas-mapping-thread/page__view__findpost__p__230663 link] | ||
=== Using Blender to Fix Vertex Normals === | === Using Blender to Fix LWO Vertex Normals === | ||
(Xcen's Instructions) | (Xcen's Instructions) |
Latest revision as of 07:33, 20 April 2022
Originally written by SneaksieDave on http://forums.thedarkmod.com/topic/4455
There have been at least a couple requests for a tutorial that goes from modeling software to D3. Last time we had a lull, I wrote a simple Texture Tutorial, so this time it'll be a simple modeling one. It's done with Blender, is not all encompassing and doesn't cover much detail, but in the interest of helping people try other things, I'll offer up the small amount I have learned.
Modeling For The Rest Of Us
This will be a simple, bare bones tutorial for taking a model from Blender to The Dark Mod. It assumes you can find your own way around the modeling part; the only instructions for use of Blender I'll give will be bare minimum exact statements with no explanation behind the UI or usage. It's meant to help you get a model into TDM and then you take over from there.
Open Blender
Open the latest version of Blender, available from http://www.blender.org. You can branch here if you'd like, and either experiment with making something complex, or follow any of the mountain of tutorials that are out there, but I'm going to stick to a cube for the sake of simplicity. Plus, if you've launched Blender, there's already one there! (if there's not, click File->New and click the dialog that pops up. Now you should have a cube.)
Let's get a better look at it. Hold the middle mouse button in the isometric window, and drag it somewhere. You'll see how it changes the view. (Alternately, use the numpad keys to do so.)
It will be evident whenever your object is selected. If at any time it is not (surrounded by a pink outline in object mode, or yellow highlights in edit mode) click it to select.
Assign a Material
The cube needs a material. Hit F5 to bring up the materials panels. If you don't see several open panels across the bottom of your screen already, click Add New in the 'Links and Pipeline' panel. Now hit F6, so we can give the new material a texture. Click Add New in the Texture panel. For the texture type, choose "Image". In the Image panel, load any image. It doesn't matter which, as we'll be changing it.
Now you have a cube, and a material. You need a UV map.
UV Mapping
Watch Greybeards UV tutorial. It's the best one I've seen and a lot of people agree. We need a simple UV map for this cube. For the sake of this tutorial and simplicity, we don't care what it looks like. You're probably in Object mode (shown in the button bar at the bottom of the viewport), so make sure your cube is selected (pink outline) and then hit tab. You're now in Edit mode. Key in CTRL+TAB, and select "Edges" (or, find the Edge select mode button to the right of the viewport button bar). an edge to select it. With the edge selected, hit CTRL+E, and choose "mark seam". Do this for three or four adjacent edges. Again, we don't care what it looks like, only that it unwraps.
Once you have some seams marked, hit TAB (back to "Object mode") and then F ("UV face select mode"). Hit A to select all the faces of the cube. If they're not all pink now, hit A again. They should go between pure white and pink with each hit. Pink is selected. With them selected, hit U and choose Unwrap.
You now have a (probably crappy) UV map. Once you know a bit more, you'll use that UV map to control the texture layout. For now, we don't care.
Export your Model to ASE
Export your model. In the File menu, choose Export and then ASE format. (If you don't have that option, get the script here, and drop it into Blender's scripts folder.) Make sure to select "UV Image as Material" on the dialog that pops up, and then confirm the export.
Your model is almost ready.
Update from ungoliant: [1] has multiple import/export scripts with varying functionality for multiple blender versions. The usage link on that article points to a forum thread with an ase script for blender 2.61 (as of April 2012).
Edit the ASE File
Open the .ASE file in notepad (or some safe text editor). Find the line similar to,
*BITMAP "D:\programs\Blender2.42a\.blender\models\sometexture.tga"
That's the texture you loaded into your material. That's not the real material we want to use in-game, so we change it by hand. Blender has a limitation on the length of the name, so you can't always use full D3 texture paths.
Change it to something appropriate for Doom3's use and save it. For example,
*BITMAP "//base/metal/rustymetal"
Drop the modified .ASE into an appropriate model folder, and it will open in DoomEd's model browser. If you typed in a valid material for it, it will be textured. If it is black, you need to go back and fix the *BITMAP entry to something valid.
In the browser and the game, the object will probably be very small. In Blender, you'll likely want to set the View Properties | Grid Spacing to 8.00, so that it coincides with Doom3's grid, and then scale your object up in size.
That's really all there is to it. Of course it gets much more complex with multiple materials, bumpmaps from high-poly versions, effective UV mapping, texture creation, animation, and all the nuances of skilled polygonal modeling, but this should get you started enough to learn what's next at your own pace.
See next: Creating_an_ASE_model_using_multiple_Materials
Further Reading
Simple start to finish high poly and low poly creation and bake by Arcturus (Blender): link
Using Blender to Fix LWO Vertex Normals
(Xcen's Instructions)
- 1. I use Blender 2.75a with default settings. Nothing changed. Like a clean install. I started from your first uploaded .lwo model.
- 2. Start Blender.
- 3. In the top left click on "File" and go to "User_Preferences"
- 4. Go to "Add-ons" -> "Import-Export" -> and activate "Import-Export: Import LightWave Objects"
- 5. Download this exporter: http://www.blenderartists.org/forum/showthread.php?336749-The-LWO-import-export-project
- 6. In the "User-Preferences" -> "Add-ons" go to "Install from File...", install the exporter and make sure it is activated.
- 7. In the top right is a window named "Outliner" where you can see a "Camera", "Cube" and "Lamp" entity.
- 8. Right-click on the names and delete them.
- 9. Go to "File" -> "Import" -> "LightWave Object (.lwo)" and load your model.
- 10. In the top right "Outliner" window left-click on your model. Now you chould see an orange outline on your model. If not press key 'a' to select your model.
- 11. Check that you are in "Object Mode". Near the bottom of your window to the right of a "Object" menu you can select a mode (Object, Edit, Sculpt, Vertex, Weight and Texture).
- 12. On the left side go to "Tools" -> "Edit" -> "Shading" and select "Smooth".
- 13. Now press key 'tab' or click "Object Mode" near the bottom of your window and change it to "Edit Mode". When changing to edit mode you can see every triangle/quad hightlighted in orange. If not hit 'a'
- 14. Press 'a' to deselect your model.
- 15. Near the bottom of your window check a box (a cube with an orange line) named "Edge select".
- 16. If you right-click on an edge you can select it. Press and hold 'shift' while you right-click and select some edges that you want to split.
- 17. With the edges selected press 'ctrl' and 'e' to open the "Edges" menu and select "Mark Sharp". Now you should see a cyan line (and some orange sparkling through). If you want to unmark an edge go to "Edges" -> "Clear Sharp".
- 18. Change back to "Object Mode" with 'tab' and then press 'a' to deselect your model.
- 19. On the right side below the "Outliner" is the "Properties" window. Sometimes you need to rescale the window to make all entities visible. Just left-click on the border and drag.
- 20. Select the wrench icon to open the "Modifiers". Go to "Add Modifier" and select "Edge Split" in the second column.
- 21. Uncheck "Edge Angle" and make sure "Sharp Edges" is activated. Don't hit "Apply" yet.
- 22. Now the previously marked looks sharp. But the modifier isn't applied yet. You only see what you will get when you apply the "Edge Split" modifier.
- 23. Press 'tab' to switch back into "Edit Mode" and select all edges ('shift' + right-click for selection and 'ctrl'+'e' -> "Mark Sharp" to mark for splitting)
- 24. When every edge is marked for splitting go back into object mode (press 'tab') and hit "Apply" in "Properties" -> "Modifiers" -> "Edge Split". Make sure only "Sharp Edges" is checked.
- 25. If your model isn't triangulated go to "Edit Mode" (hit 'tab'), select everything (hit 'a') and press 'ctrl'+'f' to go to the "Faces" menu and select "Triangulate Faces".
- 26. To change the name of the material go to "Properties" on the right side and go to "Materials".
- 27. Below the list on the top is a field where you can enter or edit the name. Change it to the name of your material in the ".mtr" and hit 'enter'. Now you chould see the new name in the list on the top.
- 28. For export make sure you are in "Object Mode" (hit 'tab') and the model is selected (hit 'a'). There should be an orange outline now. This is important.
- 29. Go to "File" -> "Export" -> "Lightwave (.lwo)".
- 30. On the bottom left there is a "LwoExport" window.
- 31. Check "Smoothed". Don't actiavate "idTech compatible". And uncheck "Recalculate Normals". If there is something inverted ingame make sure to uncheck this one.
- 32. "LwoExport" in the top right.