Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

3D model from Windows 3D Builder into Unity with it's colors?

Discussion in 'General Graphics' started by Jip1912, Jul 11, 2017.

  1. Jip1912

    Jip1912

    Joined:
    Mar 13, 2015
    Posts:
    314
    Hi,

    I gave a 3D model colors in the program ''3D Builder" from windows. When all the colors where applied it looked like this:



    When I save the file in Windows 3D Builder, I can choose between 3MF format, STL format, OBJ format and PLY format.
    - When I save it as 3MF format, I get a 3MF file and a MTL file.
    - Saving as STL just gives me a STL file.
    - Saving it as OBJ gives me a OBJ file, a MTL file and also I have to save all of the colors.
    - Saving it as PLY gives me a PLY file and I have to save all of the colors.

    I tried multiple things to put the model into unity with it's colors, but I only get a fully white model in Unity. How do I add the model into unity with it's colors?
     
    Rexoto-Games likes this.
  2. Dorodo

    Dorodo

    Joined:
    Mar 8, 2015
    Posts:
    43
    Although I'm not familiar with Windows 3D Builder, it looks like the software is applying colors via vertex information. If that is the case, you would need a shader which outputs that vertex color information into your albedo.

    However, I'm not 100% sure, but I don't recall OBJs saving vertex data at all (which makes sense since you said something about having to save all the colors separately). In that case, I'm afraid you'd have to use a software like Blender or Maya, add the colors in there, and export it as an FBX file (which does save that information alongside the model).

    It doesn't look like unity supports the other formats you mentioned, so even if they did store that information, there's no way you'd be able to load them in engine.

    If you're curious in how to do that in Maya, here's a really good talk that goes a little bit more in-depth on the topic.

    Cheers!
     
  3. Jip1912

    Jip1912

    Joined:
    Mar 13, 2015
    Posts:
    314
    Thanks for the reply. Is there really no other way? For me, it's to hard to paint in Blender and Maya, I tried it. This is just much easier and I can't get this result with blender or maya..
     
  4. Jip1912

    Jip1912

    Joined:
    Mar 13, 2015
    Posts:
    314
    I got it to work! The trick was to first import it into Paint 3D and export it to FBX from there, It's weird that you can export to FBX from Paint 3D, but not from 3D Builder.
     
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,999
  6. Supergeon

    Supergeon

    Joined:
    Jul 12, 2017
    Posts:
    1
    So, I'm having the same problem.

    - Import OBJ
    - Paint it
    - Export as 3MF
    - Import in paint 3D
    - 3MF is all one color

    Paint 3D doesn't allow me to paint certain areas of my object.

    Unity only uses fbx and obj, I can't color obj files!

    How frustrating, not user friendly at all!
     
  7. Jip1912

    Jip1912

    Joined:
    Mar 13, 2015
    Posts:
    314
    Why doesn't paint allow you to do that, could you send a picture?
     
  8. Jip1912

    Jip1912

    Joined:
    Mar 13, 2015
    Posts:
    314
  9. someguywithamouse

    someguywithamouse

    Joined:
    Mar 25, 2018
    Posts:
    9
    When you export as an OBJ file, the colors are not stored within the model, only the seperate peices, the polygons that shape them, and which material covers which polygons. If you want color after importing it into Unity, you need an MTL (material) file named after the model's OBJ file. This holds all of the different materials and surface types.

    When you export an OBJ from 3DBuilder it will also save an MTL file with it (if you don't just click cancel, anyway.) You just need to import this MTL file into Unity and assign it to the mesh.
     
    Jip1912 likes this.
  10. LarryTheBrave

    LarryTheBrave

    Joined:
    Nov 20, 2016
    Posts:
    24
    But the .mtl file that gets exported is blank except for 1 line saying Builder exported it. The only way it seems to deal with this is export .obj, load in blender, edit the mesh and optimize seams for UV mapping, UV unwrap, export UV outlines, open that in Photoshop, make a layer for painting, export all but that layer in PNG or JPG, and load that in blender, and export that as .fbx. Alternately try to bring the resaved UV map and the model into Unity. WARNING always make sure exported objects are at world center and 0 rotation or in Unity their pivot point may be way off.