Category Archives: Unity

Surprises are great

I have some level of comfort exporting from Blender and importing into Unity using FBX finally. I say some level of comfort because it works like a champ using material without nodes. Exporting/Importing with node materials is still a little sketchy. The first little surprise was the materials came over without any adjustment in Unity, meaning when I moved from Blender into Unity the textures were already applied to the materials. Every thing I have watched or read indicated I must drag and drop my textures onto the materials after import and I did not have to do that, it was automatic. The biggest surprise was when I created the animations in Blender. I was under the assumption when I created the animations in Blender the animation would transfer over as a single animation.What I am trying to say is, if I created an animation of two different drawers opening on my dresser, I would get a single animation with both drawers opening when the file was brought into Unity. To my surprise what transferred over was two individual animation files, one for each drawer, a hallelujah moment. Next on the list is apply the animations to the game objects and watch them move in Unity, first in the legacy animation system and then Mecanim, getting the node materials to transfer correctly can wait as I have my first asset created, imported into Unity with animations so it is time to get those to work first.

After I get both types of materials to export correctly and animations working in both animation systems I’ll put something together in print and possibly video showing everything I needed to do. I hope this would help others that have had specific questions along these lines and found it as difficult as I have to get that information in one place.

Blender to Unity #1

I made my first attempt at transferring a model from Blender into Unity and ran into one hiccup, the materials did not transfer over. The model looks good but when I select either the drawer or dresser in Unity the inspector shows the same material, ‘No Name’ shader. The problem here is both items have the same material which means when I place the texture into the shader the both get the same texture and they are two different textures. I made an error in the naming of the textures in Blender or did not select a check box or…. I’ll figure it out and update. I’m sure it is something simple.

Edit:

Here is the results of the first import after reverting to regular non-cycles materials. I created and then baked the materials/textures in cycles but had some problems exporting. It was exporting textures that were not attached to any materials. I tried removing all fake users etc., saving and loading again yet, one texture image remained. Now I know why people always ask for a way to view and or delete orphaned textures. So, this is the first iteration, no animations though, baby steps 🙂

Dresser_UT_01

Game Asset Complete

My first game asset is complete for testing purposes. Tonight and during the weekend I will be create animations foe each of the drawers with sound of them opening and closing. After this I will be importing everything into Unity and creating scripts to open and closed the drawers. I’m sure this will be just the first of hundreds of test and retests I will be doing during the creation of this game.

Yesterday, I found a book I think I have been looking for. It is called: ‘Practical Game Development with Unity and Blender’, the perfect companion book for what I am trying to do. This book was just released in June 2014 (this year) using Blender 2.68a while I am using 2.71 and while I am not sure of the version of Unity he is using, given the time frame of release I’m betting he is using 4.3 while I have 4.5 (I skipped 4.4 or it was console only, not free).  With that said this book looks to be the ticket as it will not be running through all the basics of Unity or Blender interface, which I am very familiar with and, crossing fingers here, getting into some of the things I have been looking for information on. I would much rather find all the information I need myself through searching online, videos or reading books. The last think I want to do is ask on the forums. I am not against asking there, I don’t want my questions to end up being very easy to answer if I had only looked. If I get completely stuck, yes I will ask but only as a last resort.

Here is my finished product: Dresser

LivingRoomDrawers_08

LivingRoomDrawers_Open_08

Cycles Baking

I started baking my game assets using cycles today and I think it turned out pretty good take a look at the results below. What I’m not sure about is when I add the faces of the drawers and the drawer handles will I be parenting these to the existing drawers or adding them to the drawer model and then creating a texture sheet with all of the textures included.

LivingRoomDrawers_06

Again, I should READ

As the title states, I should READ. I am working through these new books for Unity3D and C#. I should have known what was happening because I have done this many times before. Working through one of the first chapters I ran into problems. When I was trying to place items on my terrain nothing was happening so, as I did before I stopped and spent hours trying to figure out the problem. Long story short, there was no problem. I decided to continue on and look at the errata for the book later to see if someone else had the same problem. The very next page the author states ‘nothing is showing’ and this is because etc. etc. and goes on to explain why and how you need to place this type of item.
Mike: Remember, READ and you may find the answer and avoid serious frustrations  .

Unity for Absolute Beginners

I just purchased this book and will begin today. This book is written by the same person that wrote “Beginning 3D game development with Unity 4” and I thought that book was great but to many errors for my taste and I think most of those came as a result of changes in the Unity versions more than out right errors in the book. There were those, don’t get  me wrong and I could work through those but the changes in the Unity versions are ones I finally could not tolerate. That is one thing I love about Blender, no matter what tutorials you are using, you can follow along for the most part even if the tutorial you are working with is from 2.49. There are features that the latest versions, (2.71 for example) does not have but for the most part those features are not in popular videos.

So, now I am back into Unity with this latest book and I will let you all know how things are going.

It has been a while

Wow, I have not been here in a couple for weeks. The time has been spent productively working in Unity, UE4 and Blender. I must head to bed right now but I will post some of the work/play I have been doing the last couple of weeks when I get into work tomorrow morning.

TPS_BasicMaterials_Floor1-V02

 

This is the base model I have been working on in Unity and the view if your were looking down the hall from my room.

Town_Place_Suites_UE4-V01e

This is a screen shot of the work done in UE4. I love how this engine works including the work flow. This was from a tutorial learning the interface but I created and added my own textures. After finishing this up I tweaked the carpet and wallpaper (to the right).

My Savior in learning multiple languages

I’m sure most of the people that pop in here and browse once in a while have done some programming, scripting or coding. When I was taking computer programming in high school back in the late 1970’s it was called programming and we used FORTRAN, COBOL and Basic with our FORTRAN programs entered into the mainframe using punched cards. I stopped programming because I liked to see and touch physical objects when I was finished with a project and went into Engineering before I left  high school. After 25 years as an Aerospace Manufacturing Engineer I have decided to return to programming and so far am loving it. The problem is I am learning multiple languages at the same time which might not be the smartest thing to do.

Having gone beyond a noob user into the intermediate and some advanced Blender modeling I would like to dabble in the creation of my own addons and that requires knowledge of Python. At the same time I am now learning the Unity3D game engine which uses C#, Unity-script and Boo so, I have jumped into the deep end of the pool with learning Python, C# and Unity-script at the same time (I’ll leave Boo in the dark with the ghosts 🙂 ).

The point here is syntax, in that they all have their similarities and differences and moving from one to the other gets my head spinning when looking for errors in the code. It usually boils down to a semicolon which should have been a colon or nothing, [], {} and () used incorrectly depending on what I am doing at the time. Finding the errors has become very easy but a hassle.

The other day I discovered uScript, an addon for Unity3D allowing visual scripting using nodes similar to the compositor in Blender. This item from Unity’s asset store is my new favorite tool and creating the scripts has become a breeze. As long as you think logically as if you are writing the scripts, create the variables and place the nodes where the will logically fit in a script you are golden. I most definitely will learn the C# language and code by hand in time but this new tool allows me to keep playing with Unity3D, using the books I have purchased and learn Python’s syntax without getting loopy at the same time. Even better, while I am not typing in the scripts as they have them in the books and tutorials I am translating them into the uScript nodes creating the same actions.

Bad and then the good…. The documentation and available tutorials either written or recorded are sorely lacking. When you click the documentation button in the editor you are brought to a website without actual pictures of the nodes and the descriptions are…. (See for yourself below)

Which leads me onto my next task which will help all around. As I play with uScript I will be recording tutorials both written and recorded posting them here and at the same time start creating a draft for a book to sell about uScript and Unity3D.

Here is a node group I set up earlier this morning creating a script from the book and yes it did work. I found multiple ways you can structure the nodes together creating the same affect and I will include all variations in the first tutorial I post next week.

uScript

 

Here is a Snagit of the documentation website you are taken to when you click the documentation for the ‘Time.delta.time” node.

uScript_Documentation

Beginning 3D Game Development with Unity 4

I had started over with this book because of some minor issues I had been having which turned into major issues and have been plugging along quite well. I am now past my previous point in the book (chapter 9) and have moved a good amount into uncharted territory (chapter 10). The errors within this book are starting to stack up and it has become very apparent the author did not do much proofing nor did they have a very astute technical reviewer if any. It appears who ever reviewed this books project did not follow the project past a certain point. There are assets which magically appear in the book without creation or import. Chapter 10 started out referencing a function with in a script it does not exist in (it does exist but in another script) and eventually gets back on track referencing the correct script. If you are paying close attention to what you are doing and where different functions are called these type of errors are noticed and worked through with no problems.

All in all I am having a great time using Unity and this book. The author is close to completing another book to be released within a month or so and with their comments in the Unity forums they understand the problems from this book and I look forward to this new release. I have learned much from this book and will definitely purchase the new book when it is available.

Game Assets

While I am going through the Unity books, creating and texturing the terrain etc. I am also going to start creating some of the simple game assets I will be needing. For the most part the items are the very simple ones that should only take a few minutes to create and so forth. Here is one created in about 5 minutes for a street light similar to all of the lights surrounding the parking lots at my home. While I am learning Unity it will not hurt to expand on the book some, creating the assets as well as additional scripts I will be needing.

Street_Lamp_00

That was a very quick and sloppy job so here is a better quick render. By the way, I added this asset into Unity this morning and play in the afternoon but looked go so far.

Street_Lamp_00