- Home /
Quick Blender to Unity Question
Hi, guys! I'm working on a space game project right now and it is coming along nicely. I am on the last model, which is the ship. It has been modeled, textured, and rigged.
My problem is getting it into Unity.
I have a couple issues here:
Although in the model preview it is put together, when I drag it into the scene it is all borked up and the separate objects are rotated. How do I fix this?
I started out with some meshes and had to separate some meshes into two separate objects. Unity has them as still a single unit, which I absolutely cannot have. How do I separate them?
I'm assuming these are issues on the Blender side
Well thank you so much! I hope I can get the help I need to continue my project! Thanks! - YA
Answer by Eric5h5 · Jun 30, 2012 at 03:08 AM
Bake the rotations (ctrl-a in Blender and do "scale and rotation to obdata").
Are they actually completely separate objects in Blender? If so, they're grouped under a parent object in Unity, but the meshes are still separate and can be treated independently like any other child object.
I have baked rotation and object data several times, but to no avail. I think it has something to do with animation, because it is rigged (but there are no animations as of yet.
Answer by jzapper · Jun 30, 2012 at 04:23 AM
I am guessing you can make all the separate objects just 1 piece like join them together with blender or drag all pieces in unity 1 by 1 and just rotate them until the ship is together.
Answer by zombiegorilla · Jun 30, 2012 at 05:46 AM
1) I had similar problems, and it had to do with animations. Unfortunately, I tried so many things, I don't remember what solved it. Sorry. I know I eventually made the animation all in one, and then used the frame numbers and "split animation" to break it up. Something in that process is what solved it. It may have been actually defining the stop and starts.
2) The .blend file comes in as one "import object". So while you may have many pieces/parts in it, it shows up as element in the project. However, you should should be able to expand the object and see your other ones inside. If you try to drag one to the stage, it will take the whole thing. Not a problem though. Typically what I do is have many assets in a single .blend. I will drag it to stage and and break it apart and create new prefabs from those elements. They will contain all their animations/relationships etc. And if you change your original .blend file, the changes will apply to the new prefabs you created. Though, if you change names or relationships too significantly in the source file, you may need to adjust your prefabs.
Hope that helps a bit. ZG
Thank you! Yes I have discovered that I can modify the child objects, but only after dragging it into the project view and breaking the prefab. For some odd reason, I cannot access the child objects in the hierarchy :(
Well if you could somehow remember what you did I would be very thankful. I have the model and objects rigged (Well, some are parented to bones and some are parented to meshes) but no animated.
Are the child objects you are trying to access actually inside the parent object, or just parented to it? In other words does it a appear as single object in Blender, and the children are accessed via edit mode? If that is the case, then you won't be able to access them separately in Unity. You can split them out in Bender using separate, then you can access them individually in Unity.
Ah, if you are not using any blender animations, did you make sure to check "Do not import" for animations in the import panel? If you don't it add a "default take" animation. If you have rigs, it will do all kinds of strange things. If you have already done that, and it is still a problem, make sure that your objects have scale/rotation "applied" in blender (where appropriate), and also check that you aren't using any modifiers that may be causing problems. You can flatten them if they are.
I love blender, and was stoked that I could simply use the blend files in Unity, but there were a lot of growing pains finding out what Unity likes and doesn't. But so far haven't hit any major issues. $$anonymous$$ost everything resolved by being very "clean" (for lack of a better word) in my source blends, and tweaking import settings.
If that still doesn't help your problem, and there isn't an NDA issue, feel free to post your blend and I'll take a look.
Cheers. ZG
I have been using Blender for some time now... 6 years or so. Great program, I agree. Yes they are separate objects in the .Blend. And I am using Blender animations, as I do not know how to animate in Unity. So I guess I will make the animations (or one large one to "split up") and see if it properly imports. Thanks! Will get back on results! - YA
$$anonymous$$illa- I have ascertained the issue here. Any object that is not DIRECTLY parented to a bone (and is ins$$anonymous$$d parented to an objected) is rotated -90 degrees. How would I go about fixing this issue?