Tuesday, July 7, 2009

Wings 3D - Strutting One's Stuff

Naturally this being the longest blog post EVER I had to miss a step. And naturally it's about the third step in the process. Here's a revised and corrected and hopefully blunder free version:

So with all that behind us, back to the original request which was "Any chance of a step-by-step in making something simple, like a strut or a prop?"

First off, as it happens neither of those are particularly simple shapes because they both consist of an object which seems to be symetrical but isn't really. The blade on a prop is twisted equal amounts but in opposite directions moving outwards from the center of the object.

A set of struts may be easier or wildly more complex than a prop because a prop extends from the center point along a single axis (well, a twin blade prop at least). Struts can be simple like these:



Photobucket


Or head achingly complicated like these:

Photobucket


The first set is from the Mallard - an unfinished sea plane, and it's fairly simple because all of the bends happen around one axis. It starts at the top, goes down, bends back 135 degrees goes up and back some, bends down 135 degrees, goes down, beds up 135 degrees and goes up and back to the starting position.

See, like I said. Simple :)

The second set is from the Taube, it's the wing tip support strutcture which has extensions and fold backs and all sorts of torture that frankly I can't recall doing :)

For this example we'll create something more along the lines of the strut set from the Mallard - the as yet unfinished sea plane.

The first step is to build the plane. Things like struts should almost be an after thought because of the way SL resizes sculpties. Here's the Mallard struts in world. The image on the left is at the normal size. The image on the right is stretching them on the Z axis to make them longer from front to back.

Notice how stretching the prim on a single axis has thrown the proportions way off? The thing to remember is that no matter what the sculpty looks like it's really a sphere. In this case all that "empty space" between the struts isn't really empty, so when we stretch it too much on a single axis it throws things out of shape.



Photobucket


You can usually get away with a small amount of resizing, and depending on the shape and use it might not be an issue to resize in one direction, but for our purposes here it's best to try and design the sculpty to fit where it's going to wind up.

In terms of the actual sizing it's usually easiest to place a prim in the position where the strut set will be ending up and size it to fit, then make a note of the height, width, and depth of the prim.

For our example let's say that the prim wound up being 1.5 meters tall, .1 meters wide, and 1 meter from front to back.

Now at last to Wings 3D.

If you've been following along you've got everything that you need installed and ready to use (if not go catch up - I'll wait). You should also have the non-spherical template or as I call them the basic shapes in an easy to locate folder. We're going to be using the 32x31 cylinder quad.wing shape to start out with. Go ahead and load it and then immediately save it as Struts.wings. Wings 3D automatically saves files every few minutes and it's much easier if you don't replace your 32x31 cylinder quad.wings with our three dimensional doodling :)

At this point you should have something that looks like this:


Photobucket


It's clearly way too thick to use as struts unless we're going to be flying the Golden Gate Bridge, so the first step will be to thin it down some. We'll do this by using the scale function and resizing the entire object on the X and then Z axis. But how much do we resize it?

I'm sorry to say that it's time for math.

Remember how we made a note of the size of the prim that's currently standing in for out strut set? It's time to put them to use. For the first bit of resizery we'll need to determine what the ratio of width to depth is - happily the math on this is simple. Width = .1, depth = 1 so .1 / 1 = .1 or 10%.

So select the entire object by pressing Control and A, then right click and select Scale / X from the menu. Press the Tab key on your keyboard and enter the value 10 and press the enter key. Repeat the process on the Z axis and you should have something like this:


Photobucket


There are several ways to do what we're trying to do, but we'll go with the simplest and most obvious which is sort of like drawing a figure eight. We'll be using the grid in Wings 3D for guidence, so the first thing we need to do is to get our skinny cylinder lined up at the proper starting point and rotated to make our lives simpler.

So, click on the Face mode button at the top center of the Wings 3D window.

Right click to activate the menu and select Rotate / X and then pres the Tab key and enter 90. Press the Enter key to rotate the object.

Ideally the cylinder is now laying "flat" on the blue Z axis.


Photobucket


Press the space bar to de-select the object.

Here's where I went astray originally - bad BAD Ilsa. The ends of the 32x31 Cylinder are a little... Hinky. In Wings it looks as if it's the same diameter as the rest of the cylinder, but in SL it's a single point. To prevent this from causing us to say vulgar things much later on we're going to hide the end inside the remainder of the cylinder.

First press space to de-select the object, then click on the Face button and click the end face of the object.

Photobucket



Now right click and select Rescal Uniform. Press the Tab key and type 90 then press Enter. The face should shrink slightly in every direction.

Photobucket



Now right click and select Move / Z and slide the selected face until it's even with or a little bit inside the cylinder.

Photobucket



Releat the process on the opposite end of the cylinder. Once that's done press R to return to the default view.

Now click on the single face at the front of the cylinder. Ideally if you look in the upper left hand corner of the screen you'll see:


Photobucket


Time for a new toy. Click on Tools located in the menu bar area at the top of the window, then select Center / All from the menus. This will recenter the object using the selected area as the center point. You should now have this on your screen:


Photobucket


And we're ready to begin.

I've arbitrarily decided that the round face we just set to the center point is going to end up being the front top corner of the strut set. That is, when the strut set is in position, this face will be hidden slightly inside the upper wing, on the leading edge of the wing. As I said, this is arbitrary. In this particular case there's no need to do it in any particular way so I picked one out of the air. Depending on what you're making and how complex it is you might start in the middle or a quarter of the way from one end.

More math - kind of. When using the Move command in Wings 3D it's possible to enter numeric values using the Tab key, just like with Rotate or Scale. Rotate works in degrees, Scale in percentages, but what does Move work in?

Well as it turns out it works in grid squares. Moving something 1 on any axis moves that selection one full grid square on that axis.

Since our strut set is to be 1.5 meters tall all we need to do to get started is stretch our cylinder so that the first part is 1.5 meters - or 1.5 grid squares - long.

First press the space bar to de-select everything.

Then click on the Edge button at the top center of the Wings 3D screen.

Select one edge segement from the ring of edge segements that are closest to but not actually at the end of the cylinder:


Photobucket


Press L to select the entire edge:


Photobucket


Press Shift L to select everything from the highlighted edge to the end of the object:


Photobucket



Wait, that's not right!

Remember, Wings 3D selects to the closest end, and that's this end. We want to invert our selection which - thankfully - is easy to do. Simply press Shift & Control & I and it should reverse the selection.


Photobucket


Now we're going to move the selection back 1.5 grid squares on the Z axis. Right click for the menu, select Move /Z, press the Tab key, and enter -1.5 then press Enter.


Photobucket


Taa dah!

Now it's bend time.

Or is it?

There are two ways to do what we're about to do. One is to revert to geometry class and the old a squared + b squared = c squared to determine how long the angled strut section should be.

The other / easy / way we'll be doing it is to use the built in stretching that occurs when you move something in Wings 3D and not worry about geometry.

Whew, that was a close one - we ALMOST found a use for all that math they taught us back in school.

This is a little tough to explain so I'm going to go with lots of pictures.

First press Control A to select everything, then click on Tools / Center / All to reposition the object in the center of the screen.


Photobucket


Now press Space to deselect everything, and click the Edge button at the top of the window.

We want to skip over the next edge up, so click one of the edge segments on that ring, then press L to select the entire ring.

Photobucket


Press Shift L to select to the end of the object, then Shift & Control & I to invert the selection:


Photobucket


At long last it's bending time! Right click and select Rotate / X then press Tab. Type 180 and hit Enter.


Photobucket


Next we need to even things up some. This is easier to do by eye than by math, but you'll want a different perspective so press the X key on your keyboard to switch to the side view.


Photobucket


Now right click and select Move / Z and drag the selection until its end and the end of the unselected area are as close to touching as you can manage.


Photobucket


Here's a picture with the selection moved up a little so it's easier to see what's going on.


Photobucket


Time to create the first crossed strut. Press the - key on your keyboard to deselect the first ring.


Photobucket


Now right click and select Move / Z. Press the Tab key and type 1.5 then hit Enter


Photobucket


It's a little hard to tell because we've moved around so much, but what you're looking at in this picture is the strut as seen from the side, rotated 90 degrees as if it were laying face down on it's front. That means to create the first cross strut we have to move up one grid square - to correspond to the depth of 1 meter of out sizing prim. Right click and select Move / Y, then press the Tab key and type 1 and press Enter.


Photobucket


Shazam! All of a sudden things are starting to look like things.

Now we do sort of the same thing again to create the rear upright strut. Press the - key once to deselect the first ring.


Photobucket


Right click and select Rotate / X and presstab. Type -180 and hit Enter. Technically 180 will work as well, I just try to keep a running total of the rotation in my head or on a sheet of paper nearby if it's a complex bend, and using -180 reminds me that I've undone something.


Photobucket


Now we'll eyeball the selected portion back to where we want it. This isn't quite as easy because of the position and angle, so first let's hit the R key to return to the default view.

Next rotate the camera position around so that you have a good view of the object frrom the Z axis - somewhat like this:


Photobucket


Now right click and select Move / Z and use the mouse to move the selection until the two ends are lined up as closely as possible.


Photobucket


Now we'll create out second upright strut by pressing the - key once to deselect the first ring, then right click and select Move / Z. Press Tab and type -1.5 then hit Enter.


Photobucket


Beginning to sense a pattern? We deselect one ring to "hold" the twisted area created by the rotation. Then we flatten that ring to almost nothing and stretch the next ring out to the proper length and repeat the process.

Real quickly now:

Press - once


Photobucket


Right click, select Rotate / Y, press Tab, type 180, and hit Enter.


Photobucket


Position the camera so you can see what you're doing - in this case on the negative Z axis.


Photobucket


Right click, select Move / Z and move the selection until the two ends are lined up as closely as possible.


Photobucket

Press - once.


Photobucket


Right click and select Move / Z, press the Tab key and type 1.5, then hit Enter.


Photobucket


Right click and select Move / Y, press Tab and type -1, then hit Enter:

Photobucket


And that's a set of struts! Errr, with a lot of stuff hanging off one end... No worries, if this is all we need to build we can simply use Flatten Z to squish them and Move / Z to reposition them once we've flattened them. First right click and select Flatten / Z:

Photobucket


The flatten command flattens everything towards the center of the selection so now we need to reposition the selection. Right click and select Move /Z and use the mouse to reposition the selection to line up with the end of the upright strut again


Photobucket

Okay, now THAT'S a strut. Of course it's off center and at the wrong angle. For something like a strut this isn't a huge issue, but for things like wings and fuselages - and even more so sculpties which will be animated like rudders, flaps, and props, it's a giant problem. Happily it's easily fixed. First press Control and A to select the entire object. Right click and select Rotate / X. Press the Tab key and type -90, then hit Enter.

Photobucket

Then click on Tools in the menu area and select Center / All:

Photobucket

We're done! Well, not really but this is a great place to stop for the moment before delving into bounding boxes and the hell that they create.

0 comments:

Post a Comment