Wednesday, November 28, 2012

Cupcake Scene [ 3D frosting tutorial ] [ cycles ]

This is my first render of the cupcakes - can you see all 5?


Cupcake Modeling
Here I am making a scene with cute & precious cupcakes. The kind I don't really like because they're soooooo flippin sweet. I also modeled the sprinkles, spoon, and 2 plates.

The most difficult part was modeling the helix-like frosting top. I ended up starting with a 12-sided cylinder (triangulated caps) this makes a 6-pointed ribbon,  pushed in every other edge, thew on a "subsurface" modifier, then a "simple deform" modifier set to "twist". I then went into edit mode and manually tapered the ends by turning on proportional editing (O-key) selecting the top-most vertex, scaling (S-key) with the fall-off radius adjusted rather large (MMW while in scale mode).Then I created a bezier circle and applied it to a "curve" modifier, so that the frosting laid in a sort of loop. Then a tweaked the curve in edit mode, until it looked alright. Finally I applied all modifiers but the "subdivision surface" one, then eliminated the clipping and adjusted the shape by manually tweaking in edit mode.

The shorter softer twisted tops were easier. I just created a shorter 6-side ribbon, applied a "subsurface" modifier, tapered by scaling the top vertex with proportional editing turned on, went into edit mode from the top view, then rotated the top vertex with proportional editing turned on. I then used smooth a couple times to get it round and soft (W-key menu), and scaled/ shaped to my liking.

If you want a more in-depth  video or image tutorial let me know, and I'll be happy to create a 3D frosting tutorial.

Learning Cycles
I'm also learning how to render in Blender cycles. It's amazingly elegant and simple to use - I've fallen in love. I'm not so much in love with waiting for a noiseless render to pass, but I'm infatuated with the endless potential, and thinking of future possibilities.

Saturday, November 17, 2012

My Hotkeys

Edit: There is a problem with importing hotkeys or custom key configurations in Blender 2.64+ apparently. These work nicely with Blender 2.63. These are my custom shortcuts/ hotkeys. Cut and paste into a text file, then name it something like "hotkeys.py":
http://freetexthost.com/mlpv05oz6s

Mouse only navigation (no using shift)
Tablet compatibility in Texture Paint mode (use alt to navigate)
Q: vertex / edge / face mode
NUM9 : use occlude geometry in edit mode
SHIFT + W: weld in UV mode
and much much more...

Sunday, August 19, 2012

Beginner Tutorial Series

So I'm starting a video tutorial series, for beginners. I hope they'll help out others in the same way free knowledge from the internet has helped me! If you've never used Blender, or you've never 3D modeled before, then what are you waiting for - Blender is free!

Download it, and lets get started modeling in Blender!


Friday, August 17, 2012

P3D for Viewing 3D Models

So recently I ran into this awesome online 3D model viewer called P3D. With their service, you can upload a model of your creation, and let others manipulate it through a web browser! No, it's not FLASH, no it's not a plugin - it's just pure BROWSER! WOWZERS! To top it all off, the P3D.in service is completely free!

Click and drag over the model!


So far, I've experienced NO hiccups with this app. I only suggest leaving the "Toggle Subdivide Surface" button alone for models with high polys like Minitaur (created in Sculptris - yet another FREE masterpiece worth downloading and playing with). He has 152,262 faces so I implore you NOT to press it.

The program supports Diffuse, Normal, and Specular maps too! You can toggle between different shaders by using the buttons on the left. Minitaur has no maps on him, but you can view his wireframe-shader, and see his outrageous underlying Sculptris geometry.

Have fun uploading your models, and if you do, post a preview here to share!

My Game: a work in progress

So, I started making a game with blender and Unity some time ago, but have put the project on the shelf for a bit, so that I can learn Maya and extend my skills in modeling.

If you want to know how I did anything in this game preview, feel free to leave a comment, and I will answer questions.

Friday, February 3, 2012

My Notes

Here are my notes on Blender so far. I write them as I go along, I won't dress them up. This is just how I wrote them.



SHORTCUTS

link objects (materials) : CTRL+L
snap camera to viewport : CTRL+ALT+ 
 NUM PAD 0
loop select : CTRL+R-CLICK
repeat action : SHIFT+R
transformation lock plane / axis : SHIFT+XYZ / XYZ

soft select ( proportional editing ) : Edit mode > O > MMB scroll for size
reflect geometry : set 3D cursor to center > pivot point 3D cursor > select object > S > choose axis > -1 >ENTER

align vertices to axis : select vertices > S > choose axis > NUM PAD 0 > ENTER
translate (grab) / rotate / scale : G / R / S
extrude individual: ALT+E

toggle edit / object mode : TAB
center cursor : SHIFT+C
set camera focus to object : Select object > NUM PAD DELETE
bezier curve to mesh : ALT+C
smart fill faces : ALT+F
beautify faces : SHIFT+ALT+F
inverse kinematics (select target then tip) : SHIFT+I
remove triangles : ALT+J
combine : CTRL+J
knife cut : K or SHIFT+K
select linked faces : L
move to layer : M
separate : P
clear bone parent : ALT+P
remove parent-child relationship : ALT+P
parent bone (select child then parent) : CTRL+P
loop cut : CTRL+R (scroll to add subD)
snap menu : SHIFT+S
align vertices to an axis : S > Axis > 0
merge : W
rename bones:  W
propagate to all shape keys: W
select more / less : CTRL+NUM(+/-)
hide / unhide : H / ALT+H
render portion: (camera mode) CTRL+B

NODE EDITOR SHORTCUTS (materials)
expand/ minimize group : TAB
group nodes : CTRL+G
add node: SHIFT+A


:: CULLING OPTION ::
Blender Render mode > N > Display panel > Textured Solid [on]


:: MIRRORING ::

Mirror in Object Mode: Duplicate > Scale -1

:: TRANSPARENT BACKGROUND ::
Render panel
png - rbga
shading - alpha - sky

:: Unwrap UV Map ::
Edit Mode > Create Mesh
Select edges > CTR+E > Mark Seams
A(select all) > U > Unwrap
UV/Image Editor Panel
UVs > Export UV Layout
(go to favorite image editor and create a .PNG with transparent background)
UV/Image Editor Panel > A (select all) > ALT+O ( Image > Open Image )

:: Transparent UV Image Mapping ::
Object Mode
Properties Panel
Object Data option > add new UV Texture
Texture option > add Texture
Preview > select Both
Image > select Image
Image > Premultiply / Premul (makes image edges smooth)
Image Sampling > Alpha > Use
Mapping > Coordinates > UV
Mapping > Choose the created UV Map
Influence > Diffuse > Color
Influence > Blend > Mix

:: Texture on a Transparent Material ::
Object Mode
Properties Panel
Materials > Transparency> Alpha : 0
Texture > Influence > Alpha : 1



:: Mirror Armature ::
Build half of armature
Name all bones to be reflected with .L extention
Parent to mesh and create empty vertex groups
Set Vertex Groups
Object Mode > Select armature
Duplicate > Inverse Scale to Cursor
Select duplicate > Edit Mode
Delete axis bones (ones that don't need mirroring)
W > rename (change .L to .R)
Object Mode
Select both Armatures > CTR+J
Delete original Armature Modifier from mesh
Select Mesh > select Armature
CTR+P > create empty vertex groups
Be sure that Vertex Groups is checked under the Mesh's Mirror Modifier



:: UV Image Black Background Problem ::
Set UV/Image editor to "draw image with RGB colors and alpha transparency"
Edit Mode 
Select a plane
Properties > Object Data > Texture Face > Transparency > Alpha
Select all planes > CTRL+C > Copy Transparency

Tuesday, January 31, 2012

Skinned Meshes (clothes)

To make a cloth scarf for my character, I modeled a mesh in Blender, and added an armature with a single bone.
In Unity, once an armature is added to a mesh, it is considered a skinned mesh and "Skinned Mesh Renderer" is automatically added as a component to a prefab set in the scene.
I then added a "Skinned Cloth" component to the armature's root bone in the prefab, and painted "max Distance" on the vertices.

Example:
Create the scarf in Blender, then added an Armature and one tiny Bone where the scarf will attach to the character. You only needed one Vertex Group and one Bone for this example.

Before you even start, be sure that your scarf has enough geometry to deform! This means that your mesh should not be made of one square. The mesh works best when there are enough "hinges". Imagine a wooden snake. If the snake is only cut from one piece of wood, it will be stiff like a pencil, but if you create hinges in the wood, then the wooden snake will be able to bend at the hinges. See the image below. My scarf has a nice amount of hinges.

1. Model your scarf, then create your Armature in Object Mode and add one Bone to it.

2. In Object Mode, select your mesh > select your Armature > CTRL+P > create empty vertex groups.

3. Select your mesh and go to Edit Mode > Properties Panel > Object Data (the upside down triangle symbol) >Vertex Groups

4.Check that Weight is set to 1 (the highest weight) and be sure that you have a vertex group with the same name as your bone. This assigns the vertex group to the bone with a matching name.

5. Select all vertices on your scarf mesh > be sure that the vertex group is highlighted on the list > click Assign. It will look like nothing happened, but now when you click the Select and Deselect buttons, the assigned vertices will toggle on and off - this shows which verts are being controlled by the highlighted group

6. Export your model being sure to include the armature in whatever format you choose. (I used FBX).

Click for larger image

7. Import to Unity.

8. Create prefab of the scarf to be used in scene > Drag it into the scene.

9. In the Hierarchy, select your scarf and navigate until you get to the bone you created in Blender. Your Skinned Mesh Renderer will be on this bone NOT on the mesh itself. See image below.

10. After selecting the bone, add the Skinned Cloth component. On the top menu bar select, Component > Physics > Skinned Cloth. Your scene should now look like the one below. You can copy my settings but I suggest reading the documentation and experimenting.

Click for larger image
YOU'RE ALMOST DONE!!!

11. Click the paint brush button under the Skinned Cloth Component. This will allow you to paint weights on each of the vertices on the scarf. I only used the Max Distance parameter. The points at the tail end of the scarf are at 5 (long stretch), the ones in the middle are between 3 - 0.2 , and the verts at the neck have 0 (no stretch). This tool actually seems to be buggy, but with some tweaking, you'll get it right.
 
Click for larger image
TRY IT OUT!!!

Find a way to attach your cloth to your character and watch it move! Have fun! And let me know if you still run into problems.