Blender and .objs

Hey guys. Moldy here on Donshoo’s comp. I gots a question for you. I exported a blender file to a Wavefront OBJ, and it made a mtl file with it. I assume that that has all of the UV settings, but how do I use that on the model in Unity? Any help would be appreciated. n_- Thanks,

-Moldorma

Unity doesn’t import the UV’s of an .OBJ file, this is a reported bug in Unity 1.5. Save the model as a .blend instead. Also, AFAIK Unity does not support Blender materials, so you’ll need to create those in Unity after the model is imported.

Saving as a .blend kills my UVs as well. And I can’t just reassign them because it says there’s only one color for the entire model.

Huh? Are you sure? I’ve imported a dozen or so Blender models and never had this happen. Unity doesn’t import “blender materials” but it does import UV’s from Blender. Have you been using Blender for a while? Maybe you’re doing something wrong…

I just got proficient w/ Blender recently, but if I import a .blend into Unity it imports with 3 things. A Camera, a Light Source (both of which are incompatible with Unity, but Unity has its own versions of those), and the model, which is simply named “Sphere”. “Sphere” has one material on it which defaults to Grey.

When you start Blender, get rid of everything in the scene, and then do File → Save Default Settings. (Anything that’s in the default settings gets imported, as you’ve discovered.)

–Eric

So what do I do for models that I already made before learning that trick?

Just delete any lights or cameras in your Blender scene before you save it. To delete, just right click and then press the letter “X”.

Or if you don’t want to do that (you may want them in the scene to bake textures for example), just delete the lights and cameras from your scene in Unity.

I always do that after importing a .blend. It doesn’t suddenly let me assign textures to stuff then though. :?

Me on Donshoo’s Comp again. :stuck_out_tongue:

Here’s a pic to better illustrate what I mean. The whole model comes in from blender as only 1 mesh, with no UVs. And only one assigned texture. :frowning:

OK, I think I figured out what you’re doing wrong:

What you see in Unity is that all your character’s “parts” are all part of one object. And what you want is to have each of the different “parts” as different objects, right?

I’m guessing what you did was to add one sphere from the “object mode”. When you did that, Blender automatically opens the sphere in the “edit moder”. Then you continued to add more spheres and other parts while still in the “edit mode”. By doing this all you did was add more meshes to a single object. Follow me?

So what you need to do is one of 2 things:

  1. If you want to start over and model it all over again, make sure that every time you add a “part”, you go to the menu in the middle of your screen (see picture below) and go back to the “object mode”. If you want to add mesh to an object, right click the object and then select “edit mode”. If you want to add a new object, go back to the “object mode”. Got it?

  2. If you want to fix this Blender project, just right click the object and select the “edit mode”. Then in the mesh mode, select all the faces you want to move to a new object and press “P”. Repeat this for each of the new objects.

It’s not a problem with Blender, it’s just the way Blender does things. Once you’ve learned how Blender does things you’ll be set.

i was thinking the same. i haven’t blended in a while. it’s such a great app! but i’ve been busy with lightwave and with the same results - you have to take care on how you organize your objects. if they’re all one, they’ll come in as all one. in lw it’s pretty much about layers.

btw bigk… nice gui! or maybe not. is that the new standard or did you config? like i said it’s been a while - yeah since 2.3! that thing sure moves fast! especially for opensource. bet it’ll be the end all soon! don’t know if you’re a zbrush fan but a fella posted a nice gui for it recently. will blender let you share gui configs?

I like that gui too, it’s the “hexagon 2” color scheme, I found it on blenderartists.com. There are a bunch of other color schemes and window configurations there, and like everything else in Blender, they’re free. Basically, these themes are Python scripts, if you can’t find it drop me an email and I’ll send it to you.

I never really got into Zbrush (though I often wish I had), but you’ll be interested to learn that some of Zbrush’s functionality is now being built into Blender: topo brush, z-spheres, displacement map generator, etc. It’s all in alpha stage at the moment, but I gave it a try last week and it’s super easy and super fun to use (there’s a link to the UB build on blenderartists.com). If you check my past posts here at Unity you’ll find some links.

Although I have other tools, I keep on going back to Blender.