|Making Snakes (or wriggly bits of pipe / cable, if you prefer)|
|1).Start with a cube (keeps things simple)
2). Rotate 45 deg (around X axis displays more in Y view) and remove the lower triangular portion (connect + loopcut / dissolve edges)
3). Select both ends (one end then I - similar)
4). Extrude normal a few times (do once then shft d)
5). Change to Y view, ortho projection, wireframe mode.
6). Move the geometry around until you get the shape you want - use any tools you want - this example was done with tweak mode.
7). Another view of (6)
8). Select all underside edges (except ends) - select one edge, press g, deselect ends.
9). Underside after removing unwanted edges.
10). Mirror object about underside face.
11). Sssssingle sssssmoothed sssssimple sssssssnake.
There's nothing particularly revolutionary about this - but starting with half a (rotated) cube in this way does offer certain advantages at the (6) stage - moving stuff around - imo.
a. All relevant geometry can be seen (assuming you don't 'pull' the top over so far you obscure a 'base' vert ) in Y view - there's no need to change views.
b. Using wireframe mode allows you to 'eyeball' all 3 edges that form any sectional edgeloop - and shift the verts around (TM ideal :) ), keeping the 'apex' vert on the 'base' edge (and preferably about halfway along?) - ensures the cross-section stays square to the Y plane and approx the 'correct' shape.
c. Clicking on any of the sloping edges (or base verts) gives you a length readout, so that you can correct stuff (if there's a need to be a bit more accurate) If you start with a standard cube (then scale after snake finished) these slant lengths are 2.0 WU (Wings Units) and base distance 2.828 (use something simple)
d. If you need to add extra sections - either connect / cut+connect or extrude more sections. If you use the extrude route, select apex vert on the end face (still in Y view) press f and de-select upper 2 faces, leaving the (required) end face - then extrude.
|The following is by no means 100% - but it might be ok in some situations.
1. Scale a cube to some suitable size - mine was 12 wu long (wings units)
2 .Cut and connect - I did a cut2 followed by cut 10 in each section - total 20 slices
3)….Scale radial Z -> 0.001% (Use Tab input). In Y view, drag select individual points (remembering they're actually groups of 4) and use move free to get the shape you want - turning the grid off might help to see the 'line' (Increasing the size of selected verts in Edit | Prefs might also help)
4)….After getting the shape you want - select all faces and Extrude Region Normal the desired amount.
5)….After a smooth.
(I cheated slightly at stage 4, because I loopcut off the very last sections from the 'snake' - they sometimes go weird. If you try shaping the 'spline' in 3D the results aren't as good - if I wanted 3D pipework runs, I'd make in 2D and join together?
Depending on the shape needed, using magnet rotates instead of Move Free can produce 'smoother' curves etc.
|1). Extract the top face off a cube, cut 'n' all edges (I used 5), delete cube. (Could also select a cube face and apply collapse twice - do it once and press d to repeat last op)
2). Using Tweak, (Y view, ortho) arrange verts to form the required centreline of pipe / cable etc (use spare verts to maintain integrity of shape) Add / remove verts using Cut / Collapse as necessary to get the profile required.
3)…Apply Face | Extrude -> Y to this profile by an amount equivalent to the required diameter of the pipe (I used 0.4 wu here)
4)…Select the modified area of the extrusion and extract region (Y used here)
5)…Extrusion + extracted region (delete / hide extrusion)
6)…Face | Extrude Region -> Normal by half the diameter (0.2 wu), and (re)connect relevant verts on the rear side of this object.
7)…Extrude region normal the reverse side by 0.2 wu
8). Select original 'centreline' edges, dissolve and Cleanup
9)…Finished basic shape
10)..After a smooth
A variation to the above would be to assume that the faces extracted at stages (4,5) are to form one side of the finished 'snake', rather than as described - then just apply Face | Extrude Normal once (and still connect up the relevant pairs of verts on the 'extracted face'.
|Eyeball and tweak snake|
|Radial scaled (haha) snake|
|Extract and fatten snake|
|14). Snake on its own.
15). Rear face (where loopcut) is a single face - need to sort this out.
16). Select this face.
17). Press v to convert to verts.
18). Apply Vert | Connect to form the required edges. ( Multi-connect now deals with this sort of situation in a much improved manner - thx to DanG :) ) - get rid of the unwanted edges at the ends - if you want to.
19). Final shape - View Z
20). Final shape - View X
Imo this isn't too bad, intermediate loops in roughly the right places etc - but, some comments........
a) How much to bevel (stage8)? Working on the (logical?) basis that the 'spline' being constructed is intended to be the central one, a large bevel will displace the final snake centreline from the 'drawn' one by a considerable amount.
One answer to this is to bevel by a very small amount (I used a large amount in the tut - for clarity) - and then scale the snake to make it fatter. This sounds more complicated than it is in practice - since all you've got to do, after producing the basic snake, is to select a single edge on any cross-section, press L, then G ….and then apply Edge | Scale -> Uniform. Since edge scale works on these cross-sections on an individual basis - you'll get a nice fat snake (see springs page for more details about this approach)
(I've done a 24 section snake, after using an extrude value of 0.0027 - the final object ended up quite close to the 'drawn' path :) )
b) The method above is based around a square (approx) cross-section, for simplicity - if you want to modify this - to a circular one with 8 edges, say, try the following.
Select all cross-section edges and connect them (check end caps)
Select all edges on any cross-section
Press v for vert mode
Apply Vert | Deform -> Inflate -> LMB option -> 100% (To circularise the cross-section)
Repeat for those sections that you want to modify - but bear in mind that if you have 'Highlight as temp. seln' activated (Edit | Advanced prefs) - this will help a lot - imo.
Highlight cross-section edge
After doing this the first time, you can use shift+D for the Inflate stage (or could set up as a Default Command - but you'll have to drag -> 100% each time)
Highlight cross-section edge, L, V, Shft D.
For a hexagonal cross section:
Select all cross-section edges
Connect (creates 12 edges)
Inflate (to circularise)
Select alternate edges, dissolve, cleanup.
c) If you want a 'true' constant cross-section, then this method may not be suitable - but unless the eye is capable of distinguishing the inaccuracies … why bother? (Ever checked the diameter (different places on same face) across a cross-section of a default torus that's been smoothed once?) (See mods to stage (8) notes)
d) If you need to construct a 'spline' on planes other than XYZ - make a reference block, rotate to relevant angle, select a suitable face and use this as necessary - (For flatten RMB and View | Align to selection etc)
e) When 'drawing' the spline, try working in wire-frame mode - it's better, imo, since you tend not to get distracted by the weird shapes the block is making - I also found it useful to set the 'spline' edges to hard - then they showed up a bit better for being a different colour. (You might even try setting your edge colour (temporarily) to the same as the background - so the 'hard' one really shows up)
f) When 'drawing' - don't forget that you can use Inflate (LMB) to make circular arcs and Flatten RMB / Scale Radial -> 0% to straighten out edges (see Flatten/ Align pages)
g) Smooth transitions appear to give better results - and don't worry about using too many points - can always remove the (unwanted) loops later.
h) Extending both ends (of the 'drawn' spline), past where you actually need them to stop - to reduce weird end problems / issues might also be an idea - just loopcut off the junk as necessary.
i) If the 'spline' has to be connected to the surrounding geometry - along its length (and this will happen with ever more complex shapes) - then after the desired spline shape has been created, introduce some more verts along its length, at appropriate locations, not all the way (use cut 2, say) and connect these new verts to the surroundings.
When you bevel the spline, these locations will behave incorrectly (compared with the 'free-floating' verts) - ignore this, and just select these 'faulty' edgeloops after extruding the bevelled faces (use clean up after) and all will be well again.
I will probably add some more pix to illustrate some of the issues raised in the comments above - when time allows (1st oct)
|De Bevelled snake
This method is based on trying to create a 'spline' - but using wings' tools. Whilst a 'proper' path extrusion drawing tool / plugin would allow the user to create smooth curves etc - these 'curves' disappear (and are replaced by straight lines) when the extrusion is actually made.
So, rather than specifying curves - here, you'll be working with the segmented central spline / axis - from the outset.
There are many issues / problems associated with this - but I'll comment after the strips.
(This is far, far easier to do, than describe - imo )
|1). First, since you can't draw 'lines' in Wings, you've got to create an equivalent that will do a similar job - this can be done in many ways, but I used the following:
Create cube, select top/bottom faces and moved normal 2 units
Select an edge and divide up into 20 - I used cut 2, then cut 10 on each half.
2). View X, Ortho and using Tweak Mode, move verts/ edges to form the desired curve / shape.
(Yes, I know this is a persp. view - but the vert shifting was done in view X)
3). What this partially completed 'spline' actually looks like in view X.
4). View after finishing the first stage of tweaking - I 've deliberately left the lower portion untouched, as I want to switch planes.
5). View Z - using Tweak again, do a bit more 're-arranging' on this plane, until shape complete.
6). Persp. view of the finished 'central spline'
7). Select this sequence of edges.
|8). Apply Edge | Bevel - I dragged to 1 unit - but this readout doesn't really mean anything - in simple terms.(Important - see note below)
9). Select an edge and note the length (top left info) - since these edges formed by bevelling are unlikely to be the same, maybe do a few more and get a rough average figure in mind.
10). Select all new faces formed by bevel op (except last 2 - likely to be weird) and apply Face | Extrude Region - > Normal. Use Tab input and enter the (average?) figure obtained from the measuring exercise.
11). What things look like after the Extrude op.
12). Now want to get rid of the original 'mould' shape - so select all the edges joining the snake to the mould. (if a complex shape with many sections, maybe select the 2 ajoining faces, press e, deselect unwanted edges etc?)
13). Apply Edge | LoopCut and delete / hide the unwanted chunk.
NB - Important update re stage (8) - the bevelling op - no pix as thought of after writing tut.
Bevel as described in (8), - then do the following before (9)
Select all the new (short) edges created during the bevel op. in (8)
Apply Edge | Connect, to create a new centreline through the faces formed by the bevel op.
Apply Edge | Bevel to this new centreline (it should be selected after connect op) - Drag as required - but now, this (second) bevel op creates new boundary edges an equal distance from the original selected central edge sequence - which is exactly what's needed :)
There will be a 'natural limit' to this bevel, governed by the surrouding geometry - going upto this is still ok.
Select one of the new 'inner' edges (similar to that shown in (9)) and note it's length - this measurement is the one to be used when extruding to form the snake.
Apols for the mods - but this does a far better job of making the diameter of the snake constant - try both - I hope you'll agree.
|Although there's no spline (path) extrusion facility in Wings, the 'bevelsnake' method that follows adopts a similar approach - ie creating a sequence of edges or 'spline' (in 2D or 3D) that can then be bevelled to form the basis of a 'snake'.
This method is dependant on the fact that verts with only 2 edges exhibit bevel behaviour that provides an acceptable basis for forming a 'snake' - 'acceptable' in this context being that the eventual cross-sections correctly align with the 'spline'
This behaviour only occurs when the verts are not connected to any other elements of the surrounding geometry.
Unlike 'standard' splines, the edge sequence (or 'spline') in Wings must somehow be connected to other elements of geometry for the whole structure to satisfy 'Winged Edge' specifications - it cannot exist as just a collection of edges 'floating in 3D space'.
The places where this 'spline' connects to surrounding geometry will cause (cross-section) alignment problems during the bevelling procedure - but this issue can be readily overcome (imo) by placing dummy verts that don't interfere with the required shape. (This is addressed more fully later in the comments section)
Whilst I believe this 'bevelling method' is more versatile than the other ideas that were originally on this page, I've left the original ones for general perusal and for historical reasons - if nothing else :)
This first (2D) example shows the behaviour (of Wings' bevel) on which the whole approach is based - and I decided to cover this topic first, even though I'd previously written the following (3D) example.
Apologies if this is more confusing (than normal?) but I think there's lots of scope for this method and I'm still messing around :) (Oct1)
(Basically, the 2D example is more upto date than the 3D one :) )
It's fully recognised that these methods are workarounds for standard path extrusion tools - but they (esp bevelsnake) can give some reasonable results (imo). A few examples here.
|1). Create a cube, connect two verts (diagonally opposite) on the top face and cut this new edge into 20 equal parts (I used cut 2 then cut 10 on the two halves).
I also made the new (diagonal) edge hard (Edge | Hard) because it could then be displayed in a different colour from the rest of the edges - I used white for hard edges here.
View Y, Ortho, wireframe mode.
The (white) edge sequence then effectively becomes a 'spline' from which the snake is created.
2). Staying in View Y, use Tweak Mode to re-arrange the newly introduced verts to form the required shape. A couple of things I've found useful which you might want to consider:
a) Have a few extra (redundant / dummy) verts at each end of the 'spline'
b) Be aware of tight bends - if you want to 'do' these properly, you'll have to make sure there are sufficient points on the spline to allow for these.
3). Select the hard edges (can assign a hotkey to Select | By -> Hard Edges if doing lots of this stuff) - and apply Edge | Bevel. As you're dragging the bevel tool, two things happen:
Transverse edges joining the boundary edges appear to (correctly) align to the (invisible) centreline of the snake.
A natural maximum (bevel)limit around corners is apparent.
4). Select a new edge (as shown) and note its length (top left info display) - deselect this, select another similar edge and compare its length with the first - repeat this and you'll see that they're different. If this inequality is acceptable, don't bother with the next few stages - otherwise, continue.
5). Select relevant (plus a few extra) edges.
6). Apply Edge | Connect (press C)
7). Apply Edge | Bevel - drag as necessary - go to the limit if you want, but there's no need, as snake diameter is easily corrected later if required.
|8). Shows the new edges / faces created by the bevel op - with end ones deselected. Deselct faces, select a cross-section edge, note length and re-select faces (sel. edge, G, F, etc)
9). Closeup of the situation - note the 'narrowing' at the very sharp corner (which is unwanted anyway) - this is caused because all the ('cross-section') edges formed by this second bevel are the same length - and obviously it's impossible to have both (sharp corner + same length edges) - without adding extra geom in such areas - the diameter of the wire / cable has considerable impact on this aspect, of course - compare with the real world bending of cable around corners (without cross-section distortion / wrinkling taking place).
10). Apply Face | Extract Region -> Normal -> 0 (use shift to constrain) and hide the original cube.
11). Apply Face | Extrude Region -> Normal. Use Tab input and enter the value obtained in (8)
12). Select the single underside face.
13). Press V to convert selection to vert mode.
14). Vert | Connect (press C) to get the finished snake - add additional geom (edges) at the ends if you want to stop ends going 'blobby' (Select end faces, press E, Edge | Extrude Normal -> 0, use +/- to create the radius value desired).
An alternative workflow for producing a 3D snake from the extracted faces created in (10)
Deselect the individual faces shown selected in (10)
Select the single (large) face on the underside of the extracted object.
Apply Face | Intrude to the required amount (this assumes you've previously measured the width of the extraction)
|Basic 2D Bevelsnake|