Blender to Netfabb curiosities with scale and normals

Discussion in 'Software and Applications' started by bullotsky, Dec 2, 2013.

  1. bullotsky
    bullotsky New Member
    Hi there,

    I have a model which I'm exporting from Blender to Netfabb and I must say that the process so far is infuriating.

    First thing is first though: my process in Blender. I've switched to metric units. All of my model has a 1, 1, 1 scale and I'm using mm to judge size. That should be it for the unit sizing between Blender and Netfabb. Dimensions in blender: X = 3.196cm, Y=5.12cm Z=2.676mm. Yet when I import it into Netfabb my X=.03mm, Y=.05mm and Z is not readable. What the heck is happening? I know that you can scale it to what you want in Netfabb but it seems important to me that the two programs match up.

    Here are some other questions hopefully someone can help answer:

    1. Why does STL mess with Blender's triangulation? Why doesn't it just import the nice triangles that Blender already exported in the first place? When I look at the STL triangulation it is a total mess!

    2. Why am I getting holes? What is the cause of that? Because it came out clean in Blender.

    3. My normals out of blender are correct so what is invalid orientation and what causes it? During analysis it says I have 0 flipped triangles but during repair it says I have like 93,589 with invalid orientation! (Actually I think I found a bug because I would repair it, click update, and it would say that I had invalid orientations but then I would click "Auto Update" and invalid orientation shows 0.)

    4. Are shells bad? I had one, repaired my holes, and now I have no bad stuff and all good stuff but 773 holes EDIT: 773 Shells.

    5. Lastly, I have one part of my model that comes to a point but it is supported by pretty thick model. Silver and Brass state .8 mm wall thickness. Everything else is basically thick enough except for that one part and it goes from 1mm gradually but quickly to .539mm. Do I have to fix it or can I get away with it? I have an idea for it if I need to fix it but I'd rather keep it the way it is.

    Sorry for my noobishness. I'm sure that everyone is going to say "Read the manual" or "Make sure you search before you post" but this is one of those things where it seems individual for every individual and for a first time print this can be nerve racking if you are throwing down $100.



    Last edited: Dec 2, 2013
  2. stannum
    stannum Well-Known Member
    0. Maybe Blender is playing dirty tricks behind you. They added units, but not clear how what it does in the backroom. Imagine it stores 1 metre = 1 internal unit, and the exporter knows nothing about that so your 3 cm is stored as 0.03 (without units, that is how STL works). Then Netfabb reads the file as mm (default?) and everything is 1000 times smaller (and worse, you got precision errors sneaking it).

    1. STL only supports triangles, Blender can do quads and in later versions ngons. They could be backfiring or a bug is having a field day. Try to load the STL back into Blender to see what it exported. Even quads can be split the opposite you want, and when talking about overlapping solids, that can give difference between one result and another.

    2. Flipped normals? Unconnected faces? Internal faces?

    3. Internal faces causing havok?

    2 & 3 could be caused by newest tools (bugs), unproper use (some things will give you faces... and edges) or even ngons (yes, kids, ngons are just a group of triangles, but hidden from user view, ready to bite if you let them, they are like quads on steroids).

    External tools should not be needed if you tame Blender to behave. Old 2.x versions were pretty capable of generating printable models.

    The best way to end with something printable is to know, at any momement, that the mesh you have is what you really want and not more. As soon as one thing slips, it's nightmare from then on. Any left over edge, vertex or face, misaligned data when it should be spot on in the same place so it merges, etc... being caused by improper use of the tools or by bug or by "this tool works like this, you can clean it up later" is recipe for disaster. Never let "problems" pile up, they will get worse exponentially.

    (rant)And yes, with Blender that can mean extra work or going insane: they added ngons, but a simple tool like ngon counter is not in the same place than the rest of information (bad design... to make it worse it seems to be a non updated extension now), for example. Sad trend of imitating and making things pretty but unfinished instead of useful even if boring. Now it's so flexible, with so bare bones defaults and so many extensions, that it "keep" shape like a rubber chicken. It's like a new gadget "as seen on TV" versus an old CnC machine "that just keeps chugging along".(/rant)

    If aeron203 can rant about print quality methodology, why not rant about program design. ^_^
  3. bullotsky
    bullotsky New Member

    Thanks very much for your response. I have gone through all of the Blender checks and balances, from mesh lint to the new Print 3D features and what I do know is that I have no ngons, no manifolds, internal faces, or unconnected polygons. I have no overlapping geometry or open mesh but there are some other things I need to check out. What I can tell you right now is what is being redflagged in Blender:

    1. I have Zero Faces. I really don't understand what these are though.
    2. Thin Faces. Again, I don't understand what these are. The thickness of my entire model is fine except for one spot.
    3. Overhanging Faces. I think I get this but the model is a series of tubes that lay flat. As far as I have read, that shouldn't be a problem, right? Or do I have to flatten the back of every jewelry pendant I make?

    Regarding the triangles, you can triangulate the mesh before it is output to STL which is why I was baffled at the way the STL is presenting them. Blender already had the triangles calculated nice and neat and none of them were in quads.

    I understand this is new and frustrating and exciting at the same time. Thanks for your answers and I hope I can figure out what I need to clean up. I want these to be awesome christmas presents and not crumble because I was a dumby.

  4. stannum
    stannum Well-Known Member
    Zero Faces means you have faces where one edge is zero lenght. No idea why they call it that way, had to check the docs, the classic term is Degenerate (which is the name of the button... yay, you click Degenerate, it reports Zero, way to link the results to the invoking controls, kick to the mental model). Imagine you have a triangle, and you move one vertex to the position of another one but still keep both, thats a degenerate triangle, area is zero (and a degenerate edge, zero lenght, two vertices in the same spot).

    Thin faces could be useful if what it sounds to be. It should be called thin areas then, faces are by definition "non thick", zones of mathematical planes. Tried it with random model, cut and distorted cube... reported one face but no clue of how that one is thin. It was a ngon too (sneaky bastards).

    Overhanging can be ignored at SW, that is for when you operate a printer, it means faces need support.
  5. bullotsky
    bullotsky New Member
    Again, thank you very much! I'm baffled at the zero faces because where it is reporting them there is only one polygon per 4 vertices. Usually, Blender's indication would mean that I've doubled up my vertices having accidentally extruded and not realized it. However, this was box modeled and the entire model is being represented as Zero Faces. Again, these are just basically boxed tubes with each cross section only having 4 faces. I'll eventually "smooth" them to tubes with a subsurface modifier but that hasn't been applied yet. It's basically an art nouveau design making a pendent out of tubes or what you might call wires.

    I'm more worried about why I get weirdness after applying the subsurface modifier and then netfabb or the STL export is calculating everything as wrong. The reason why I'm more worried about that is because it is close to how Shape Ways determines whether you model is printable or not. I just don't understand why all the holes and invalid orientation errors are popping up. Yes, Netfabb can fix them but I'd rather them not be there in the first place!

    I"ve got everything in Netfabb corrected except the 733 shells error by using its repair tool. In the SW checklist this doesn't seem to be a concern. Is it?

    The model needs refining as I have individual pieces connecting and letting Netfabb boolean them together. I may get a cleaner model just connecting those pieces myself. This was my noob test to see if I understood the concepts at hand.

    I'm including the current blender file, the exported STL from blender and the corrected STL from Netfabb. Would anyone be willing to take a look? Maybe I'm just not understanding.

    Attached Files:

  6. AmLachDesigns
    AmLachDesigns Well-Known Member
    I think your choice of size of model and units and stl are not all working well together.

    Your model is very small in terms of Blender Units (B.U.). I know this makes sense, especially when you set the units as you have, but I think it causes problems for Blender when you then perform the operations you are.

    You are box modelling, as you say (and very nice it looks too), but then you are subsurface-ing to level 4. Firstly this level of detail is unnecessary, you will never see this resolution in a print especially one as tiny as this and secondly Blender has to make many calculations to create the new mesh, which are probably becoming messed up because of the small values. This may be compounded when the quad to triangle calcs are performed.

    I took one object (shell) from your model and exported it as stl. Netfabb said it was in error and would not let me zoom. In Blender I scaled it up by 1000, exported and Netfabb said 'no error' and showed it perfectly.

    I would not Subsurf beyond level 3, and at this scale level 2 is probably fine. This reduction in detail may even solve your problem.

    If you want to keep the metric units, try exporting to .x3d, but there may still be be calc issues.

    Try scaling your model up by 1000 with or without the units applied - as Stannum said stl files ignore units. When you upload to SW simply specify mm as units. Personally I use 1 B.U. = 1 mm and export as stl and it works fine.
  7. bullotsky
    bullotsky New Member
    Thanks so much for taking a look at this. I will keep it at level 3 subsurface for a model this small. I will also scale up by 1000 and switch to Blender units. I'm glad you were able to take part of it and get no errors. I knew the size was screwing something up

    I did read on SW that it is not dependent on units so that 1 blender unit can equal 1 inch or even 1 meter. I just happened by a CG Cookie tutorial and they said to switch to the Metric space. It looks like I may have to have a word with the Blender devs if possible. It seems that their metric space may be messed up. Either that or their exporter is mucked up. It's great that SW is not dependent on it though.

    Thanks! Both you guys have been very nice and generous. Hopefully it comes back around your way when you need help. You are going to make my brother's wives very happy since I'll hopefully get these before Christmas.
  8. stannum
    stannum Well-Known Member
    You have to set scale to 0.001 in the unit controls (or was 1000?), if you insist in using the unit system. And still no idea if it will play nasty tricks with precision and errors piling up (read about float numbers in computers if you want to learn more).

    Many other people don't bother, just work with BU around the obvious size. So for 3d printing here, use BU = mm as AmLachDesigns said, because most items will be smaller than 200mm and have details in the 0.01 range (limits imposed by cost and printer tech). Benefit is that you can see relations quicker, for example position 30.0145 4.0553 5000.05 instead of 3.00145cm 4.0553mm 5.00005m. But coders "seem" to know more than decades (centuries?) of people drafting blue prints.
  9. bullotsky
    bullotsky New Member
    Cool thanks! Yeah, I understand the need to use mm for small projects. Always work within your medium! If I were building a house I'd probably stick to meters :).