Export from Blender w/ Textures?

Discussion in 'Design and Modeling' started by jmistri7, Mar 27, 2016.

  1. jmistri7
    jmistri7 Member
    Hi, I'm competing in a contest to make the best Minecraft model, and I've just finished my entry in Blender. I've tried a few file formats, but all of the ones I've been able to view do not include the textures. The only way I currently know how to include the textures is to export as an obj and use the mtl file that goes with it... but I do not think that Shapeways supports mtl files.

    All I want to know is which file type will allow me to include textures with my object and submit it to Shapeways just using one file.

    Native Blender File Types:
    - COLLADA (.dae)
    - Stanford (.ply)
    - Stl (.stl)
    - 3D Studio (.3ds)
    - Autodesk FBX (.fbx)
    - Wavefront (.obj)
    - X3D Extensibe 3D (.x3d)

    Thank you in advance. :)
  2. mkroeker
    mkroeker Well-Known Member
    Collada (.dae) and Extensible 3D (.x3d) (also VRML2 (.wrl), the format preceding X3D).
    With Collada the texture will probably be embedded in the .dae file, with wrl/x3d you will get a separate texture file in png,jpg or gif format that needs to be uploaded in a zip archive together with the .x3d.
  3. jmistri7
    jmistri7 Member
    I exported as .dae from Blender and re-imported... the object had the right shape but was completely black. When I export as .x3d, it does not have an image that comes with it... how do I get it and what do I name it?

  4. mkroeker
    mkroeker Well-Known Member
    Can't help with Blender unfortunately, but it looks as if the texture is not yet associated with (UV mapped to) the model geometry, else I would expect Blender to export it automatically ? Try looking for a blender texture tutorial on youtube.
  5. jmistri7
    jmistri7 Member
    I exported as .x3d successfully and re-uploaded to Blender, and it worked. I then uploaded to Shapeways, and it said the texture was missing, so I included the texture and the file in a zip and uploaded that, which worked. The 3D viewer shows my object, but now it doesn't show the texture, even though it uploaded successfully. I read this, and triple checked that everything I had done was correct. The FAQ's didn't help. What is wrong? Do you want me to upload the zip and send it to you?

  6. mkroeker
    mkroeker Well-Known Member
    Most common errors at this step are having the zip include a folder instead of just the plain files, and having a full local file path instead of just the plain name of the texture file in the ImageTexture entry of the x3d. If you upload or PM the file I can take a look.
  7. mkroeker
    mkroeker Well-Known Member
    (Turned out there was both the expected texture and a plain color material defined on the object - these are additive in vrml/x3d, and the material specification also declared the object to be fully transparent.)
  8. mygadgetlife
    mygadgetlife Well-Known Member
    To add to the responses so far, this is what I do: export the model as .x3d, then take the .x3d and any textures (JPGs PNGs) used by your model and Zip them up, then upload this Zip file.

    So my Blender workflow would be something like this:

    First, make sure the model (.blend) and the image files are the same folder. This is very important. Then:

    Unwrap model
    Load image into UV editor - do what you need to do here
    Go to the Texture pane
    Create a New texture - type should be 'Image or Movie'
    Go down to Image and click the picture icon, then choose the image loaded in the UV editor earlier
    Go down to Mapping and change Coordinates to 'UV'
    In the 3D view, choosing 'Texture' in viewport shading options should show the textured model in the edit window.

    Now export the model as .x3d
    Select the .x3d and the image file and zip together.
    Go to Shapeways and upload the .ZIP file.

    Anyway, good luck and let us know if it works out!


    gonzaleztennant likes this.
  9. Works! It's good to know though, that it works only with blender internal material and texture (what one could know, because of the settings mentioned above, but anyways) - it does not work with a cycles material, even if it has only a diffuse shader with a texture. But thanks for the detailed description here!
  10. bluepixieart
    bluepixieart Member
    Hi, I've been trying to upload a model to shapeways for the past 3 days now, ive exported to x3d from blender, ive done all the steps above and tried methods from other users online as well and nothing is working. the error usually is "model failed during repair" but uploading the exact same model on its own before i had the texture applied works fine. so i know its nothing wrong with the model itself. is there anything i could possibly be doing wrong? all the posts ive seen for troubleshooting ive tried all the fixes i can find to no success

    I dont want to have to print the model without its texture i cant afford to print it many many times just because the zip file wont work.
  11. mkroeker
    mkroeker Well-Known Member
    Make sure that your texture is in one of the supported file formats, check the size of your texture (try a small one just to see if it passes), try uploading the same file elsewhere...
  12. bluepixieart
    bluepixieart Member
    the first thing i checked was if the texture was supported. I made the texture after looking at supported files. its a png and ive tried with a jpg also. ive also tried smaller textures and it gives me exactly the same error.
    the error always just says theres a problem and to try again in a few minutes. ive been trying for three days
  13. platonicgems
    platonicgems Active Member
    Have you ever tried uploading any other color models before? If this is your first model, you might have issues with UV mapping and exporting. I can’t help you with Blender, but I’d recommend creating a simple primitive object, a cube for example, and uploading it to SW. Check if everything works as expected. Does Blender support VRML97 export? Try this one too.
  14. bluepixieart
    bluepixieart Member
    tried exporting with VRML97 and that didnt work at all the file sizes were too big. x3d uploads on its own but not with the texture in a zip. ive been working as a 3D modeller for 4 years now so i can safely say theres nothing wrong with my UV mapping. it works in many other programs this is the first program that ive had a problem with. as i said above, the upload works fine its just uploading it in a zip folder with the texture that it struggles with. and when i upload it as the x3d on its own it says it cant find the texture so i know the x3d file knows theres a texture involved but put it in a zip folder with the texture like instructed and like everyone else has suggested and i get the same error that theres a problem with the upload and i should try again later. i have the model uploaded without the colour but that isnt want i want. im not paying for half of what i want
  15. platonicgems
    platonicgems Active Member
    Can you export Blender file to another program that works and just export it from there?
  16. bluepixieart
    bluepixieart Member
    the only other program i have is the 3d builder that came with my PC from the windows store. i can import to there just fine and i exported to an stl file to test in shapeways and it uploaded fine, but that program doesnt export to x3d or VRML97 or DAE which are the only 3 file types that support colour printing for sandstone. blender can export to dae but the file is way too big for it to work

    when i said that i meant ive exported models from blender to use in Unity and other programs like that since i studied game design so i had to do those things. exporting it to use in a non modelling program is what i was referring to. i only have 2 modelling programs, blender and windows 3d builder.
  17. platonicgems
    platonicgems Active Member
    It looks like you are stuck with your model. I can have a look later today and try exporting it from my software if you DM it to me in .OBJ format with UV texture file.
  18. mkroeker
    mkroeker Well-Known Member
    quoting my younger self
  19. bluepixieart
    bluepixieart Member
    the zip just has the x3d file and the png texture. thats it. no folders have ever existed within the zip file. and as for uploading it, i dont feel comfortable doing so as ive had work stolen in the past. im sure you can all be trusted but for my own sanity id rather not. ive looked inside the x3d file within the code, the texture is being displayed as other sources have stated. so the x3d file knows it needs the texture. the texture is there in a supported format and they are the only 2 files in the zip. no folders no nothing. im too particular to accidentally put it in a folder. i read shapeways instructions before even exporting it so i followed them to the letter. the only thing that does confuse me in the x3d file is that where it defines the texture it defines the path to it. would that be the reason that its not working? because if so then shapeways' settings are flawed because not everyone is going to know how to rewrite code nor are they going to want to. ive been in the industry enough to know better and save backups but thats irrelevant.

    all i want is an answer that works and isnt something previously suggested as believe me ive tried every suggestion on this particular forum before and none of them have worked. my model uploads to unity and other engines fine the texture does also. ive been doing it the same way for 4 years and had no problems so i know that my modelling, uv unwrapping and exporting are fine so it must be something within the x3d file hence my suggestion that it may be to do with the texture path being defined. can anyone tell me what this particular line of code should look like?

    (ive changed the directory and file names for privacy sake. but you get the idea.)

    <ImageTexture DEF="IM_texture_png"
    url='"texture.png" "E:/Users/me/Documents/folder/model/texture.png"'

    should it be in that format? the url in particular is what im thinking may be the problem but no one has even suggested its in the way that the code was exported ive just had suggestions that its my modelling and general skill at unwrapping that is the issue. I know its nothing ive done as ive studied and been to college to learn this stuff. immediately doubting the model itself all the time isnt helpful to me. i need a deeper solution as thats most likely the issue here as its never had a problem anywhere else.
  20. mkroeker
    mkroeker Well-Known Member
    Please try removing the "E:/Users/me/Documents/folder/model/texture.png", or at least change it to read just "texture.png" as well. (While you are there, check if there is a Material node with a diffuseColor setting on the same level - while this does not affect printability, it could make the texture appear lighter or darker than intended as the VRML and X3D standards allow texture and plain color to coexist.) A useful freeware tool for checking VRML/X3D models is view3dscene.
    (Edited to add: ... though this probably would not have helped to identify this particular issue, as the texture path is "correct" for your computer (but only there). )