How to!

This is what we have so far:

Mac OS X:

  1. Install Conda
  2. Download this file and keep it in your Downloads directory (if you move it make sure you change the path in the build.sh file)
  3. In terminal cd into your Downloads directory
  4. Type in the command conda build python-leap-ctypes-quick-conda
  5. Test it out by using the test.py file in python-leap-ctypes-quick-conda/cleap/test
  6. You can now use the Leap Motion with Python 3.3 and 3.4!

Linux:

  1. Install Conda
  2. Download this file and extract it to your home directory.
  3. In terminal cd into leapmotion-blender-master
  4. Type in the command conda build leapmotion-blender
  5. Test it out with this file in Blender 2.69
  6. You can now use the Leap Motion with Blender 2.69!

Windows:

  1. Install Conda
  2. Download this file and keep it in your Downloads directory (if you move it make sure you change the path in the build.sh file)
  3. In the command prompt cd into your Downloads directory
  4. Type in the command conda build python-leap-ctypes-quick-conda
  5. Build the output ctypes .sln file with Visual Studio 11 (2012)
  6. This is where we got stuck. Windows requires the use of Visual Studio since the .dll shipped from Leap was built with it. We have yet to resolve the invalid application error.
Posted in Closure, DOCUMENTATION, Instructions | Leave a comment

Sensor Tiles Project: Unity Team: Frank & Dwayne – Beginner’s Guide For Blender & Unity

Table of Contents

1………………. Introduction into Blender & Unity

1.1……………. Purpose of 3D Modeling

1.2……………. Resources/Links

2……………… Before you begin, Tips & Tricks for every beginner

2.1…………… Common pitfalls to avoid

3……………… Getting Started

4…………….. Workflow of Blender & Unity

5…………….. Conclusion

6…………….. Recommendations

7…………….. Acknowledgements

 

1. Introduction

Blender and Unity, a piece of software known as a 3D modeling application. It is also known in the computer modeling world as a 3D computer graphics software program for developing animated movies, 3D models as well as 3D games using its own game engine.

Blender is an open source program, free to anyone for use. It offers many features for 3D such as modeling, texturing, rigging, skinning,  smoke simulation, animation, rendering, and video editing. It is an entirely free program that is available for Microsoft Windows, Mac OS and Linux operating systems.

 

1.1 Purpose of 3D Modeling

Many beginners new to the world of 3D modeling always seem to make the assumption that 3D modeling is a truly daunting, nearly impossible program to learn. However, the truth is that these programs may seem like too much because of its user interface (UI), the foreign terminology or simply your nerves getting to you. But with some practice and research into what make these programs tick and how you as the user can use them to your liking, you will eventually realize how easy these programs can be. It simply takes practice, dedication and hard work to understand and be proficient at these programs.

When it comes to 3D modeling, many individuals who start this program as merely a hobby mainly start out with small objects such as a round vase, a cube or even a person with no definition to their body or head. But as you start to learn how to add textures, meshes and animations, you will start to understand the inner workings of 3D modeling. From this foundation, individuals can choose an assortment of career paths such as 3D Animator, Concept Artist, Graphic Designer and many other fields related to 3D modeling. You can also work in video game industry as a 3D Environment or Character Modeler. 3D Modeling today is in very high demand and pretty much anything field that requires 3D modeling or animation such as Pixar, Bioware, Netherlands Studios.

 

1.2 Resources/Links

The following link should be used to download Blender & Unity:

Blender

Unity 3D

 

2. Before you begin, Tips & Tricks for every beginner

#1: Read up on tutorials

If you’re just starting out, or you’re entering an area of Blender you’ve never tried before, then tutorials are you ticket to success. Many things can be learned from a person who uses or views the program a different way. And if there is anything that you you do not know, you better believe I’m going to watch a tutorial on it!

However, abusing that thought process can lead to something I call tutorial addiction or tutorial dependency. A lot of beginners today are falling into the trap of becoming dependent on every tutorial for every little thing they do not understand.

A tutorial will show you the concept and help you gain perspective but your aim should be to get off them at some point and try things yourself at some point.

Use them as you would your beams of support.

 

#2: Challenge Yourself to be better

This was one of the realizations that helped me the most a long time ago.

What you need to do is start a project that’s outside of your comfort zone. Another way to look at is to step up your game and consider doing something beyond the parameters of your assignment or objective. Then force yourself to complete that challenge. Decide on the end result, and really that gold into your mind. Then once you have set that objective, think to yourself how will you try to achieve without the help of a tutorial.

Your first project will probably be really bad, not everyone knocks it out of the park with their first try. However, that should not really discourage you because regardless of whether you notice it or not, you will have learned some invaluable things during that project that you can carry onto the next project. And everytime you repeat this process, I guarantee you will learn something (however big or small) from each of these projects that you can build on for the next one. It just takes time in this process we call trial and error, for each time you fail, every step you take to rectify the problem helps to learn something new.

 

#3: Experiment

Sometimes it’s fun to just play with the many features in Blender and Unity with no real object in mind. And sometimes those experiments lead to great lessons learned that you might not have been expecting.

My car and cube animation started as just a physics test. After I realized I could get some unique and exciting movements, I began to experiment more often until I finally had a little animation that I could use in my game. It was a fun little project that I enjoyed cause that project helped me to learn so much just by taking the time to create a fun little side project.

Some of the biggest companies today let their employees have a day to experiment with whatever kind of project they wish. For example, I learned recently that Google gives their engineers and programmer one day out of the week to work on anything they like and they still get paid for that. To me it sounds really foreign for any workplace, especially in today’s workplace culture, however, it was actually on of those days that the concept for Gmail was created.

Experiments are invaluable for learning.

 

#4: Be brave, Be Patient

Beginners early on never like to hear this only because they may think it is a personal attack against them or it makes them feel inferior. But to become proficient at anything, you need to practice constantly and build up patience for when you make mistakes.

But as you grew older and you more mature, you may being to fear failure only because of how much it may bring you down. And if you expose yourself to enough to failure often enough, then you might become increasingly fearful to start any new project for fear of the outcome. There might even come a time where you will want to give up at some point during the project and hide the finished project in fear of criticism.

But failing is the only way you can ever learn. To me it is not so much of how you can learn by being successful, it is how much you can bounce back and learn after failing that really matters. If you saw any professionals hard drive full of failed attempts because of one or two little things they got wrong, then you would probably relax a little and realize how much in common you really have with them. They started somewhere, just like you are now. Practice often and do not expect greatness right away, anyone who’s anyone in their industry who is well known practiced relentlessly until they understood it.

And here’s a special treat for you: ctrl+z

You will thank me later.

 

2.1. Common pitfalls to avoid

  • Here are some common mistakes when you are first using Blender.
  • Not using images planes or references images. The reason I bring this up is because when you create an object, you might get carried with creating multiple to support multiple objects. But the thing to note is that unless you absolutely need it, do not create more planes than necessary.
  • Do NOT Create objects in Edit Mode. Basically, when you create an object in Blender or Unity, create the mesh in object first, then whenever you need to edit the object go to edit mode. I only say this because if there is a specfic object you need to create or highlight and you may have many objects on screen, creating that object will give you the liberty to focus on that object only. Otherwise, if you were to create the object in Edit Mode then switch back to Object Mode, you will select each object created in Edit Mode simultaneously, in any case just avoid creating anything in Edit Mode first if you don’t have to.
  • Seemless Meshes. This may seem like a weird concept but hear me out. If you create objects without any edges or faces, there may come a time where you could confused as to how to modify the object a little later on. Unless you know what not having a face or edge is in Blender and Unity, start with simple objects, experiment with them then move your way up.
  • Using subdivide for all models and subdivision surfaces. Just make sure all of your objects are as you divided them or else you could run into some real sculpting problems down the road.
  • Just trying to do too much too soon when starting out with Blender. Take it slow and do not rush yourself cause that WILL lead to mistakes being made
  • Keyslipping (hitting a key that has a function you do not know about, something happens and that scares you because you do not what just happened and whether or not you just screwed your entire project). Just try to be mindful of everything you are doing near the keyboard at all times, since Blender and Unity may be new programs for you, hitting the wrong button at the wrong time could send you into panic mode. I should know, it has happened to me countless times.
  • Selecting object with the wrong mouse click. Right-click is the default for selection in Blender and Unity, but you can change that by going to User Preferences and selecting left as the select button
  • Modeling an entire object in one piece. Look at each object as one small piece of the larger puzzle, think about its smallest factor, then think about that individual piece affects the larger piece as a whole. Think small, work small, but always remember the bigger goal at the end.

 

3. Getting Started

Now I know this seems counter-productive, but no one ever learns everything from one source. What I would say here is that if you wish be more prepared to learn Blender and Unity, you should check many different sources online, read a quick user manual, consider purchasing a book as a supplemental guide and repeat the same exercises.

When you start out with any new program, there may be many (if not all) of its aspects that you simply do not understand, but by experimenting with the controls and/or the UI, you can eventually begin to understand why this program structures their tools and features they way do.

All of this preparation can help you when first start to learn new software. This is especially true when you enter the world of 3D modeling, which is becoming a field with a lower entry barrier for beginners. In my opinion, the best way to learn a program is to read a user manual. A lot of the time, those manuals can spell the definition and purpose of a function while helping you to learn new terminology.

 

4. Workflow of Blender & Unity

Step 1: Opening

Picture of Opening

This is what blender looks like when you open it.

You are faced with a toolbar to the left an right, file operations to the top, timeline on the bottom, and the 3D view in the center.

Blender’s default starting mesh is a cube, we will be demonstrating basic functions on this.

Step 2: Basic Navigation

Picture of Basic navigation

To rotate around in the 3D view, hold down the middle mouse button and move the mouse. However, if you wish, this can be changed in User Preferences.

To move up and down or to and fro, hold shift+middle mouse, and move the mouse.

Use the scroll wheel to zoom in and out from view of the object.

To select an object right click, to de-select right click away from the object.

To select multiple objects, hold “SHIFT” and select the objects.

To select everything press “A” or to de-select everything press “A”

Notice that when you select something, it will be highlighted orange.

 

Step 3: Object Mode & Edit Mode

Picture of Object Mode and Edit Mode
Screenshot - 10122012 - 09:19:23 PM.png
Screenshot - 10122012 - 09:19:05 PM.png

The two modes we will be using in this tutorial are: Object Mode & Edit Mode

Object Mode allows you to select objects and move them around as you please.

Edit Mode gives you the liberty to select individual vertexes, edges,  lines, and planes. you can modify the mesh in this mode.to switch between these two modes you can either go down to the menu below, or just press TAB.

 

Step 4: Rotating, Scaling & Translating

First I want to make note of the arrows that appear when you select an object.

those are the Axes. The red arrow is the X axis, green is the Y axis, and blue is the Z axis.These arrows allow you to move things more accurately.

Translating

There are three ways to do this, one is to simple right click and drag. Another is to just select the object and press “G”

Or, you can left click on the axis you want to move the object on, and drag.

Rotating

Rotating is very simple, all you have to do is select the object to be rotated, and press “R”

If you want to rotate around a specific axis, first press “R” then “X”, “Y”, or “Z”. Each letter corresponds to it’s respective axis.

Scaling

To scale an object, simply press “S”. if you want to stretch an object along a certain axis press “X”, “Y”, or “Z”, after pressing “S”

 

Step 5: The 3D Cursor

Picture of The 3D Cursor

The 3D cursor is exactly what it sounds like, it’s a cursor in the 3D view. By default it starts in the origin, but you can move it by left clicking.If you add an object, such as a cube or sphere, it will appear where the 3D cursor is.

Step 6: Adding a Mesh

Picture of Adding a Mesh

To add a mesh (Cube, Cylinder, Sphere, etc.), go to the “Add” menu on the bottom left side of the screen (next to where it says Object Mode on the screen). From there you will find many sub menus, the top one being “Mesh”. Just select the mesh you want and drag the object to whatever location you desire.

Step 7: Selecting in Edit Mode

Picture of Selecting in Edit Mode

In edit mode there are three ways to select things, you can either select individual vertexes, lines or planes.

To switch, click the three buttons at the bottom.

Step 8: Merging

Picture of Merging
Screenshot - 10122012 - 09:33:13 PM.png

In edit mode you can select two or more vertexes, and merge them together.

To do this, go into edit mode, select the vertexes you want to merge, press “W”, then, merge.

Step 9: Extruding

Screenshot - 10122012 - 09:27:30 PM.png

In edit mode, you can select a line, vertex, or plane, and extrude, or, extend it.

to do this, select the thing you want to extrude, then press “E”

Step 10: Edge Loop Slide

Screenshot - 10122012 - 09:35:26 PM.png
Screenshot - 10122012 - 09:35:54 PM.png

This allows you to make a “cut” in a mesh, letting modify it in individual pieces.

to do this, press “CTR+R” and select the spot you want to cut, then it will allow you to slide that cut, then place it.

This is handy when you want to extrude only a certain part of a plane or an object.

Step 11: Modifiers

Picture of Modifiers
Screenshot - 10122012 - 09:38:22 PM.png

Switch back to object mode.

Modifiers modify your mesh.

One that you will use often will be the “subdivision surface” modifier.

This modifier makes your model all smooth.

The modifier properties are in the right tool bar.

And to continue to the workflow into Unity, we have complied the following steps on how import files from Blender into Unity:

 

Note: Unity natively imports Blender files. This works under the hood by using the Blender FBX exporter, which was added to Blender in version 2.45. For this reason, you must update to Blender 2.45 or later.

  1. To get started, save your .blend file in your project’s Assets folder (or whatever folder you saved your project in). When you switch back into Unity, the file is imported automatically and will show up in the Project View.
  2. To see your model in Unity, drag the model from the Project View into the Scene View.
  3. Finally, from this point onwards, whenever you modify your .blend file, Unity will automatically update whenever you save.

Unity also sends the following information about .blend files with this method that makes it especially easy for importing:

  • All nodes with position, rotation and scale. Pivot points and Names for the project.
  • Meshes with vertices, polygons, triangles, UVs, and normals.
  • Bones
  • Skinned Meshes
  • Animations

 

Example Unity Character Model

Example Character Model

 

Once the file has been exported, you will have a couple of options available. First, you can save the file in a .blend file format.

One important note to make is that when you import Blender files into Unity, be aware that not everything may be transferred over.

Despite the fact that they are similar programs, each program may the certain processes and look at assets in a different way. For example, for this tutorial we decided to go ahead and import a character into Unity. This character model was imported from Blender and has fully rigged for animation. However, some of his textures was carried over such as the dark blue textures on the model’s shirt and boots.

One way to make sure your files stay intact when they are exported into Unity is to ONLY save them as a .blend file.

Another way to back up your work is to save a copy of your desired version of the character in a assets folder separate from your current working folder.

Secondly, you can save the file in a .unitypackage file format. However, you must be warned that saving the file in this file type results in your project being unable to imported back into Blender.

From here on out, everything that can be done with Blender can also be done with Unity.

 

5. Conclusion

As you can see, there is a lot of utility with the Blender into Unity workflow. For example, commercial products can be monetized via Unity’s licensing agreements, which would allow you to access every single of Unity’s features to maximize the potential of your product. Unity, you are allowed to make fully realized 3D games that can even be sold on many platforms such as the Playstation Store, Microsoft Xbox Arcade, Nintendo eshop and even Steam. There are many possibilities for each program such that both have their pros and cons individually, both are really an invaluable resource for content creation.

To us, we find that Blender usually excels more at creating, rigging and animating 3D models while Unity is more of the powerful game engine in which your character can live and thrive in. Individually, they are great still tools on their own, however, with both you can accomplish many feats in the 3D modeling world. You can even create a whole video game without ever having to look for other resources other than Blender and Unity. And before you come to a conclusion about the application, my only advice is to use the program, understand many of its ins and outs, find what works for you then make your judgement. Otherwise, you might end up walking away from an exciting opportunity and miss out on the potential of your creations in Blender and Unity.

 

6. Recommendations

If you are interested in 3D Modeling and wish to learn more about you can pursue it, you can follow these links:

Career path of a 3D Modeler

Other free 3D Modeling applications:

Sculptris

K-3D

 

7. Acknowledgements

We would like to take the time out to personally thank everyone who has helped with our journey into Blender and Unity.

We would like to thank professor Baker for his consultation with us throughout every step of the process. His knowledge and his guidance helped us to understand and make a guide that could be used as a starting for all people who have no idea what to do or where to start when using a program such as Blender and Unity.

We would also like to thank our entire Sensor Tiles Project Team. Al, Brian, Kenneth, Miles, Reno. With their wild ideas along the way (too many to count), we would not have had the many of the features of our Blender game that exist today. Furthermore, their help and guidance also helped to make this tutorial achieve the highest quality it could be.

Posted in Assignments, Damon Baker, DOCUMENTATION, Journals, Lab Notes, Lab Reports | Tagged , , , , , , , , , , , , , , | Leave a comment

Sensor Tiles Project: Unity Team: Frank & Dwayne – Creating The Beginner’s Guide For Blender & Unity

For today, we have compiled all of our previous posts and conducted further research into Blender as well as Unity. The purpose of this is to establish a working and accurate guide about Blender and Unity for individuals in future semesters who wish to learn the workflow, pitfalls and tips and tricks for beginners. It will specifically have a low entry barrier as it can be read and understood by students ranging from engineers and computer programmers who have little to no experience with 3D modeling software like Blender or Maya. However, it will also be inclusive towards users with little technical knowledge about computers and software.

Out next post will be the beginner manual itself.

Posted in Assignments, Damon Baker, DOCUMENTATION, Journals, Lab Notes, Lab Reports | Tagged , , , , , , , , , , , , , | Leave a comment

Sensor Tiles Project: Unity Team: Frank & Dwayne – Plugin Wars & Continuing Work On Our Game

For today, we consulted and took professor Baker’s advice. One of our main goals for today was to search for plugins that could be used with Unity that would allow us to export Unity native file formats (such as .unitypackage) and export them into a file format that Blender accepts. These include .fbx, .stl, .3ds, .max and .blend (the obvious one). But at the time of this writing, we have not found any plugins for use with Unity that fit our needs.

We have also worked on implementing a ideas we had have with lighting. Thus far, we have been using the lighting to darken the environment around corners of each wall to give off a sense of unease and atmosphere we are creating.

Our next step is to work on movement for enemy characters models and implementing first person view camera control for the player.

Posted in Assignments, Damon Baker, DOCUMENTATION, Journals, Lab Notes, Lab Reports | Tagged , , , , , , , , , , , , , | Leave a comment

Final dance of this semester

So:

Linux: the SWIG method builds without a hitch. To get it working in Blender the only complication requiring your admin password to get libLeap.so into /usr/var. No problems after that

Mac OS X: the unofficial CTypes binding builds and runs just fine, and SWIG builds but doesn’t work. We have yet to get this working in Blender, however an example has been composed demonstrating its functionality by the author of the binding.

Windows: Remained largely untouched because we couldn’t get SWIG from Conda, the package for Windows is on Binstar but .yaml files can’t depend on binstar packages as of this writing. We tried getting it to work with the CTypes binding we found, but found that cmake for Windows is also a Binstar exclusive. Manually installing cmake works, however you then need to build with Visual Studio, which also worked, but getting the test.py file working did not.

Coming up: A thorougher write up of how to Leap Blender!

Posted in Assignments, DOCUMENTATION | Tagged , , , , , , | Leave a comment

Leap with Ctypes

Forget about swig

This here works flawlessly for Mac OS X: https://github.com/shadowmint/python-leap-ctypes 😀

Now to get it working in Blender.

Posted in Uncategorized | Tagged , | Leave a comment

Sensor Tiles Project: Unity Team: Frank & Dwayne – Importing Character Models Into Unity & Exporting Files Into Blender

Today, we have imported a Lego Crash Dummy into Unity and placed it into our environment. We are using this Lego figure to test the physics of our game for the current build of this game by having the Lego figure walk around the environment and how lighting would look in first-person view. So far, we have been successful, however, we ran into an issue such that whenever we move the Lego figure too close to the wall, the Lego figure would simply fall off and the game would have to be reset. But when investigated the root of the problem, we discovered that the floor had been given a solid surface as well as collision detection. Unfortunately, the walls were not given such properties until we tinkered with the physics engine once more. At the time of this writing, we have alleviated the problem of the walk-through walls and are now working on the lighting portion and implementing enemy character models.

We have done some research into the ways that we can re-import Blender files once they have been exported into Unity. Unfortunately, after searching on the web as well as tinkering with both Blender and Unity, we have been unable to find an easy or clear cut solution to the matter. However, over the course of our troubleshooting, we have uncovered that once the exported Blender file has been modified in Unity, even if you save the Blender file in Unity, you can manually move the modified file back into Blender.

There have been some issues with this method. First off, as discussed in a previous post, once Unity saves a file in order to continue work in that program, it saves the file in a .unitypackage file. This is a file format that is native to Unity and unfortunately, Blender does not recognize this file type. In addition, the only we have been able to make this solution work is to change some user preferences from Unity so that it does not automatically conform to this setting for every file. For example, our game uses a lot of different assets such as walls, characters models and evens sounds, and Unity has to consider all of these individual assets when saving a file imported from Blender. So it seems to us that the bigger the file, the more assets are present, which also means we may not be able to bring our game that we have modified in Unity back into Blender. Fortunately, we can still somehow move smaller objects like a simple cube or sphere back into Blender, albeit with a little finagling.

Posted in Assignments, Damon Baker, DOCUMENTATION, Journals, Lab Notes, Lab Reports | Tagged , , , , , , , , , , , , , | Leave a comment

Sensor Tiles Project: Unity Team: Frank & Dwayne – Exporting Assets From Unity Into Blender

For today, we have working to perfect the lighting setup that will be used in our game. But as an idea, professor Baker had us test the theory as to whether or not it is possible to make changes to a files that has been created in exported to Unity and then export those same files back to Blender. Unfortunately, at this time we discovered that Blender does not accept the changes simply because of the file format that Unity exports its files.

To be more precise, we experimented with the notion of creating a file in Blender and exporting to Unity. Then when you make the changes from the Blender file, we tried to find out if you make the changes from the original .blend file and send it back into Blender with the changes intact. However, this seems to not be possible because when you export a file(s) from Unity, it compresses and exports the file(s) in a .unitypackage file and Blender does not support this file format.

As a result, we have come to the conclusion that any changes that are made to the Unity files that were originally made and exported from Blender can only continued to be worked in Unity as a one time process.

Our next step is to tinker around with Unity and attempt to find an alternative solution to this problem as well as continue to work on our game’s lighting and control mechanics.

Posted in Assignments, Damon Baker, DOCUMENTATION, Journals, Lab Notes, Lab Reports | Tagged , , , , , , , , , , , | Leave a comment

Leap

So we’re into new things. I really think this is a SWIG compiling error, we found that the imp module being used in Leap.py was depricated. We decided to use importlib as was specified in the docs but that still throws the error :

Fatal Python error: PyThreadState_Get: no current thread

which we’ve also been getting most recently with this stuff after having installed XCode and the components it comes with.

My head hurts.

Posted in Uncategorized | Leave a comment

Sensor Tile Project: Brian, Gabby, Miles, Reno, Kenneth, Al, Dwayne, Frank

Today we verified the code that was downloaded from Github. It is functional, but more research is needed.

Posted in Uncategorized | Leave a comment