Guide:Blender: Difference between revisions

From MCM Combat Operations
Jump to: navigation, search
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
Hello and welcome to Bellimora's little guide of mesh creation for SL and possibly even MCM.  I created this guide because a few people I know are showing interest in blender, so I'm going to infodump all my secrets and tricks and money here, with PICTURES!  So, dig in and have fun!
Hello and welcome to Bellimora's little guide of mesh creation for SL and possibly even MCM.  I created this guide because a few people I know are showing interest in blender, so I'm going to infodump all my secrets and tricks and randomness here, with PICTURES!  So, dig in and have fun!


==Mesh Basics==
==Mesh Basics==
Line 9: Line 9:
*A mesh may have up to 8 textureable faces divided and arranged however the mesh creator sees fit.
*A mesh may have up to 8 textureable faces divided and arranged however the mesh creator sees fit.
*Unlike a sculp a mesh may have as little or as many polygons as the author pleases.
*Unlike a sculp a mesh may have as little or as many polygons as the author pleases.
*Mesh vertex placement has floating point precision, that is it's coordinates can have decimal values.
*Mesh vertex placement has floating point precision, that is its coordinates can have decimal values.
*Mesh has a prim equivilence rating, how many prims it takes up.
*Mesh has a prim equivalence rating, how many prims it takes up.
*Prim equivilence is the higher of the following two measurements of a mesh:  Physics, and download weight.
*Prim equivalence is the higher of the following two measurements of a mesh:  Physics, and download weight.
*Having a lot of polygons gives a mesh a heavy download weight.
*Having a lot of polygons gives a mesh a heavy download weight.
*Forcing a mesh to very accurately emulate an intricate shape for people standing on it and objects colliding with it will make it have a heavy physics rating.
*Forcing a mesh to very accurately emulate an intricate shape for people standing on it and objects colliding with it will make it have a heavy physics rating.
*If physics and downloa are below .5 then the mesh will be .5
*If physics and download are below .5 then the mesh will be .5
*If two .5 meshes are linked together into a single object in SL, the objects prim count will be 1.
*If two .5 meshes are linked together into a single object in SL, the objects prim count will be 1.
*If you want your mesh to have a minimized prim count, keep the physics emulation as simple as you can get away with, keep the amount of polygons used as low as possible
*If you want your mesh to have a minimized prim count, keep the physics emulation as simple as you can get away with, keep the amount of polygons used as low as possible
Line 43: Line 43:
Now before you make and upload mesh, you need to figure out how to use the program.  To the right side of this section, there's a picture of blender's main view screen.  I've highlighted some areas with color.  If you click the image you can get a larger view.
Now before you make and upload mesh, you need to figure out how to use the program.  To the right side of this section, there's a picture of blender's main view screen.  I've highlighted some areas with color.  If you click the image you can get a larger view.


In red in the upper left hand corner is the menu bar.  The little minus sign in a circle if pressed will make it vanish.  press it again to make it appear again.  I once made that vanish accidentally and worried myself some.  Figured I'd mention it now in case you accidentally do it too.
In '''red''' in the upper left hand corner is the menu bar.  The little minus sign in a circle if pressed will make it vanish.  press it again to make it appear again.  I once made that vanish accidentally and worried myself some.  Figured I'd mention it now in case you accidentally do it too.


In Blue to your left is the tool box.  Press '''T''' to toggle that on and off.
In '''Blue''' to your left is the tool box.  Press '''T''' to toggle that on and off.


Below that in purple is a button that if you press that it'll open up a list of work-space types.  You'll need to use that when texture-mapping.  It has a pile of different workspaces i don't even know what they do.  If you're a power use you might want to play with some of those later.
Below that in '''purple''' is a button that if you press that it'll open up a list of work-space types.  You'll need to use that when texture-mapping.  It has a pile of different workspaces i don't even know what they do.  If you're a power use you might want to play with some of those later.


To the bottom of the window highlighted in black is the mode selector.  The three biggie modes you want to be aware of are sculpt mode, edit mode, and object mode.  '''Object mode''' lets you select move and resize individual meshes in your blender work  project.  Yes, you can make multiple meshes at once and upload them all as a single linked object that you can dissect later.  '''Edit mode''' lets you get in there and hand-edit vertecies, delete them, split them, all that nitty gritty precision stuff.  '''Sculpt Mode''' Lets you make broad changes with a variety of sculpting tools.  Sculpting does not add vertecies or any other points that can bend, so you better pre-prepare a surface to be rather flexible before trying to use it.  It's great for organic curves.
To the bottom of the window highlighted in '''black''' is the mode selector.  The three biggie modes you want to be aware of are sculpt mode, edit mode, and object mode.  '''Object mode''' lets you select move and resize individual meshes in your blender work  project.  Yes, you can make multiple meshes at once and upload them all as a single linked object that you can dissect later.  '''Edit mode''' lets you get in there and hand-edit vertices, delete them, split them, all that nitty gritty precision stuff.  '''Sculpt Mode''' Lets you make broad changes with a variety of sculpting tools.  Sculpting does not add vertices or any other points that can bend, so you better pre-prepare a surface to be rather flexible before trying to use it.  It's great for organic curves.


Now selected in white to the right of that is a selector that lets you set if you are dragging, rotating, or scaling stuff.  In your blender view it probably has more buttons then it does with me.  You know when you go into edit in SL and you can click that button in the edit window to select if you're moving or rotating or whatever?  If you're anything like me you likely prefer to use use the hotkeys to do that stuff and don't click.  If you are like that, go ahead and click that weird 3 bar colorful icon that looks like the only button I have.  That'll be handy for doing all those types of edits via hotkey, makes those annoying arrows vanish.  Purely a thing of preference however.
Now selected in '''white''' to the right of that is a selector that lets you set if you are dragging, rotating, or scaling stuff.  In your blender view it probably has more buttons then it does with me.  You know when you go into edit in SL and you can click that button in the edit window to select if you're moving or rotating or whatever?  If you're anything like me you likely prefer to use use the hot-keys to do that stuff and don't click.  If you are like that, go ahead and click that weird 3 bar colorful icon that looks like the only button I have.  That'll be handy for doing all those types of edits via hot-key, makes those annoying arrows vanish.  Purely a thing of preference however.


In Yellow to the right is a toolbar of various buttons, click it and it'll fill the panel below with all sorts of options.  If you middle-mouse-click-and-drag you can move that bar to the left and right at get are more options.  I'll be pointing you at stuff up there later.
In '''Yellow''' to the right is a toolbar of various buttons, click it and it'll fill the panel below with all sorts of options.  If you middle-mouse-click-and-drag you can move that bar to the left and right at get are more options.  I'll be pointing you at stuff up there later.


Now that little seafoam green box in the upper right?  If you click and drag that you can make additional windows, and set them to different workspaces.  THis will become VERY handy when setting up your textures in UV mode since this will let you multitask.  To get rid of a window.  Click the corner you dragged out to create it and drag it in the direction of the window you wish undone.
Now that little '''sea-foam green''' box in the upper right?  If you click and drag that you can make additional windows, and set them to different workspaces.  This will become VERY handy when setting up your textures in UV mode since this will let you multitask.  To get rid of a window.  Click the corner you dragged out to create it and drag it in the direction of the window you wish undone.


It's not visible in this screenshot, but if you hit tab and go into edit mode.  Three buttons will appear RIGHT next to the highlighted in white thing to the right of it.  They are only visible in edit mode and they select if you can highlight vertices, edges, or faces.
It's not visible in this screenshot, but if you hit tab and go into edit mode.  Three buttons will appear RIGHT next to the highlighted in white thing to the right of it.  They are only visible in edit mode and they select if you can highlight vertices, edges, or faces.
Line 61: Line 61:
===Hotkeys===
===Hotkeys===


I'll hit you now with a few basic hotkeys that are indespensible.
I'll hit you now with a few basic hotkeys that are indispensable.


'''CTRL+Z''' - This is undo.  This is your bestest friend in the world.  This lets you experiment.  Everytime you do something you don't like CTRL+Z.  Selecting something or unselecting it incidentally is considered an action that you can undo.  Great for intricately selecting a bunch of vertecies and then messing it up at the last moment, you can go back.
'''CTRL+Z''' - This is undo.  This is your bestest friend in the world.  This lets you experiment.  Everytime you do something you don't like CTRL+Z.  Selecting something or unselecting it incidentally is considered an action that you can undo.  Great for intricately selecting a bunch of vertecies and then messing it up at the last moment, you can go back.


'''Left Click''' - This will make your 3d cursor move.  All i know about the 3d cursor really is if you make something new, it will appear initially at your 3d cursor.  '''Shift+S''' will give you a menu option to recenter that bugger.
'''Left Click''' - This will make your 3d cursor move.  All I know about the 3d cursor is that new things appear at it when you make them.  '''Shift+S''' will give you a menu option to recenter that bugger.  Otherwise it just makes me feel like I've done something horribly wrong every time I accidentally left-click in blender.


'''Tab''' - Toggles between object and edit mode.... unless you used the button I mentioned earlier in the UI to go into sculpt mode.  In which case it'll toggle between sculpt and object mode until you go and manually select edit mode.  Thems the breaks.   
'''Tab''' - Toggles between object and edit mode.... unless you used the button I mentioned earlier in the UI to go into sculpt mode.  In which case it'll toggle between sculpt and object mode until you go and manually select edit mode.  Thems the breaks.   
Line 77: Line 77:
'''Alt+Right Click''' - Highlights multiple lines/vertices in a row.  Real handy for selecting a pile of things fast.
'''Alt+Right Click''' - Highlights multiple lines/vertices in a row.  Real handy for selecting a pile of things fast.


'''B''' - B is for BOX, it lets you lasso select everything in the box.  Lasso select only selects things the camera can see.  So if you are in edit mode, and you do it to a box, you'll only select half the box.  If you want to select the entire box at once, hit Z to go into wireframe mode and THEN lasso select.
'''B''' - B is for BOX, it lets you lasso select everything in the box.  Lasso select only selects things the camera can see.  So if you are in edit mode, and you do it to a box, you'll only select half the box.  If you want to select the entire box at once, hit Z to go into wire-frame mode and THEN lasso select.


'''Middle Mouse''' - Changes camera angle.  Holding shift while clicking middle mouse will move the whole view.
'''Middle Mouse''' - Changes camera angle.  Holding shift while clicking middle mouse will move the whole view.


'''Keypad 5''' - Orthographic view toggle.  Default view is linear perspective type stuff.  stuff far away looks smaller.  Great for seeing how it'll look when rendered in world, horrible for precision aligning stuff.  Most of the time you want to be working in Othrographic if yo uare doing precision modeling combo it up with the keys below...
'''Keypad 5''' - Orthographic view toggle.  Default view is linear perspective type stuff.  stuff far away looks smaller.  Great for seeing how it'll look when rendered in world, horrible for precision aligning stuff.  Most of the time you want to be working in Orthographic if you are doing precision modeling combo it up with the keys below...


'''Keypad 7''' - Top view, hold shift when pressing to look at the bottom.  Combo this with orthographic and possibly wireframe mode for some precision modelling.
'''Keypad 7''' - Top view, hold shift when pressing to look at the bottom.  Combo this with orthographic and possibly wire-frame mode for some precision modeling.


'''Keypad 1''' - Front view (I think), really, it's hard to tell what's truly front and side, but I'll call this view front.  Hold shift and click to see the back instead.
'''Keypad 1''' - Front view (I think), really, it's hard to tell what's truly front and side, but I'll call this view front.  Hold shift and click to see the back instead.
Line 91: Line 91:
The keypad is going to be your bestest friend in blender, it's going to let you control your angle precisely.
The keypad is going to be your bestest friend in blender, it's going to let you control your angle precisely.


'''Z''' - Wireframe view.  You'll need this a lot when seeing how stuff aligns up, or selecting things that are behind other things.  Unfortunately there's no fancy mnemonic to remember this one.
'''Z''' - Wire-frame view.  You'll need this a lot when seeing how stuff aligns up, or selecting things that are behind other things.  Unfortunately there's no fancy mnemonic to remember this one.


'''G''' - G is for GRAB, right click something, hit g, and then move the mouse until you get a position you like and then hit enter or left click.  If you hit ESC you cancel this translation.  You can press  the '''x''', '''y''' or '''z''' key in this mode to lock the movement to a single axis.  If you use orthographic projection and the above keypad keys to set the view at a specific angle, then you can be 100% sure you're only moving something along say... the left/right and forward/back axis.  If you hit G, then Z and then type in a number.  It will shift the selection that many meters in that direction.  And yes, that's SL meters.  Everything translates to SL meters, even that grid.
'''G''' - G is for GRAB, right click something, hit g, and then move the mouse until you get a position you like and then hit enter or left click.  If you hit ESC you cancel this translation.  You can press  the '''x''', '''y''' or '''z''' key in this mode to lock the movement to a single axis.  If you use orthographic projection and the above keypad keys to set the view at a specific angle, then you can be 100% sure you're only moving something along say... the left/right and forward/back axis.  If you hit G, then Z and then type in a number.  It will shift the selection that many meters in that direction.  And yes, that's SL meters.  Everything translates to SL meters, even that grid.


'''R''' - R is for ROTATATE, right click something, hit R, and then use that mouse to spin it right rought right baby like a record baby round round.... as with above, escape cancels.  Enter or left clicking sets it in stone.  As with above, clever camera placement with the keypad keys can easily control which way yo uare rotating stuff.  And yes, you can type in an angle after pressing R instead of moving the mouse.  So R 90 ENTER, will rotate something 90 degrees with respect to whichever way the camera's facing it.
'''R''' - R is for ROTATATE, right click something, hit R, and then use that mouse to spin it right rought right baby like a record baby round round.... as with above, escape cancels.  Enter or left clicking sets it in stone.  As with above, clever camera placement with the keypad keys can easily control which way you are rotating stuff.  And yes, you can type in an angle after pressing R instead of moving the mouse.  So R 90 ENTER, will rotate something 90 degrees with respect to whichever way the camera's facing it.


'''S''' - S is for SCALE.  Right click something, hit S and move the mouse to watch it grow or shrink.  Unlike the above translations, scale will happen in all directions, regardless of which way the camera is facing it.  Press '''x''', '''y''', or '''z''' to force it to expand along a single axis only.
'''S''' - S is for SCALE.  Right click something, hit S and move the mouse to watch it grow or shrink.  Unlike the above translations, scale will happen in all directions, regardless of which way the camera is facing it.  Press '''x''', '''y''', or '''z''' to force it to expand along a single axis only.
Line 105: Line 105:
'''Shift+D''' - Duplicates.  It works in object mode and edit mode.  In object mode it will make a new mesh exactly like the one you highlighted.  In edit mode, it replicates whatever elements you selected.  You'll have the option of dragging your duplicated stuff to a new home before planting it.  Word of Warning:  If you hit escape, like extrude, it won't cancel this.  You'll end up with the duplicate exactly on top of the original.  Use CTRL+Z to undo this sort of operation.
'''Shift+D''' - Duplicates.  It works in object mode and edit mode.  In object mode it will make a new mesh exactly like the one you highlighted.  In edit mode, it replicates whatever elements you selected.  You'll have the option of dragging your duplicated stuff to a new home before planting it.  Word of Warning:  If you hit escape, like extrude, it won't cancel this.  You'll end up with the duplicate exactly on top of the original.  Use CTRL+Z to undo this sort of operation.


'''W''' - I like to think of this as WELD but it isn't just limited to that.  It a whole list of useful options.  If you select 2 or more vertecies and select merge you can collapse them upon each other, great way to clean up your mesh and remove faces.  Bevel throws a bevel on whatever edges you have selected.  Remove duplicates lets you clean up vertices that are exactly on top of each other (only works on hilighted selection).
'''W''' - I like to think of this as WELD but it isn't just limited to that.  It a whole list of useful options.  If you select 2 or more vertices and select merge you can collapse them upon each other, great way to clean up your mesh and remove faces.  Bevel throws a bevel on whatever edges you have selected.  Remove duplicates lets you clean up vertices that are exactly on top of each other (only works on highlighted selection).


'''N''' - Brings up a toolbox with a lot of useful settings.  The most useful of them is a section for selecting a background image.  If you play with that and set one it will only be visible if you are in one of the keypad 1 3 or 7 views.  This allows you to build off of a blueprint while in orthagonal editing.
'''N''' - Brings up a toolbox with a lot of useful settings.  The most useful of them is a section for selecting a background image.  If you play with that and set one it will only be visible if you are in one of the keypad 1 3 or 7 views.  This allows you to build off of a blueprint while in orthagonal editing.
Line 111: Line 111:
'''K''' - K is for knife which lets you cut things, make them bleed, make them hurt, also lets you get more points to move and distort your mesh.  When you hit K the cursor will turn into a knife.  It'll snap towards any vertices you put it near.  If you hold CTRL while clicking it'll only cut on the center points and endpoints of lines, great for more precision work.  After you've made all the cuts you want, hit enter to set them in stone.  Hit ESC at any time to cancel.
'''K''' - K is for knife which lets you cut things, make them bleed, make them hurt, also lets you get more points to move and distort your mesh.  When you hit K the cursor will turn into a knife.  It'll snap towards any vertices you put it near.  If you hold CTRL while clicking it'll only cut on the center points and endpoints of lines, great for more precision work.  After you've made all the cuts you want, hit enter to set them in stone.  Hit ESC at any time to cancel.


'''CTRL+R''' - CTRL+R is for RING CUT!  This is mostly handy on things like a cylinder.  Ring cut doesn't like cones too much.  Hit the key combo and you'll see a pink ring around the object in question.  Use the mouse wheel to set how many rings you want.  Click and you'll get the option to set how far up and down the object you want to drop your slices.  Once you click again or hit enter you'll have a bunch more slices in your object to work with.  I like to take a long cylinder.  Slice some rings in it, and then indivudually select them and use the scale tool to shrink them down individually.  This let's me carve a cylinder up like a lathe.  I've made a real high quality baseball bat like this.
'''CTRL+R''' - CTRL+R is for RING CUT!  This is mostly handy on things like a cylinder.  Ring cut doesn't like cones too much.  Hit the key combo and you'll see a pink ring around the object in question.  Use the mouse wheel to set how many rings you want.  Click and you'll get the option to set how far up and down the object you want to drop your slices.  Once you click again or hit enter you'll have a bunch more slices in your object to work with.  I like to take a long cylinder.  Slice some rings in it, and then individually select them and use the scale tool to shrink them down individually.  This let's me carve a cylinder up like a lathe.  I've made a real high quality baseball bat like this.
 
'''F''' - New Face.  Select a series of lines and hit this to fill the gap with a face.  The selection of lines need not make a perfectly enclosed shape.  For example if you selected two paralel lines and hit F you would get an instant rectangle.  The additional lines are drawn in as the face is made.  This is very powerful and handy once you get the hang of it.
 
'''Ctrl+J''' - Join.  In object mode you can select multiple objects and make them a single unit.
 
'''P''' - Part.  Select a set of faces or verticies or lines, hit this button, and yo ucan break it off from your current object and make a new object with them.  Useful if you make a large object and break it into sub pieces, like making your mech as a single unit.
 
==Texturizing Your stuff==
 
Now, here's where I cover all you'll need to get started on texturing stuff.  Now, you can have up to 8 textures on a mesh object.  The way the textures are aligned is based on something called a UV map.  Ideally if you want your stuff easy to edit in SL you want it to align up nicely with a square texture.
 
For a basic demonstration on how UV mapping works.  Take that cube that's there when blender boots up.  Go into edit mode.  Select a face, any face.  Now on the left hand toolbox of options look for something labeled "unwrap".  Click it, a menu will pop up.  That menu is filled with various ways to unwrap something  Select "unwrap" for now.  That'll try to unwrap whatever's selected in a fashion that fills up most of the UV map.
 
Now, nothing visible happened.  So to see what we did precisely click that corner of the window we had highlighted in sea-foam green and drag it to the left.
 
We should now have two windows open now that look exactly the same.  In the lower left hand corner of any of those two (I prefer the right window for this but either way works) click what I had highlighted in purple.  Fifth option up should be "UV/Image editor".  You should now see the face you have selected filling that grid up perfectly. 
 
Unwrapping a single square works nice.  If you try to unwrap a whole bunch of thins at once, strangeness an happen if you don't tell blender where to make the cuts.  If you were to select everything with the A key and then unwrap that, you'd get a whole mess of unreadable in the UV window as blender goes OMGWTFBBQ and just fudges it.... horribly. 
 
To fix that try to imagine the cube as a folded paper box.  Imagine where all the seams are.  Highlight all those lines, and click the "Mark Seam" button beneath the unwrap button.  The seams should now look like angry red cuts upon an emo kids arm.  Highlight everything with the seams marked and THEN try slicing it.  If you did it right you should have a bunch of boxes in a neat little array in your UV Window.
 
If you were to slap a texture on it in second life.  That's how the texture would end up on the box.  Might be hard to set up the faces then. If you click the word "UVS" in the lower section of your UV menu and select "Export UV Layout" you could save that as a PNG image that you could color in and apply to your object in second life.
 
With more complicated meshes that require a map, that's generally a good idea to do.  However.  This cube is 6 faces.  We can have up to 8 faces.  So, to make this far more easy to edit let's unwrap this in a different fashion.
 
Select a face, and unwrap just that face like we did initially.  Do it for all 6 sides of the cube.  Now, if you were to import this to SL and slap a square texture on it.  That texture would appear on the cube perfectly aligned on all faces, but it would be the same texture.  So, let's tell SL what face we want assigned to what.  To do that we assign materials.
 
In that yellow highlighted two-bar you'll have to middle-mouse drag it to see it, but two buttons to the right from the wrench is a circle icon right next to a checker board.  Click the circle.
 
You'll get the material editor.  You may or may not have one default material set.  To add a material click the + sign to the right-top of the pane.  That will create and select a blank material slot.  Now click "New".  And you'll get a material with a boring name.  You can rename it by clicking it's name where the "New" button used to be and typing in something else.
 
Under diffuse you can click that to assign it a color.  This color imports to SL and can be re tinted like any prim.  This is a handy away to visually see what you got assigned.  There are a few more fiddly options that may or may not import to SL, I wouldn't worry about them too much at this point.
 
So to assign a material, select it in the list of materials.  Have the face you want it assigned to selected and click the "Assign" button.  Make 6 materials.  Give them all unique colors.  Rename them if you want (material names are purely for your convenience at this point).  Assign one to each face. 
 
Now, if you export this cube to SL it will have the ability to slap a seperate texture on each face.
 
To make your meshes as edit-friendly as possible always stretch and distort your UV maps to fit that square as best you can.  That way someone can slap a regualar old SL square texutre on it and it'll fit in.  You can edit and distort the verticies in UV mode just like yo ucan in 3d mode, except it's all 2D.  However G R and S all work, and the W key brings up some handy options like aligning all the points on a single axis.
 
When you get more intricate shapes which are unwrapping just right.  Try the "Project from View" option from the menu.  It will take whatever you see highlighted in your camera, and slap exactly that view in your UV map.  Real handy.
 
For more intricate builds for MCM it's a good idea to make a new object every time you use up 8 texture faces.  You want your meshes as easy to edit as possible ;)
 
==Exporting for SL==
 
Now to use your meshwork in SL what you gotta do is convert your work to a *.dae file.  In the file menu look for export.  Select Collada, and save your work.  Now SL can create a mesh with only *.dae. File but it can use up to 5 files to hone in on the specifics of your mesh.  Here's what you can submit.
 
'''Base Mesh:''' This is the file you supplied when you told SL you were uploading a mesh.<br>
'''LODs:'''  In the first window that opens there's several Level of Details High, Medium, Low, Lowest.  High and medium are generally visible with some detail.  By the time low and lowest come up the object is so far off in the camera it's just a few pixels.  SL tries to autocalculate these levels of detail.  But you can make low resolution models and supply them here.  General rule of thumb is reduce your load by one half to a quarter for each level, though you can go higher if you don't mind sacrificing prim-count for clarity.<br>
'''Physics:''' For physics to work properly on upload you'll have to use default viewer.  Viewers like firestorm fudge well enough for most purposes.  You can actually build a model that represents how it interacts on a physics level and supply that here.
 
Click to upload a mesh in SL, I'm sure you're familiar with uploading by now.  You'll get a dialog (you may have to do a copyright quiz before Sl lets you upload mesh).  The first tab is the levels of detail.  Either use what's given to you or supply your own models.  Next tab is physics.  If you are not using the default viewer, this is kinda broken and will be fudged.  If you are using default viewer you can either select any level of detail from the previous page to act as your physics, or supply a seperate physics model.  You'll have to analyze it via solid, surface, or wrap.  Wrap is damn the torpedos full speed ahead I need the physics on this perfect.  Solid is good for blocky angular things.  Surface is good for smooth organic shapes.  Toy with all 3 until you get a physics shape displayed that looks like what you are working with.  Then under simplify, detail and better detail will tend to turn your work into a convex hull, a non-hollow thing.  If you use Retain % you can get the original shape with all the fiddly detail perfectly, this can cost you on the prim count though.  If I'm building for an attachment or something I don't care how avatars stand on it I just supply a block shaped mesh.
 
Now for the prim count.  Along the bottom you'll see Physics, Download weight, and server.  The highest of those three will be the prim cost of your mesh.  Server is always .5, that's the smallest you can make a mesh.  It will cost 1 prim when you rez it, but if you link it to another .5 mesh it'll become 1 prim combined.  Physics goes up based on how intricate you made the physics tab calculations.  Download weight is based on how many verticies your model was on all LOD levels.  A good way to reduce the download is take lowest and make it REAL low, like 1-3 triangles.  At the levels lowest shows it's going to be a couple pixels of color so you don't need much detail there for most applications, it's a quick and easy way to trim your model down.
 
Once you got all that set there's the last tab where you can set the scale of your model in case it's too big or small, but then again you can always re-scale it inside SL.

Latest revision as of 23:31, 23 May 2014

Hello and welcome to Bellimora's little guide of mesh creation for SL and possibly even MCM. I created this guide because a few people I know are showing interest in blender, so I'm going to infodump all my secrets and tricks and randomness here, with PICTURES! So, dig in and have fun!

Mesh Basics

Now before we go digging into making a mesh for SL I'd like to go over the limitations and abilities of mesh here and compare it to sculps. Let's take a look!

A mesh has the following limitations:

  • A mesh may have up to 8 textureable faces divided and arranged however the mesh creator sees fit.
  • Unlike a sculp a mesh may have as little or as many polygons as the author pleases.
  • Mesh vertex placement has floating point precision, that is its coordinates can have decimal values.
  • Mesh has a prim equivalence rating, how many prims it takes up.
  • Prim equivalence is the higher of the following two measurements of a mesh: Physics, and download weight.
  • Having a lot of polygons gives a mesh a heavy download weight.
  • Forcing a mesh to very accurately emulate an intricate shape for people standing on it and objects colliding with it will make it have a heavy physics rating.
  • If physics and download are below .5 then the mesh will be .5
  • If two .5 meshes are linked together into a single object in SL, the objects prim count will be 1.
  • If you want your mesh to have a minimized prim count, keep the physics emulation as simple as you can get away with, keep the amount of polygons used as low as possible
  • Unlike Sculps you can manually set each level of detail LOD of the mesh. This allows you to set how the mesh simplifies itself as the camera zooms away from it.
  • If you manually set the LODS and give them a lot of polygons it will REALLY increase the prim count of the mesh AND it will be a resource strain on any viewr looking at it.
  • Unlike sculps you can manually set the physics for your mesh by uploading a model i the same general shape you want to use for physics detection.
  • Be aware that SL will stretch whatever you upload to fit the dimensions of the mesh, this might make weird shit happen.
  • People with older viewers will see mesh as various prim shapes instead. Such people are a minority currently.

Sculps:

  • Sculps are always one prim.
  • Sculps use integer for vertex placement perfectly flat smooth surfaces and curves get tricky, some lumpiness is inherent
  • Sculps have a single texture face
  • Multiple sculp maps can be cycled on a single sculp to animate one far more easily then you could with mesh.
  • Sculps are compatible with lower version viewers.
  • Physics on a sculp is a sphere, at times it can be a bit derpy. Best you can manage is stuffing a prim inside a sculp to match the physics you want.
  • Level of Details on a sculp are automatically calculated by SL, at range intricate objects tend to collapse in unpleasent ways.

In short, when using mesh if you want your prim count low, keep your polycount low and keep the physics simplified (in fact I make a box-shaped mesh and upload that for the physics on stuff I don't care how hit-detection is factored if the physics comes up high naturally).

Blender Basics

Here it is, the blender view screen

Window Layout

Now before you make and upload mesh, you need to figure out how to use the program. To the right side of this section, there's a picture of blender's main view screen. I've highlighted some areas with color. If you click the image you can get a larger view.

In red in the upper left hand corner is the menu bar. The little minus sign in a circle if pressed will make it vanish. press it again to make it appear again. I once made that vanish accidentally and worried myself some. Figured I'd mention it now in case you accidentally do it too.

In Blue to your left is the tool box. Press T to toggle that on and off.

Below that in purple is a button that if you press that it'll open up a list of work-space types. You'll need to use that when texture-mapping. It has a pile of different workspaces i don't even know what they do. If you're a power use you might want to play with some of those later.

To the bottom of the window highlighted in black is the mode selector. The three biggie modes you want to be aware of are sculpt mode, edit mode, and object mode. Object mode lets you select move and resize individual meshes in your blender work project. Yes, you can make multiple meshes at once and upload them all as a single linked object that you can dissect later. Edit mode lets you get in there and hand-edit vertices, delete them, split them, all that nitty gritty precision stuff. Sculpt Mode Lets you make broad changes with a variety of sculpting tools. Sculpting does not add vertices or any other points that can bend, so you better pre-prepare a surface to be rather flexible before trying to use it. It's great for organic curves.

Now selected in white to the right of that is a selector that lets you set if you are dragging, rotating, or scaling stuff. In your blender view it probably has more buttons then it does with me. You know when you go into edit in SL and you can click that button in the edit window to select if you're moving or rotating or whatever? If you're anything like me you likely prefer to use use the hot-keys to do that stuff and don't click. If you are like that, go ahead and click that weird 3 bar colorful icon that looks like the only button I have. That'll be handy for doing all those types of edits via hot-key, makes those annoying arrows vanish. Purely a thing of preference however.

In Yellow to the right is a toolbar of various buttons, click it and it'll fill the panel below with all sorts of options. If you middle-mouse-click-and-drag you can move that bar to the left and right at get are more options. I'll be pointing you at stuff up there later.

Now that little sea-foam green box in the upper right? If you click and drag that you can make additional windows, and set them to different workspaces. This will become VERY handy when setting up your textures in UV mode since this will let you multitask. To get rid of a window. Click the corner you dragged out to create it and drag it in the direction of the window you wish undone.

It's not visible in this screenshot, but if you hit tab and go into edit mode. Three buttons will appear RIGHT next to the highlighted in white thing to the right of it. They are only visible in edit mode and they select if you can highlight vertices, edges, or faces.

Hotkeys

I'll hit you now with a few basic hotkeys that are indispensable.

CTRL+Z - This is undo. This is your bestest friend in the world. This lets you experiment. Everytime you do something you don't like CTRL+Z. Selecting something or unselecting it incidentally is considered an action that you can undo. Great for intricately selecting a bunch of vertecies and then messing it up at the last moment, you can go back.

Left Click - This will make your 3d cursor move. All I know about the 3d cursor is that new things appear at it when you make them. Shift+S will give you a menu option to recenter that bugger. Otherwise it just makes me feel like I've done something horribly wrong every time I accidentally left-click in blender.

Tab - Toggles between object and edit mode.... unless you used the button I mentioned earlier in the UI to go into sculpt mode. In which case it'll toggle between sculpt and object mode until you go and manually select edit mode. Thems the breaks.

X - This will delete stuff. You'll likely get a menu of delete options if you are in edit mode. The Dissolve entry is particularly handy. It makes the highlighted thingy vanish by merging the stuff on either side of it together. Great for making lines vanish without making faces vanish.

Right Click - Highlights stuff. Blender's weird you'll be right clicking far more then left clicking.

Shift+Right Click - Let's you highlight more then one thing.

Alt+Right Click - Highlights multiple lines/vertices in a row. Real handy for selecting a pile of things fast.

B - B is for BOX, it lets you lasso select everything in the box. Lasso select only selects things the camera can see. So if you are in edit mode, and you do it to a box, you'll only select half the box. If you want to select the entire box at once, hit Z to go into wire-frame mode and THEN lasso select.

Middle Mouse - Changes camera angle. Holding shift while clicking middle mouse will move the whole view.

Keypad 5 - Orthographic view toggle. Default view is linear perspective type stuff. stuff far away looks smaller. Great for seeing how it'll look when rendered in world, horrible for precision aligning stuff. Most of the time you want to be working in Orthographic if you are doing precision modeling combo it up with the keys below...

Keypad 7 - Top view, hold shift when pressing to look at the bottom. Combo this with orthographic and possibly wire-frame mode for some precision modeling.

Keypad 1 - Front view (I think), really, it's hard to tell what's truly front and side, but I'll call this view front. Hold shift and click to see the back instead.

Keypad 3 - Side view (I think), hit shift and click this to see the OTHER side, seeing a pattern here?

The keypad is going to be your bestest friend in blender, it's going to let you control your angle precisely.

Z - Wire-frame view. You'll need this a lot when seeing how stuff aligns up, or selecting things that are behind other things. Unfortunately there's no fancy mnemonic to remember this one.

G - G is for GRAB, right click something, hit g, and then move the mouse until you get a position you like and then hit enter or left click. If you hit ESC you cancel this translation. You can press the x, y or z key in this mode to lock the movement to a single axis. If you use orthographic projection and the above keypad keys to set the view at a specific angle, then you can be 100% sure you're only moving something along say... the left/right and forward/back axis. If you hit G, then Z and then type in a number. It will shift the selection that many meters in that direction. And yes, that's SL meters. Everything translates to SL meters, even that grid.

R - R is for ROTATATE, right click something, hit R, and then use that mouse to spin it right rought right baby like a record baby round round.... as with above, escape cancels. Enter or left clicking sets it in stone. As with above, clever camera placement with the keypad keys can easily control which way you are rotating stuff. And yes, you can type in an angle after pressing R instead of moving the mouse. So R 90 ENTER, will rotate something 90 degrees with respect to whichever way the camera's facing it.

S - S is for SCALE. Right click something, hit S and move the mouse to watch it grow or shrink. Unlike the above translations, scale will happen in all directions, regardless of which way the camera is facing it. Press x, y, or z to force it to expand along a single axis only.

Shift+A - Add a new shape. If you are in edit mode, this shape will become part of whatever mesh yo uare working on. If you are in object mode, this shape will become it's own mesh, allowing you to upload to SL a multi-part-linked-mesh. Generally speaking you want the stuff under the "Mesh" menu. Curves can be handy for bending shapes or building a strange shape and extruding it, but that's something for another tutorial.

E - Lets you extrude. Highlight a face, like one of the sides of that box that blender opens up with (make sure you're in edit mode to select an individual part of an object). Once you got the face selected, hit E and drag the mouse out to watch the awesome unfold. You can even hit E and specify a distance in meters you want it to stretch out. So typing e .25 will stretch out a quarter meter of material. Word of warning: if you hit escape it will LOOK like the extrude canceled, but you'll still have a series of duplicated lines exactly stacked on top of each other. Always use CTRL+Z to undo an extrude, escape does NOT work.

Shift+D - Duplicates. It works in object mode and edit mode. In object mode it will make a new mesh exactly like the one you highlighted. In edit mode, it replicates whatever elements you selected. You'll have the option of dragging your duplicated stuff to a new home before planting it. Word of Warning: If you hit escape, like extrude, it won't cancel this. You'll end up with the duplicate exactly on top of the original. Use CTRL+Z to undo this sort of operation.

W - I like to think of this as WELD but it isn't just limited to that. It a whole list of useful options. If you select 2 or more vertices and select merge you can collapse them upon each other, great way to clean up your mesh and remove faces. Bevel throws a bevel on whatever edges you have selected. Remove duplicates lets you clean up vertices that are exactly on top of each other (only works on highlighted selection).

N - Brings up a toolbox with a lot of useful settings. The most useful of them is a section for selecting a background image. If you play with that and set one it will only be visible if you are in one of the keypad 1 3 or 7 views. This allows you to build off of a blueprint while in orthagonal editing.

K - K is for knife which lets you cut things, make them bleed, make them hurt, also lets you get more points to move and distort your mesh. When you hit K the cursor will turn into a knife. It'll snap towards any vertices you put it near. If you hold CTRL while clicking it'll only cut on the center points and endpoints of lines, great for more precision work. After you've made all the cuts you want, hit enter to set them in stone. Hit ESC at any time to cancel.

CTRL+R - CTRL+R is for RING CUT! This is mostly handy on things like a cylinder. Ring cut doesn't like cones too much. Hit the key combo and you'll see a pink ring around the object in question. Use the mouse wheel to set how many rings you want. Click and you'll get the option to set how far up and down the object you want to drop your slices. Once you click again or hit enter you'll have a bunch more slices in your object to work with. I like to take a long cylinder. Slice some rings in it, and then individually select them and use the scale tool to shrink them down individually. This let's me carve a cylinder up like a lathe. I've made a real high quality baseball bat like this.

F - New Face. Select a series of lines and hit this to fill the gap with a face. The selection of lines need not make a perfectly enclosed shape. For example if you selected two paralel lines and hit F you would get an instant rectangle. The additional lines are drawn in as the face is made. This is very powerful and handy once you get the hang of it.

Ctrl+J - Join. In object mode you can select multiple objects and make them a single unit.

P - Part. Select a set of faces or verticies or lines, hit this button, and yo ucan break it off from your current object and make a new object with them. Useful if you make a large object and break it into sub pieces, like making your mech as a single unit.

Texturizing Your stuff

Now, here's where I cover all you'll need to get started on texturing stuff. Now, you can have up to 8 textures on a mesh object. The way the textures are aligned is based on something called a UV map. Ideally if you want your stuff easy to edit in SL you want it to align up nicely with a square texture.

For a basic demonstration on how UV mapping works. Take that cube that's there when blender boots up. Go into edit mode. Select a face, any face. Now on the left hand toolbox of options look for something labeled "unwrap". Click it, a menu will pop up. That menu is filled with various ways to unwrap something Select "unwrap" for now. That'll try to unwrap whatever's selected in a fashion that fills up most of the UV map.

Now, nothing visible happened. So to see what we did precisely click that corner of the window we had highlighted in sea-foam green and drag it to the left.

We should now have two windows open now that look exactly the same. In the lower left hand corner of any of those two (I prefer the right window for this but either way works) click what I had highlighted in purple. Fifth option up should be "UV/Image editor". You should now see the face you have selected filling that grid up perfectly.

Unwrapping a single square works nice. If you try to unwrap a whole bunch of thins at once, strangeness an happen if you don't tell blender where to make the cuts. If you were to select everything with the A key and then unwrap that, you'd get a whole mess of unreadable in the UV window as blender goes OMGWTFBBQ and just fudges it.... horribly.

To fix that try to imagine the cube as a folded paper box. Imagine where all the seams are. Highlight all those lines, and click the "Mark Seam" button beneath the unwrap button. The seams should now look like angry red cuts upon an emo kids arm. Highlight everything with the seams marked and THEN try slicing it. If you did it right you should have a bunch of boxes in a neat little array in your UV Window.

If you were to slap a texture on it in second life. That's how the texture would end up on the box. Might be hard to set up the faces then. If you click the word "UVS" in the lower section of your UV menu and select "Export UV Layout" you could save that as a PNG image that you could color in and apply to your object in second life.

With more complicated meshes that require a map, that's generally a good idea to do. However. This cube is 6 faces. We can have up to 8 faces. So, to make this far more easy to edit let's unwrap this in a different fashion.

Select a face, and unwrap just that face like we did initially. Do it for all 6 sides of the cube. Now, if you were to import this to SL and slap a square texture on it. That texture would appear on the cube perfectly aligned on all faces, but it would be the same texture. So, let's tell SL what face we want assigned to what. To do that we assign materials.

In that yellow highlighted two-bar you'll have to middle-mouse drag it to see it, but two buttons to the right from the wrench is a circle icon right next to a checker board. Click the circle.

You'll get the material editor. You may or may not have one default material set. To add a material click the + sign to the right-top of the pane. That will create and select a blank material slot. Now click "New". And you'll get a material with a boring name. You can rename it by clicking it's name where the "New" button used to be and typing in something else.

Under diffuse you can click that to assign it a color. This color imports to SL and can be re tinted like any prim. This is a handy away to visually see what you got assigned. There are a few more fiddly options that may or may not import to SL, I wouldn't worry about them too much at this point.

So to assign a material, select it in the list of materials. Have the face you want it assigned to selected and click the "Assign" button. Make 6 materials. Give them all unique colors. Rename them if you want (material names are purely for your convenience at this point). Assign one to each face.

Now, if you export this cube to SL it will have the ability to slap a seperate texture on each face.

To make your meshes as edit-friendly as possible always stretch and distort your UV maps to fit that square as best you can. That way someone can slap a regualar old SL square texutre on it and it'll fit in. You can edit and distort the verticies in UV mode just like yo ucan in 3d mode, except it's all 2D. However G R and S all work, and the W key brings up some handy options like aligning all the points on a single axis.

When you get more intricate shapes which are unwrapping just right. Try the "Project from View" option from the menu. It will take whatever you see highlighted in your camera, and slap exactly that view in your UV map. Real handy.

For more intricate builds for MCM it's a good idea to make a new object every time you use up 8 texture faces. You want your meshes as easy to edit as possible ;)

Exporting for SL

Now to use your meshwork in SL what you gotta do is convert your work to a *.dae file. In the file menu look for export. Select Collada, and save your work. Now SL can create a mesh with only *.dae. File but it can use up to 5 files to hone in on the specifics of your mesh. Here's what you can submit.

Base Mesh: This is the file you supplied when you told SL you were uploading a mesh.
LODs: In the first window that opens there's several Level of Details High, Medium, Low, Lowest. High and medium are generally visible with some detail. By the time low and lowest come up the object is so far off in the camera it's just a few pixels. SL tries to autocalculate these levels of detail. But you can make low resolution models and supply them here. General rule of thumb is reduce your load by one half to a quarter for each level, though you can go higher if you don't mind sacrificing prim-count for clarity.
Physics: For physics to work properly on upload you'll have to use default viewer. Viewers like firestorm fudge well enough for most purposes. You can actually build a model that represents how it interacts on a physics level and supply that here.

Click to upload a mesh in SL, I'm sure you're familiar with uploading by now. You'll get a dialog (you may have to do a copyright quiz before Sl lets you upload mesh). The first tab is the levels of detail. Either use what's given to you or supply your own models. Next tab is physics. If you are not using the default viewer, this is kinda broken and will be fudged. If you are using default viewer you can either select any level of detail from the previous page to act as your physics, or supply a seperate physics model. You'll have to analyze it via solid, surface, or wrap. Wrap is damn the torpedos full speed ahead I need the physics on this perfect. Solid is good for blocky angular things. Surface is good for smooth organic shapes. Toy with all 3 until you get a physics shape displayed that looks like what you are working with. Then under simplify, detail and better detail will tend to turn your work into a convex hull, a non-hollow thing. If you use Retain % you can get the original shape with all the fiddly detail perfectly, this can cost you on the prim count though. If I'm building for an attachment or something I don't care how avatars stand on it I just supply a block shaped mesh.

Now for the prim count. Along the bottom you'll see Physics, Download weight, and server. The highest of those three will be the prim cost of your mesh. Server is always .5, that's the smallest you can make a mesh. It will cost 1 prim when you rez it, but if you link it to another .5 mesh it'll become 1 prim combined. Physics goes up based on how intricate you made the physics tab calculations. Download weight is based on how many verticies your model was on all LOD levels. A good way to reduce the download is take lowest and make it REAL low, like 1-3 triangles. At the levels lowest shows it's going to be a couple pixels of color so you don't need much detail there for most applications, it's a quick and easy way to trim your model down.

Once you got all that set there's the last tab where you can set the scale of your model in case it's too big or small, but then again you can always re-scale it inside SL.