I am sure there gotta be a trick about bringing models from Blender to Unity 5, lightmapping-ready.
Could you please point me to a tutorial or explain what needs to be done prior to exporting to FBX in order to get lightmaps baked properly in Unity ? (or bake non-directional lightmaps in Blender and bring them / set them up in Unity)
I have no experience baking lightmaps in Blender and then bringing them into Unity. I don’t believe Unity really “supports” this. You can use an externally-created image as a lightmap, but you’ll probably have to modify a shader to use one UV set for the textures and another for the lightmaps.
The progress bar in the bottom right stops altogether? At what point? Baking lightmaps takes a long time–ten minutes for low quality lightmaps on a simple scene on my laptop. Are your computer specs really low? Have you tried baking lightmaps on a very simple scene (one cube and one light) with the quality settings turned all the way down?
Oh wow… That sucks My PC is old, but I can bake decent quality lightmaps with bounced lighting in a reasonable amount of time for Quake 3 maps using q3map2 compiler. And that is an ancient tech. I can’t believe Unity is that slow when it comes to baking lightmaps
Quake 3 is 16 years old, while Unity 5 uses modern physically based shaders (unless you’re using Legacy shaders for some reason). It’s like the difference between an ancient form of BI and new Cycles, so Unity will take longer. But when I said “simple scene” I meant a map that happens to be simpler than my others. It’s still got a few hundred static meshes, dozens of lights, and I use directional specular maps. It’s not an unreasonable amount of time. Just be sure to turn your settings way down for testing purposes.
Well, Cycles is faster than BI. So following the analogy, Unity should be faster than q3map2 and yet somehow it’s not (it seems that I am clearly doing something wrong, cos I have 1 point light in the entire scene; but 1 complex static mesh)
Do you know of any clear-cut tutorials about lightmapping in Unity 5 ? (with description of settings and such)
You need a REALLY beefy GPU to get a benefit over BI. My Pentium 4 (2004) is faster with BI than my GT 620 (2012) on Cycles with over 50 samples.
I am not sure. I just open lightmaps middle tab and hit bake.
The auto tick mark is right next to the build button. If even simple scenes won’t bake at all, and you never get a progress bar in the lower right, then make sure your computer’s specs are high enough. Otherwise I have no idea what’s going on.
I’m also having some problems importing (ie, drag&dropping) a blend (2.76) file into unity (5.2.x). It’s quite basic, actually, compared to some issues discussed above, so please bear with me while I abuse this thread…
Ok, so the model/mesh/geometry seems to imported correctly, although we may want to check the up/forward-axis-thing (Z/Y). Also, unity uses a ‘left-handed’ coordinate system, right?
Anyway, it seems to get really cumbersome when trying to import your blender materials into unity. The only thing I got working so far is a basic diffuse shader. Other properties (eg, specular) don’t seem to work, unless I’m missing something. Or textures, anyone? Also, could it be that defining your materials in BI works better than in Cycles in this use case?
Btw, the idea is to have these material settings imported without having to manually remake every blender material in unity – which is highly undesirable. And when I did drag a texture onto the unity material Albedo map, the uv’s appeared to be wrong.
Unity does not support importing materials from blender. The only thing that supports is the diffuse color. So no matter what settings you are using in blender for your shaders/materials, only the diffuse color will actually be imported with the model, assigned to the standar shader (Unity’s default shader). You can import the textures from blender to unity with the .fbx file, but it requires a bit of folder and naming managing. I don’t think I can post links, but if you google “materials and textures from blender to unity”, you will find your answer.
If you want to import specular properties, then you have to bake maps (same with occlusion and normals).
Also, assuming we are talking about a single model, a hose for example and not a village, you want to apply Location, Rotation and Scale before exporting the fbx. Location and Rotation should be 0 and Scale 1. You want to check the up/forward axis, because if for example you are trying to move a character via script, your axis will be wrong, since for blender Z is up and for unity Y is up.
I managed to export static meshes from Blender to Unity. Materials export, but textures have to me manually assigned. Although I am satisfied with bringing static models from Blender to Unity, I think I will be back here when I will get to animated models