Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Blender <=> Unity Problems...

Discussion in 'Asset Importing & Exporting' started by bigkahuna, Oct 10, 2006.

  1. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    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:

    1. 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).

    2. 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?

    3. 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.

    Has anyone else run into these issues?
     
  2. polytropoi

    polytropoi

    Joined:
    Aug 16, 2006
    Posts:
    681
    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...
     
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    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 :(
     
  4. polytropoi

    polytropoi

    Joined:
    Aug 16, 2006
    Posts:
    681
    Thanks! I'm gonna bounce off that french guy JMS, seems like he wrote that script...
     
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    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?

    --Eric
     
  6. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Tried that. Didn't work :(
     
  7. GusM

    GusM

    Joined:
    Aug 27, 2005
    Posts:
    585
    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.
     
  8. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    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.
     
  9. VeganApps

    VeganApps

    Joined:
    Jun 30, 2006
    Posts:
    263
    Anyone has problems to import a blender scene with one object which has more than one material (ID) ?

    I am pretty new to Blender... so I am not sure if it was my mistake or not.