Trouble in Blender exporting to X3D

Discussion in 'General Discussion' started by GarySG, Aug 21, 2014.

  1. GarySG
    GarySG Member
    Many times in the past I have successfully exported files out of Blender to the file type X3D which saves color without having to utilize a ZIP file and all that nonsense. In this case, however, I have unintentionally set all of the materials assigned to objects in the Cycles engine instead of Blender Internal. Keep in mind that I'm not using any textures, or vertex paint, just single colors assigned to each object (which intersect to become just one shell when uploaded to Shapeways). When exporting to X3D out of cycles, all color information is lost, yet when I try switching back over to Blender Internal, the materials don't seem to show up there either. When I change the shading display to GLSL, the correct colors appear, however exporting it out still fails to preserve the colors. I'd rather not completely start from scratch in Blender Internal, as I'm working with over a hundred objects.

    I'd be grateful to anyone who can offer advice, and if you'd like to see the file I can send it to you individually.
     
  2. numarul7
    numarul7 Well-Known Member
    Report it like a bug here https://developer.blender.org/maniphest/project/2/type/Bug/ and maybe a developer give some solution to it.

    That exporter was made when Blender Internal was main use and ...you use it with the new stuff.

    Fill a bug report with your problem encountered , because I`m scratching my head too and remember that Cycles it is still new like 1.6 months.
     
  3. mkroeker
    mkroeker Well-Known Member
    Can you post a sample x3d file (make it something simple if you do not want to make your actual design public) ? X3D files are readable, so it may be possible to fix them if they contain multiple color definitions or something like that.
     
  4. AmLachDesigns
    AmLachDesigns Well-Known Member
    It all sounds a bit strange. Cycles (afaik) just controls the way the image is rendered, not how the base information (in this case the colour values for each vertex) are stored. I have seen other posts about problems with Cycles and UV maps, but not with Vertex Painting.

    I don't think the Materials are specific to either form of rendering, so I'm surprised at what you report. Have you tried assigning a Material in BI (Blender Internal, aka Blender Render) for one object and making a test export to see if that one object is coloured?

    As @mkroeker says, a file or a bit more info might help.

    @numarul7, you may be right that it is a bug, but Cycles has been around since Rel. 2.61 in 2011.
     
  5. AmLachDesigns
    AmLachDesigns Well-Known Member
  6. AmLachDesigns
    AmLachDesigns Well-Known Member
    The plot thickens...

    I just created a new file in Blender (with the default settings) and set the render to Cycles.

    I assigned a Material to the default Cube, and changed the colour of that Material to Red.

    Without doing anything else, i exported to .x3d and uploaded that file to SW - result here http://shpws.me/vI4g
     
  7. GarySG
    GarySG Member
    AmLach what version of Blender are you using? Turns out I'm not on the latest, but instead on 2.67. When I attempted the simple cube with cycles material, I ran into the same problem, and I'll upload that file in this post for mkroeker. Shapeways is reading that it's a color file, it's just completely white. I'll try downloading the newest version of Blender and loading the old file in it, although who knows what new problems could arise from that. I'll try running the script in a little while, however turning off "Use Nodes" hadn't shown any results yesterday.

    Thanks for all the feedback!
     

    Attached Files:

  8. mkroeker
    mkroeker Well-Known Member
    Well, that file defines a white (actually light gray) cube. You could edit it in notepad or whatever and replace the 0.800 0.800 0.800 in the diffuseColor entry of the "Material" node with the RGB colors of your choice (1. 0. 0. for bright red) but I assume this could be quite tedious with your actual model.
     
  9. AmLachDesigns
    AmLachDesigns Well-Known Member
    2.69

    I would not run the script if your cube test does not work.

    I should say that in my test I did not alter the 'Use Nodes' value. And perhaps that I have never uses 'Cycles' before...
     
    Last edited: Aug 22, 2014
  10. GarySG
    GarySG Member
    The good news is, the model has uploaded in full-color.

    Bad news, I broke down and copied by hand the data for each color and re-entered it in Blender Internal. I certainly wouldn't call it a solution, but now I can hopefully move on and order it in full-color plastic, so in any case I'm ecstatic.

    A big thanks to all the helpful trouble-shooting from you guys, at least now I know to stay well away from Cycles.

    There are a few objects that disappear up when I upload it to shapeways, but the X3D file is correct so if that persists I'll make a separate post for it.

    Resilient Heart.PNG
     
    Last edited: Aug 22, 2014
  11. mkroeker
    mkroeker Well-Known Member
    Correct when viewed outside of Blender with a viewer such as view3dscene ?
    Objects disappearing could mean objects turned inside out (wrong point sequence of triangles, so normal points inward) or objects not attached and too small or too thin to survive on their own (which might be what happened to the decorations in the hilt)
     
  12. GarySG
    GarySG Member
    I have it open in View3DScene, the jewels are where they should be, is there any way I can check if they're not actually connected? The two swords are identical so it's weird for something to effect only one of them.
     
  13. mkroeker
    mkroeker Well-Known Member
    Nothing apart from zooming in and hoping to see a small gap unfortunately. You could load the x3d in netfabb just to see if its analysis finds something to complain about (and/or just see how many separate shells it finds)
     
  14. mkroeker
    mkroeker Well-Known Member
    Another idea - do you (not) see the missing jewels in both the old-style (slideshow-based on blueish background on model page) and the newfangled WebGL-based (upload page and Edit Model page) rotatable renders ? Just in case it might be a texturing bug in one or the other...
     
  15. GarySG
    GarySG Member
    I copied over the sword that wasn't losing it models and it has finally loaded perfectly without any flaws. Thanks again!

    On a side note, Netfabb made a real mess of my X3D file when I loaded it. An "identical" STL I exported acted fine, so perhaps Netfabb is no good with X3D files?
     
  16. numarul7
    numarul7 Well-Known Member
    I still recommend to report this behaviour like a BUG , developers can check what it is happening to the exporter script (it is damn old) in conjunction with Cycles.

    Export scripts some of them can give this type effects ... if not reported they are not fixed. So if it is happening to 2.67 and in latest 2.71 report it like a bug.

    I can`t file report in your place. And that exporter must work even when you set materials in Cycles the fact it is not working means it must be updated.
     
  17. AmLachDesigns
    AmLachDesigns Well-Known Member
    It's not happening in 2.69 and we don't know that it's happening in 2.71.