I’ve been working intensively with Blender and Unity the last several days and have run into a number of issues that I’m hoping are things I’m doing wrong and not bugs:
I’ve already reported the mysterious “growing .blend” problem and have reported it to the Blender devs. Because of this problem, I’m looking for alternative methods of getting files from Blender and into Unity (since my over bloated .blend’s were crashing Unity).
I tried the latest Collada export scripts, but when I tried to import this into Unity I get an error “Unity did not import file”. Anyone else run into this?
Next I tried exporting with the Wavefront .OBJ exporter, but when I import the file into Unity all UV information is lost. I imported the same file into Carrara, which showed that the UV info was there. I then exported as a .FBX from Carrara, and although the model was 1/100th it’s normal size (which may be an issue with Carrara), it’s UV information was intact.
I’m having the same problem - I see your bug report, kahuna, and your recent thread at the blender forums re texture baking (very cool stuff), but these blend files are getting too big to import - any workaround yet? Is it just storing temp stuff in the blend file, do you think?
BTW, I see the same “growing blend” problem on Windows and Intel Mac…
I’m pretty sure the problem is being caused by the texture baking script saving temp files to a folder that is internal to the .blend file. I tried setting the temp file folder to a different location, but it doesn’t seem to make a difference.
To work around this I’m saving two copies of my .blend: One (my working copy) I keep external to Unity’s assets folder. When I get it to a point I’m happy with, I create a new, empty .blend and “append” the objects from my working copy and save this .blend in my Unity assets folder. So far (fingers crossed) this has been working.
I’ll also note that this “growing .blend” problem doesn’t happen all the time, only when I use the texture baking scripts. Once I’ve completed that part of the process and saved my “clean” file, I can do other minor tweaks without further headaches.
Although I’ve found a work around, it’s really slowed down my workflow. Consequently, I doubt whether my next project will involve Blender
I haven’t used those myself, so just a guess: is it maybe packing the textures and stuff into the .blend file? Have you tried the File → Unpack Data… menu item?
Texture baking scripts in Blender sometimes causes that a new camera and new meshes, used by the scripts for rendering the textures, are not deleted once finished the baking process. This should be causing the problem you describe here. Those objects should be in a disabled layer, just look for them and delete, then save.
Or save before backing, then bake, and close without saving. As far as you got the texture saved externally by the backing script, you just need to import it again and it will fit the model.
Thanks Gus, but I don’t think that’s the problem. I don’t think 1 camera and 1 mesh would be causing files to grow by 20+ MB. I can’t say for sure, but I believe the problem is that the temporary bitmaps the texture baking scripts create are somehow being saved -inside- the .blend file. I actually saw this one time when I stopped the render process and used the file-selection window in Blender. It was directed to a non-existent /temp folder -inside- what appeared to be the .blend file. The long list of bitmaps appeared in blender, but a search of my hard drive turned up nothing. Incidently, “UV CAMERA” and “UV MESH” are on the very last layer, #20 I believe. (FYI, if you select this camera, then press “Zero (0)”, you’ll have a flat view of your UV Map that can be rendered to a texture (F12) and saved (F3). I do this manually now rather than re-running the script and having my file sizes continue to grow.)
Your second suggestion is a good one, and will definitely work.
At any rate, I checked the bug tracker and Ton has been assigned to investigate. Hopefully he’s able to sort it out.