@doublebishop, support for all sorts of options like this is not especially hard to add, but I really rather focus on correct imports for 2.69 release targets - if file contains 1000’s of empties … for now Im afraid this is what you will get.
If you think it may be some error (like null objects used when they shouldnt be), I could check on a test file. But if other apps also load these empties, likely its behaving as it should.
Fair enough, I am just making suggestions that would help us out right now as we are on a project which requires FBX importing… so this importer / your recent fixes have come at a great time for us.
all i can say is that our recent navisworks & revit tests have all passed fine… I am pretty sure the extreme amounts of empties is not an error… these CAD programs usually do funky stuff when doing exports… I have a feeling it is the grouping & sub grouping system in navisworks which creates these empties…
I’ll keep an eye out on the extensions cvs mailing list & these boards for new developments, thanks again for this plugin!
@doublebishop, skipping empties which have no children is quite straightforward.
The reason I rather not add this now is that the empty may have children that rely on the parents transformation,
so! - you may want to pull in parent/child hierarchy - then remove some objects in that hierarchy but maintain transforms. … it can be done but starts to get a bit messy.
Doing this as a post process should be fairly simple though.
One liner in the python terminal (note, this is not optimal, for heavy scenes a more comprehensive script would be better)
[C.scene.objects.unlink(o) for o in C.scene.objects if o.select and o.type == 'EMPTY' and not o.children]
Edit, added support for fbx’s property-templates, r4685. fixed bug in loading bumpmap with blender-internal.
I understand why its needed… I just cant understand why autodesk have done it the way they have for navisworks exports… all the origins are at 0,0,0… all empties are at 0,0,0… so for these imports i am doing, the parent / child relationship doesnt really matter.
I think the reason why its taking ages to import at the moment is that there are probably a million objects trying to import… blender seems to slow down above 10k or so… so yeh i’ll let it run and then optimize at the end.
I may look into modifying your import scripts tonight if i get time… but yeh dont worry about this specific edge case… majority of the time people wont be dealing with these rediculous files.
@ideasman42, I want to set my default FBX format to Y Forward, Z up, Scale 0.02. I tried making those settings my default by saving the startup.blend file and it’s a no-go. So I can’t save “my preset.”
Campbell, I’ll ask again since you must have overlooked my question in the previous post. I’m wondering when the support for armatures will be implemented. I realize that it isn’t particularly high on the priority list, but it would still be interesting to know.
I also tried to import a .fbx coming from UDK (v10897). The model has 2 materials and 2 UV channels.
The geometry itself and scale is just fine (there are edge breaks along UV seams but that’s UDKs fault). However UVs are missing for both channels.
Regarding multiple materials, I know they are not supported but blender is at least showing both materials with correct names.
Note that each material isn’t using the different UV layer yet, so support for that still needs to be added.
@davyzhang, Blender doesn’t support per-face-corner normals, so this kind of smoothing wont be supported. fbx does however support smooth groups IIRC and per face/edge smoothing values, so those could be loaded.
While reading normals and translating them to smooth/flat is possible, not sure its really that good to add… would be very slow to calculate and not work in all cases.
I don’t have a schedule for any further improvements, just add when I get time… bug tracker is ~200 so I should really spend time on that :S. But this isn’t that complicated, perhaps other py devs are able to help with the development too.
at least I know the lamp and camera are flipped, I’ve downloaded the files, will try check on them sometime this week.
Thanks so much for your time for this, it really important to save time for light map rendering or other functions related to light.
blender change shading mode by using vertex normal or mesh normal, I don’t know how 3dsmax implemented this. I just put my wild guess here:
Parse the fbx file find faces using flat shading (without smooth groups),
Import the model in blender as now (default using smooth shading),
Find the faces, (might need to go to edit mode and select the flat faces first )and using bpy.ops.mesh.faces_shade_flat() to flat them
I tested on my blender 2.68.2, select the faces in blender,and run bpy.ops.mesh.faces_shade_flat() in console will flat the faces
blender’s flat and smooth is only different by using face normal or vertex normal to render, but I don’t really found where to set using them, if there’s an attribute to set which normal to use when rendering would be very nice to solve these problem.
Eventually its going to have to happen though as its a major part of the game asset workflow and if the linkage between valve’s steam/steamworkship is going to happen some priority should be given to making sure we can import and export smooth and flat edges. On the polycount forums, we start seeing discussions form in which artist at established studios start saying they cant get the studio to adopt Blender because such features are not present.
Another thought about smooth group, in my personal practices of game making. I found seldom need for same object using two different shading method. I made the previous object just for test, not for production.
This leads me to another solution. Why not smooth/flat the whole object when import. I can request my art colleague not to us half smooth half flat shading in same object, which really seldom happened even in my normal work pipeline.