Closed VergilUa closed 5 years ago
Thanks for letting me know, I'll check it out
Fixed in 1.541! I'll close this ticket once this version is available from the asset store
Ummm, the error is gone, but generated mesh is still got 0 polys on it. And got this warning:
Mesh indices of Beam_02 (1) are out of range!
UnityEditor.AssetDatabase:ImportAsset() UnityFBXExporter.FBXExporter:ExportGameObjToFBX(GameObject, String, Boolean, Boolean, Boolean) (at Assets/Plugins/RealtimeCSG/Editor/Thirdparty/UnityFBXExporter/FBXExporter.cs:78) InternalRealtimeCSG.MeshInstanceManager:Export(CSGModel, ExportType, Boolean) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/Control/Managers/MeshInstanceManager.Export.cs:233) RealtimeCSG.CSGModelComponentInspectorGUI:OnInspectorGUI(Object[]) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/View/GUI/ComponentEditorWindows/CSGModelComponent.Inspector.GUI.cs:370) RealtimeCSG.EditModeSelectionGUI:OnInspectorGUI(Editor, Object[]) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/View/GUI/EditModeGUI/EditModeSelection.GUI.cs:244) EditModeToolWindowEditor:OnInspectorGUI() (at Assets/Plugins/RealtimeCSG/Editor/Scripts/View/GUI/EditModeGUI/EditModeToolWindow.Editor.cs:15) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
This one is probably due to mesh being broken though.
Ok, that sounds like the fbx importing code has changed .. I'll take a look to see if it's realtime-CSG's fault .. it might be a bug in unity though
Can you try exporting a non broken mesh?
Everything seems to work for me in 2018.3b11 .. at least for a simple mesh?
By broken I meant the one that doesn't export.
I was still on b10, will download b11 and see if it works there.
Ok, if that doesn't work for you can you send me the model that doesn't export? Then I can figure out what's going on here ..
Here's prefab of it and fbx exported file Beam.zip
It's not quite as simple as cube though. It's a cyllinder with edited vertices via edit mode.
(Top scaled down)
Same behaviour on b11
This happens not only on cyllinder but on any model I have. Same applies for extremely simple ones, e.g. cubes. As well as any fresh created ones.
Strange .. it seems to work for me .. the only issue I'm seeing is that the export fails when a material is missing .. but I assume you have materials applied to it? Could it be prefab related? Are you seeing the same problems if you unpack the prefab before you export it?
I don't have it (or any other model) as a prefab, simply made it one for exporting. No idea why it fails. Yeah, materials are not an issue. Any ideas what might help?
Can you try this in a clean project on 2018.3b11 w/ latest realtime csg version, no prefabs? Just want to rule out something somehow interfering with realtime-CSG
2018.3b11 & Realtime CSG 1.541 (2018.2f1 package), same behaviour in the clean project, except different error poped up: ImportFBX Errors: Internal FBXImporter error: normal count (0) doesn't match tangent (36) or/and binormal count (0).
UnityEditor.AssetDatabase:ImportAsset() UnityFBXExporter.FBXExporter:ExportGameObjToFBX(GameObject, String, Boolean, Boolean, Boolean) (at Assets/Plugins/RealtimeCSG/Editor/Thirdparty/UnityFBXExporter/FBXExporter.cs:78) InternalRealtimeCSG.MeshInstanceManager:Export(CSGModel, ExportType, Boolean) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/Control/Managers/MeshInstanceManager.Export.cs:233) RealtimeCSG.CSGModelComponentInspectorGUI:OnInspectorGUI(Object[]) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/View/GUI/ComponentEditorWindows/CSGModelComponent.Inspector.GUI.cs:370) RealtimeCSG.EditModeSelectionGUI:OnInspectorGUI(Editor, Object[]) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/View/GUI/EditModeGUI/EditModeSelection.GUI.cs:244) EditModeToolWindowEditor:OnInspectorGUI() (at Assets/Plugins/RealtimeCSG/Editor/Scripts/View/GUI/EditModeGUI/EditModeToolWindow.Editor.cs:15) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Mesh indices of Wall (1) are out of range!
UnityEditor.AssetDatabase:ImportAsset() UnityFBXExporter.FBXExporter:ExportGameObjToFBX(GameObject, String, Boolean, Boolean, Boolean) (at Assets/Plugins/RealtimeCSG/Editor/Thirdparty/UnityFBXExporter/FBXExporter.cs:78) InternalRealtimeCSG.MeshInstanceManager:Export(CSGModel, ExportType, Boolean) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/Control/Managers/MeshInstanceManager.Export.cs:233) RealtimeCSG.CSGModelComponentInspectorGUI:OnInspectorGUI(Object[]) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/View/GUI/ComponentEditorWindows/CSGModelComponent.Inspector.GUI.cs:370) RealtimeCSG.EditModeSelectionGUI:OnInspectorGUI(Editor, Object[]) (at Assets/Plugins/RealtimeCSG/Editor/Scripts/View/GUI/EditModeGUI/EditModeSelection.GUI.cs:244) EditModeToolWindowEditor:OnInspectorGUI() (at Assets/Plugins/RealtimeCSG/Editor/Scripts/View/GUI/EditModeGUI/EditModeToolWindow.Editor.cs:15) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Produces same 0 polys model.
this is what I'm seeing ..
(that's with the invalid material fix & changing the name of the mesh so it's easier to distinguish from the material in the fbx)
Could you record how you're doing the export etc. so I can do the same steps exactly like you're doing? There must be something that's different that's causing your problems ...
The model seems to be broken into parts, but it was completely solid and joined together. Weird. Posted my test on the clean project above.
broken in parts, you mean in the animated gif? that's just aliasing because it was thin and far away .. the model is solid for me
Yeah, in gif. If it's solid then it's okay. No idea why exporting doesn't work in empty project though.
Second time I've tried exporting the first error is gone (this one):
ImportFBX Errors: Internal FBXImporter error: normal count (0) doesn't match tangent (36) or/and binormal count (0).
But still same result.
I've found it. It's a localization issue .. these fbx files are text files and the coordinates are stored differently depending on your locale ... so in this case 0.5 would be stored as 0,5 on your computer ... now consider that coordinates are separated by , you get 0,5,0,5,0,5 instead of 0.5,0.5,0.5. One of these is 6 values, the other is 3 🙄 Easy to fix though. Just don't understand how this is possible .. either unity was automagically fixing this before, or it never actually worked in different locales?
I just uploaded version 1.542, can you check if this version fixes your issues? Thanks
Yeah, it works. Thanks! :)
This version is now available from the asset store so I'm closing it
Exporting any model to the fbx fails with the following errors:
This is on 2018.3b10 & RealtimeCSG v1.540
Nothing too fancy on the model as well. It's plain cube with 20 verts. This happens to any model I try to export. Exporting produces empty fbx with 0 tris / verts.