Forum Thread
  Posts  
importing blender models into unity 3D (Forums : 3D Modeling & Animating : importing blender models into unity 3D) Locked
Thread Options 1 2
Sep 5 2013 Anchor

Hi everyone so I have made some models of shipping containers a building a glock and other stuff but whenever I import it into unity it either wont import or you can walk through it and various parts are missing.
Information that may or may not help:
-running on free version of unity
-using latest version of blender
-running mac OSX lion
-haven't as far as i know edited the source files of unity or blender

Sep 6 2013 Anchor

I assume you are trying via .blend file? Have you tried exporting to .fbx in Blender and importing the .fbx in Unity? This it what Unity does anyway when it tries to import the .blend.

Sep 6 2013 Anchor

it does it for any file and i have found models on the internet that work and is a .fpx format i have tried using fpx but im still having some of the model missing

Sep 6 2013 Anchor

Have you made sure that all of your normals are facing the right way? I know that sounds like a stupid question, but it's easy to get into forming the shapes and forget entirely about making sure all the faces all face the right way.

--

I snark, therefore, I am.

User Posted Image
The reason behind this banner will be revealed in due time....

Sep 6 2013 Anchor

What do you mean by normals?

Edited by: ML_games

Octimus
Octimus Mr Maya
Sep 6 2013 Anchor

oh dear go google it.

--

Death Octimus

Sep 6 2013 Anchor

yeeeeaaah i for some reason didn't think of that forgive me im new to this

Sep 6 2013 Anchor

ML_games wrote: What do you mean by normals?


Let me see if I can translate it into something other than gibberish.

On a 3D model, every face has only one side. Think of a piece of a paper that's only solid from one direction. From every other direction, it does not exist. That one special direction is its normal.

When the normal for a face is on the inside of the model instead of facing out, it looks like a hole in the model when it's rendered. To check the normals of your faces, go to your editing tab. There should be a button that says something like "Draw Normals". Click it and you should get a little colored line coming out of the center of the face. If you see one, just select it and press ctrl+n. If there are a bunch, just select the whole model and press ctrl+n. I would suggest getting into the habit of periodically ctrl+n'ing your whole model over the the course of modeling.

That will reduce the chances of this problem happening again, and will reduce the amount of work you have to do to fix it if it does.

--

I snark, therefore, I am.

User Posted Image
The reason behind this banner will be revealed in due time....

Sep 7 2013 Anchor

that makes some sense because when i walk into it it has walls but when im outside it doesnt.

casf01
casf01 Rigger / tech artist
Sep 7 2013 Anchor

Does blender has a backface culling option ? If so that can help you detect wether the normals are flipped or not

Sep 7 2013 Anchor

Turns out it does. The shortcut is shift+t.

--

I snark, therefore, I am.

User Posted Image
The reason behind this banner will be revealed in due time....

Sep 8 2013 Anchor

well i figured out the problem only happens to the default cube which makes no sense also i couldn't find the normals

Sep 8 2013 Anchor

Look at my september 6th post. It's the middle of the third paragraph.

--

I snark, therefore, I am.

User Posted Image
The reason behind this banner will be revealed in due time....

Sep 9 2013 Anchor

In 3D view edit mode press N to show the side panel. From there enable showing face normals in "Mesh Display".

You can recalculate normals outside by selecting all (A) and going to Mesh -> Normals -> Recalculate outside.

Sep 17 2013 Anchor

I use Blender and Unity together all the time for a game I'm working on. I've got problems with understanding normals too, but here are some answers to your other problems:

  • If you can walk through something then you haven't set up colliders and rigidbodies yet. It may sound difficult but its actually pretty self-explanatory after a few video tutorials on Unity's website.
  • If you are still having import problems make sure that in Blender you are using the "Blender Render" (not "Cycles" or "Blender Game Engine"). Unity is designed to easily import things from Blender but it only works when it's set to Blender Render.

By the way, just out of curiosity, are you working on a project or are you just learning general game development?

Oct 6 2013 Anchor

I'm working on a first person shooter and game development in general. I have gotten it to import with everything facing out. When you say I should put rigid bodies on before do you mean in blender or in unity? I can put them on in unity easily blender i cant do any physics stuff in. Also another question, when i put textures on in blender then export and import into unity the textures aren't on anymore and i need to re-apply them, any way of fixing this? Also because my models are made up of many different cubes cylinders etc. I need to go through every single one in both blender and unity to get the whole model textured and if its like a chair or something and i want the whole thing to be wood texture its very time consuming I'm wondering if theres a way to add a material to a whole bunch of objects at the same time or if there is a way to combine the objects. Thanks.

Oct 7 2013 Anchor

I should put rigid bodies on before do you mean in blender or in unity?


Unity. You can't do engine specific configurations like that in a modeling software (except for BGE in Blender of course) except maybe model the collision box if you want custom shape but you still need to set things up in Unity.

ML_games wrote: Also because my models are made up of many different cubes cylinders etc. I need to go through every single one in both blender and unity to get the whole model textured and if its like a chair or something and i want the whole thing to be wood texture its very time consuming I'm wondering if theres a way to add a material to a whole bunch of objects at the same time or if there is a way to combine the objects. Thanks.


Your models should be one object. In Blender you are supposed to add the geometry in "Edit mode" where you edit a single object, ie a cube. You can add cubes, cylinders etc in edit mode, and when you exit edit mode the result will be just one object consisting of the shapes you assembled. If you have made your models with just adding different shaped objects to your scene in Blender you can combine mesh objects with CTRL+J.

If you have the objects sharing the material I believe it should find the texture image file if you have added it to Unity already. And for individual props you don't want to use multiple materials, use only 1 texture with UV.

Oct 7 2013 Anchor

thank you! I know about the edit mode but i have a very detailed AK model I spent almost a month on and it was made in object mode same with a Glock18 I made that took about 2 weeks so I really don't want to have to remake them. I assume that I use COMMAND+J or CTRL+J in blender if not i will just try it in unity my other models I'm starting to work on are just one cube with a ton of sub division extrusions and bevels so that should work out nicely.

SinKing
SinKing bumps me thread
Oct 7 2013 Anchor

ML_games wrote: ... will just try it in unity my other models I'm starting to work on are just one cube with a ton of sub division extrusions and bevels so that should work out nicely.


Umh, you do know about normal maps and baking, I presume? You don't put an object with a crazy amount of geometry into Unity. You bake its detail onto a low poly model and import that.

--

User Posted Image

Oct 7 2013 Anchor

no i don't know... im still new to this so i dont really know about that stuff how would you bake the detail into low poly? i dont really understand what you mean i did import the model and it still worked although it lagged a bit

Oct 8 2013 Anchor

ML_games wrote: no i don't know... im still new to this so i dont really know about that stuff how would you bake the detail into low poly? i dont really understand what you mean i did import the model and it still worked although it lagged a bit


Which is why you "bake" a normal map. What a normal map does is 'fake' (or maybe 'print' might be a better word) the details of a higher polygon model on a lower polygon model.

Go to these links, they'll explain more about what a normal map is and how to make one in blender:

Wiki.blender.org
Cgcookie.com

--

I snark, therefore, I am.

User Posted Image
The reason behind this banner will be revealed in due time....

SinKing
SinKing bumps me thread
Oct 8 2013 Anchor

ML_games wrote: no i don't know... im still new to this so i dont really know about that stuff how would you bake the detail into low poly? i dont really understand what you mean i did import the model and it still worked although it lagged a bit


I noticed that and wondered what made you jump right into Unity. However, it's better to do something than to read everything and do nothing. Best of all is probably to read first and then do ^^

So, here is my all-in-one link to cover any and all "making game content" questions:

Wiki.polycount.com

--

User Posted Image

Oct 8 2013 Anchor

How much detail you want to / are able to show per model is up to game design and target platform. Try to get the basics of modeling to in-game pipeline first before you try to learn normal map baking IMO.

Oct 8 2013 Anchor

well about a year ago i wanted to learn how games where made and wanted to make one the only thing that came to mind was an fps game and after a month of research unity was my best choice and after lots of research its the only thing i can do (i probably couldn't make a flash game because i never looked into 2d)
also i have baked some 3d explosion simulations made for some of my stop motions earlier on so i have done it before with particles but thats about it.
i found out for the textures i need to make a UV map but i really have no idea how
(sorry for my stupidity on this topic) i will check out

Oct 8 2013 Anchor

Everybody starts as beginner :) But direct your energy into searching for answers and getting grasp on the overview and only ask specific questions when you can't find an answer.

UV mapping (often called unwrapping) is a design task on its own with it's do's and don't's and depend on what you're working on.

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.