Jump to content

Milkshape Tutorial


Recommended Posts

First off, Milkshape is not free. It costs $35. Significantly cheaper and much more suited to low-poly modelling than most comparable software. There are plenty of tutorials available on it.

http://chumbalum.swissquake.ch/

I will be including a milkshape 3d file setup specifically for exporting to KSP that includes:

http://www.captainslug.com/temp/ksptut.zip

+ Materials for your part and node_collider, with shininess, specularity, and other settings setup to closely match the in-game appearance of other parts.

+ Simple mesh showing part orientations relative to KSP

+ Textures used in tutorial

Part One: Modeling

ksptut_00.jpg

ksptut_01.jpg

1. First step is to create a basic shape. With cylinders you can specify the number of sides, how many stacks, and how to close the ends of the shape. Make sure to check 'Snap to Grid' so your part is scaled to be exactly 1 meter square. Left click and drag from one grind intersection to another.

ksptut_02.jpg

2. Now you need to Move your part precisely by entering the coordinates in the boxes so that its center of mass will be the same location as the origin (0,0,0 for X,Y,Z). Enter the coordinates then hit the MOVE button next to the coordinate entry fields. If your part went the wrong way, Undo, and change the affected direction to a negative.

ksptut_04.jpg

3. Now you can Scale your simple shape to the final size of the part you are trying to create. Here I am making a 3m x 3m x 0.25m cylinder.

ksptut_05.jpg

4. The Y axis indicator is in the way of something I need to select. So I can select it with the following options, then Hide it (CTRL + H).

ksptut_06.jpg

5. With the Y axis now hidden, I can use select By Vertex and Ignore Backfaces to choose the top surface of the cylinder.

ksptut_07.jpg

6. I'm going to make this cylinder into a ring, so I need to Extrude the top of the cylinder to add a stack to it. I'm going to enter a distance to extrude to, which will make moving it back to where it came from much easier later.

ksptut_08.jpg

7. With the top face Extruded, I can now Scale it. I don't want it to move along the Y axis when being scaled, so I have checked 'Center of Mass'.

ksptut_09.jpg

8. After moving the newly Extruded stack back down a precise amount to put it back at the same height where it came from, I can extrude again to make the inside of the ring.

ksptut_10.jpg

9. Now I can just Delete the top and bottom of the original cylinder.

ksptut_11.jpg

10. The inside and outside of the cylinder are going to make it difficult to select the next set of faces, so I'm going to select them and Hide them.

ksptut_12.jpg

11. Now I can select the top of the ring easily. First I'm going to make a Duplicate (CTRL + D) of it. Then I'm going to Mirror it from top to bottom. Now I have a top and a bottom side of complete the ring.

ksptut_13.jpg

12. Now I Unhide the inside and outside, select all verteces, and Weld them (CTRL+ W). However, the smoothing I end up with looks a little odd.

ksptut_14.jpg

13. If I assign the top and bottom of the ring to a different smoothing group, the ring looks a bit better.

ksptut_15.jpg

14. And if I regroup the ends of the ring, the inside, and the outside from eachother apart from each other then UV-mapping them will be much easier.

Link to comment
Share on other sites

Part Two: UV-mapping

ksptut_16.jpg

15. Select all of the Groups that make up the ring. Go to the Materials tab and select Material__25, then press Assign. tutorial.png, as shown, should be the image file loaded for that material.

ksptut_17.jpg

16. Press CTRL + T to bring up the Texture Coordinate Editor. Cylinders that you made from the Model tab will already have a good and usable mapping assignment. However the default assignment area covers the entire image, and we need to scale it down to just cover part of the texture.

ksptut_18.jpg

17. Click Move, then left-click the top left corner of the texture. This yellow crosshair indicates the current Origin coordinate.

ksptut_19.jpg

18. With the Origina coordinate placed, you can use Scale to shrink the texture mapping down to the area you want to cover.

ksptut_20.jpg

19. Select another Group from the drop-down box. Faces created through extrusion will not have a useful assigned texture coordinate. So you will need to select a Region of the texture, then Left-click and drag to create a Region on the texture. Select the orientation from the next drop-down box, then click Remap. The verteces/faces selected in the group will be remapped to fit that Region of the texture from the selected orientation.

ksptut_21.jpg

20. There are plenty of way to alter your texture map to get the most use out of a single image. But you haven't actually made the texture yet.

ksptut_22.jpg

21. You still need to make a wireframe template to draw your texture onto. To do this you need to apply a temporary flat color image as the texture file. A medium or charcoal dray works well

ksptut_23.jpg

22. Regroup all of the groups for the ring. Delete any extra meshes you don't want in-game. KSP loads the mesh faster with fewer groups anyways.

ksptut_24.jpg

23. Open the Texture Coordinate Editor again. Now that you have all of the faces in one group, you have a populated wireframe template. Take a screen capture of it, then paste and crop it in whatever software you are using to make your texture. Save it over the solid color texture, and reload the image file in Milkshape to confirm its alignment on the mesh.

Now you can create your texture. Each time you save your texture you will need to reopen it from the Materials tab in Milkshape to see the changes.

Link to comment
Share on other sites

Part Three: Exporting to KSP

ksptut_25.jpg

24. Duplicating some of the steps from Part One, you will need to make a node_collider mesh from a simple shape, scaled to match your visual mesh.

It will need to: have the '02___Default' material assigned to it, be a single group named 'node_collider', and be a convex shape in order to work correctly.

ksptut_26.jpg

25. Now you are ready to export your mesh into a part folder you have created for your new part. Name your folder without using underscores. It mush include a /texture directory in it (with a texture file in it). The part.cfg file that references the correct mesh and texture file names as well as having a unique part name will also be required.

The orientation of your part in-game is affected by both the node parameters in the part.cfg, and the accurate interpretation of the node_collider in your mesh. Either being incorrectly loaded could result in your part loading out of the alignment you are expecting.

26. You will need to define in your part.cfg file where your attachment nodes are. If the Scale in your part.cfg is set to 1.0, then you can get these location values directly from the mesh within milkshape. They appear in the lower left corner, or you can view coordinates of selected verteces by using Manual Edit from the Vertex menu, then check the box labels 'Show Only Selected'.

If your part is scaled correctly it shouldn't be too hard to estimate these coordinates correctly. A stackable 1 meter tall part that is centered on the part origin will have a top node at 0.0,0.5,0.0 (x,y,z) and a bottom node at 0.0,-0.5,0.0 and the orientation for both nodes will be 0.0,1.0,0.0 (UpX, UpY, UpZ).

ksptut_27.jpg

27. Using the SDK Partlab provided on the KSP home download page, open your new part. As shown, this is what a part looks like if loaded with a wireframe template texture.

If the part loads in the correct size and orientation without producing any significant errors in the upper dialog box, then you can move on to testing it in-game.

ksptut_28.jpg

28. Now you have to start possibly the most annoying part of the process. Refining the part.cfg file to get the part to actually do what you want it to.

That about covers the basics

There is a great deal about part.cfg files that I still don't understand. I can rarely get them to work perfectly the first time. And getting parts to interact with each other the way you want them to takes a lot of trial and error. This guide will at the least help you get through the creation of mesh files and UV-mapping.

Link to comment
Share on other sites

Absolutely lovely :)

Working on my own part as I type this. I am having two issues though:

1) The view controls on the 3D render view are... extremely sensitive to say the least. I was able to get it centered on the model with the snap-view-to command but zooming in and out jumps a mile a wheel click. Really annoying as I'm trying to check my textures up-close.

2) I'm having serious issues with proper texture tiling, argh!

Link to comment
Share on other sites

The view controls on the 3D render view are... extremely sensitive to say the least. I was able to get it centered on the model with the snap-view-to command but zooming in and out jumps a mile a wheel click. Really annoying as I'm trying to check my textures up-close.

In the render view you have several options for zoom. Ranging from fastest to slowest: SHIFT + Mouse Wheel, Mouse wheel, or SHIFT + hold Left-Click and drag. CTRL + Left-Click drag in any pane will pan.

Right clicking any pane gives you the options of 'Frame All' or Frame Selection'

UV-mapping takes a great deal of practice.

Link to comment
Share on other sites

Thanks, Slug :)

n9rjK.png

OCsVC.png

I'd like to take a stab at making a Minuteman III to accompany my most lovely W88 warhead, but that took me about 5 hours. Not to complain, but I don't think I have the kind of time it would take to create something as major as all the rocket stages and such - certainly not to any degree of complexity yet.

Link to comment
Share on other sites

That's actually quite speedy for a first run-through. You'll only get faster with practice.

The more shortcut keys you're familiar with and the more you understand how to use all of the functions together to get the shape you want the faster you'll be.

But yes, modeling and texture are time-consuming.

Link to comment
Share on other sites

Next question - how would I go about adding in new triangles?

1qdhq.png

Here's my model. In order to get higher quality on the UV map, I want to add a few subdivisions by hacking it in three pieces.

I tried using the 'Subdivide' options but I get something like this:

coueY.png

Well, that has the vertices where I want, but I need them connected in a big 'ring', so I need to get an edge to go all the way around them. I tried using the 'turn edge' feature but I couldn't get it to work right, I have a really hard time selecting the proper faces like this... I have it in 'select faces' and when I just click one triangle, like 12 more randomly around the place select as well.

Now I need to do the opposite - remove an edge. Here you can see a problem:

M1mUG.png

What a waste of triangles. Obviously I should be able to remove those extraneous edges without impacting the visible model whatsoever. Shouldn't affect anything at all, really. So how the hell do I do it?

I've tried google but even with 'milkshape' in the search I get results for every damn program scattered throughout...

Finally - the big one - and this is probably a conceptual misunderstanding of how this all really works.

n0rkJ.png

This is what the underside of my model looks like. I painted a spherical bulge on it, but then I decided I wanted to make that 'bubble' an actual part of the 3D model. Now, obviously I can just drag a sphere into it, but how does this really work? If I drag a sphere, I can put it into the right position and maybe delete some of the extra bits, but it would be best if everything was snapped together, wouldn't it? I know modeling isn't like making an old Half-Life 1 .bsp map where gaps and orphaned edges cause it to explode, but doesn't that leave a bunch of unused triangles and make the entire thing really quite inelegant and ugly? How would I *really* extrude a semi-spherical bubble into there without it being a messy half-assed glob?

Link to comment
Share on other sites

If it's another 'ring' of verteces you want, you need to use the extrude tool to add another stack. Select all of the faces above the 'ring' from which you want to extrude, then from the Extrude tool input the distance along the Y axis you want to extrude, then hit the Extrude button.

You will have a new stack. The 'ring' of verteces can be scaled to the diameter you want, then you can move the verteces of the tip back to their original location.

Link to comment
Share on other sites

Thanks, that worked - so regarding this spherical protrusion... where the problem lies is that I have my protrusion modeled, but it's not 'part' of the actual model - this is going to complicate UV mapping to say the least. Is there a way to 'fuse' it into the existing faces so that they're subdivided amongst the actual faces that already exist?

Link to comment
Share on other sites

Thanks, that worked - so regarding this spherical protrusion... where the problem lies is that I have my protrusion modeled, but it's not 'part' of the actual model - this is going to complicate UV mapping to say the least. Is there a way to 'fuse' it into the existing faces so that they're subdivided amongst the actual faces that already exist?

You have to assign all of those faces to the same Smoothing Group.

Extrusion does not extrapolate the new faces into the existing texture coordinates. So if you want To make your mesh have more stacks but still have a good pre-formed cylindrical texture map you would have to make a new cylinder with the correct number of stacks.

Otherwise you have to make new texture coordinates for the new mesh.

Link to comment
Share on other sites

  • 2 weeks later...

Have you tried doing moving fins with milkshape? If so a few clues how to do it would be helpful. I messed around with it a bit but simply adding a joint to the model didn\'t help.

Open the stock Stabilizer mesh in wordpad. I have a feeling the different pieces are denoted simply by the name of the mesh.

One mesh rotates with control, one does not, and the other is just the node_collider.

KSP doesn\'t support joints or bones.

Link to comment
Share on other sites

Turns out that none of my wings have any aerodynamic properties whatsoever, which is odd since my wing part mimics your wingload1 part. Names and material of meshes match yours for example, the only thing that should be different between our two .dae files should be the shapes of the meshes, yet my parts don\'t do anything. The part file should work since it\'s simply copy-pasted from a working wing and adjusted to point towards my mesh and texture files.

My feeling is that I\'ve missed some small but important step somehow. Any ideas?

Link to comment
Share on other sites

If you want a moving fin then in the part.cfg of the file you have to set the 'module = Stabilizer' rather than 'module = Winglet'.

I\'m not entirely sure how to define what part of the mesh will rotate.

You\'ll have to ask C-7, or rummaged through the default winglet2 mesh using wordpad to try to determine how that effect works. I\'m not familiar with those yet.

Turns out that none of my wings have any aerodynamic properties whatsoever, which is odd since my wing part mimics your wingload1 part.

Winglets only reinforce angular stability. And I don\'t think I set the parameters in mine very high since I didn\'t want them to behave as wings.

You should check out some of the cfg files for the C-7 flight pack parts if you want wings rather than winglets.

Link to comment
Share on other sites

The reason I chose to base my wing of your wingload1 part and not c7\'s wings is that he doesn\'t use milkshape and his .dae file therefor looks different. And your wingload1 part does work as a wing, but the low values you chose in the .cfg means that you simply need a lot of them to support any kind of airframe. My dragCoeff and deflectionLiftCoeff values are therefor closer to C7\'s values than yours. Which leads me to believe that ksp simply does not recognize my parts as wings.

Link to comment
Share on other sites

Also it is nice idea to check in Milkshape where to place attachment points - writing part.cfg using only wild guess isn\'t good idea. I think it would be really helpful to people if you would cover that process in your tutorial.

Link to comment
Share on other sites

  • 4 weeks later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...