I’m trying to do some very simple modelling but I’m a blender Unity noob.
Background: In Blender (current OS X version) I created a fairly simple object by creaing a few cylinders and a sphere, Joined them into one mesh, assigned a material color. I saved a copy in a separate file, gave it a different color. Imported both into Unity.
When I drag the objects into the scene, they appear to have an extra mesh in them named “Cube”. I can delete the cube, but then I get a message that I’m breaking the link with the prefab.
Added lighting. Some segments of the models don’t get any light. I’m thinking that the normals are screwed up but I’m a bit puzzled why that would be- they are simple scaled cylinders. For now I’m assuming that I screwed up in Blender somehow and will try again but if anyone has a quick tip there I’d love to hear it.
The parts of the objects that do light up are all the same color; the materials I assigned don’t seem to “take.” Again, probably something I did in Blender. But it’s odd because the Blender Preview pane shows the color. Hmm, just noticed when I render in Blender the color is gone?! Probably not Unity, then.
I think it was a mistake to try and learn Unity Blender in the same week.
Blender has a Default scene with a cube in it. This gets imported into Unity (DOH!)
The trick is to launch blender, delete the default cube and then hit CTRL-U to save a new default scene.
Object colors do not get carried across from blender into Unity. In Unity, simply create a material in your assets folder.
Try to post a screenshot of the lighted object in Unity, then I can probably see what is wrong.
Learning both Unity Blender at once can be a bit daunting. For learning Unity, I would recommend going through the 2 tutorials we ship with it - after that, you’ll have a pretty good idea of how Unity works.
Thanks for the tips! I didn’t realize that simply deleting the default Blender cube wasn’t sufficient…
I’ll redo the model first (I want it to be smoother anyway) but if I continue to have difficulties I’ll post a screenshot here.
If materials are not imported from Blender, does that mean that a (non-textured) model will need to be in pieces if I want to color bits of it differently? This doesn’t seem like a huge limitation since textures are the norm but I want to understand.
Yes, I’d read them and have been mentally extracting from them the techniques that I’m going to be using. You can expect some questions relating to scripting in a few days.
I am just learning blender and unity myself, but one thing you could do is UV map your model in blender,(dont have to break it up), so you can paint all of your bits how you want them to be, and then just drop your texture and model in your asset folder.
Started a new model out of cylinders, just like before, and again some of it looks screwed up. When I color it bright white it looks like some of the normals are reversed. Not sure how that happened; I took the bottommost cylinder, duplicated it, and scaled it in Blender. (Do I need to renormalize it?)
Pic attached, hope it suggests something to someone. Thanks!
Much better, thanks. It’s frustrating knowing that there’s probably a menu command somewhere for regenerating normals, and not being able to find it. Looks like I’ll be buying a Blender book in the next day or two…
Good news- I was having texture problems, and I had written up the problem to post it, but I just managed to fix it. (Word to the wise: just because Blender shows a nicely positioned texture doesn’t mean that UV coordinates actually exist for your object.)
Now I can finally start trying out other parts of Unity. Thanks for the help so far!
FYI, the documentation under “The Blender Documentation Project” is exactly the same as the contents of the Official Blender 2.3 Guide with the exception of a few minor fixes to typos and such.
I haven’t used Blender for a while, so the book may not be exactly up to date. I think it was written for version 2.32 which doesn’t sound like it was that long ago, but there have been a lot of improvements in Blender since then. Still, this was a great source for the basics.
At the moment animations are not imported from Blender. So if you want to do character animation in unity right now you have to use one of the following tools:
Maya, Cinema4D, 3DS max, Softimage XSI, Motionbuilder, Lightwave and various others that have an FBX exporter.
So do you mean we cannot import ANY kind of animation from blender? Or do you just mean skinned character animation? Because if it’s all animation, I am screwed as I can’t afford any of the other packages right now (maya, max, etc.)
Hmmm… (scratches head trying to figure out what other jobs to get to pay for maya)
I would like to do full character animation, but that is going to be a while yet anyway, but what I would like to do now are really basic character animations (simple animals, etc) and object animations (tech objects, large, complex, animated objects).
Now for most of these I can script the animations, but for most it would be H-E double hockey sticks.
Any ideas? Or should I look for another job?
-Jeremy
Can blender export animations in a format C4D or Maya can open and re-export as an FBX or mb file? If so I could do the conversions for you for a few of the more complex ones that you can’t animate through scripting. Jeff
Thanks, I might take you up on your offer in the future Jeff, if you don’t mind. Blender exports .obj .lwo and a few others with plugins I guess. Don’t know if there is a maya or C4D plugin for it.
I don’t have the animations yet, (still learning blender) but most of the ideas I have require animation that is either impossible or very difficult to script and get right. If blender wasn’t going to work I didn’t want to spend the time learning it. :?
I am used to using maya so blender is… “interesting” to learn. :shock:
As blender is not fully supported, any suggestions about which package I should learn in the future for use with Unity? Or is blender going to be supported soon?
I on the other hand am learning C4D and Maya and still don’t know how to animate (at least for games) in them. But I’d be happy to try get animation from your Blender files and into files Unity Supports. As for Blender support, keep bugging them for FBX export, it could help, and I think OTEE has plans to improve its support also, but as we all know they have a lot to do. Jeff
I have used Maya a fair bit for modeling and animation (basic stuff) and I really like it. The problem is the $$$, money I’d rather spend on Unity pro.
Thanks for the offer, I’ll contact you when I have something to convert
I import my model, and it’s rotated 270 degrees for some reason.
Mindful of the “get your assets right” mantra, I rotate the object in Blender, reimport, but there’s no effect?
Tried to right-click the model to access Import Settings, because I think I read somewhere that you can “pre-rotate” a mesh that way but a window simply flashes into existance and disappears?
If I rotate the instantiated object to fix it, then I apply a simple translation to the object’s transform, if I’m interpreting the movement right it doesn’t translate in world coordinates, but rather relative to it’s own local coordinate system. I’m pretty sure I can figure this one for myself, but a one-word hint would save me time (forgive me… I have a cold, can’t work any more tonight, only 9 days to go in the trial period!)
You have to do the rotations in edit mode, not object mode, so that you are actually editing the mesh. I guess Unity doesn’t account for the rotations in object mode. D’oh
I don’t think Blender files have any import settings at the moment, and the window flash that you see may just be the Blender window starting up to reimport your model.
There are different ways to translate.
The default is in local space. Do a transform.Translate(whateverVector, Space.World) for world space.