Jump to content

[SOLVED] fbx / gltf import crashes editor when using instances and LODs


photo

Recommended Posts

Posted

Hi!

 

I created a wall that is made up of repeating instances of the same object with two LOD levels and exported it in FBX.

Now if I am trying to import the file into my project the editor crashes. Then I've tried exporting it in gltf and I'm getting the same thing.

 

I'm not getting any errors, the editor just crashes completely. After reopening the editor has imported the file, but without LODs. Trying to reimport results in a crash again.

 

Is there anyway I can get this to work? I don't think my files are corrupt or wrong. (I have attached an example.)

 

Some additional Info:

- Unigine 2.18.0.1

- Windows 10

 

Thank you in advance!

Wall.fbx

Posted

Hi, jsahir!

So far, we were unable to reproduce the issue, the import goes correctly, video in attach. Can you make sure, that all our import settings are correct to reproduce it?

Please, try to clean up the user cache by deleting Editor folder in C:\Users\<username>\AppData\Local\unigine, will it help?

Also, can you, please, provide us wall.fbx.meta file? It located in data folder next to .fbx asset.

Thank you!

 

 

 

Posted (edited)

Hi  @arizmenda!

 

I wasn't very precise with my explanation of the problem, I'm sorry about that.

The crash only happens with LODs turned on. (I attached a screenshot of my import files + the .meta file)

importsettings.PNG

Wall.fbx.meta

Edited by jsahir
didn't do the tagging right
Posted

Yes, we successfully reproduced the bug. For some reason crash occurs when the default prefixes are used. We managed to avoid crash by changing prefixes when importing the model as in video attached. For example _lod_0 to _lod0

We are planning to fix this issue in following update, will this suit you?

 

 

 

Posted

Hi!

That doesn't seem to have fixed the issue.

I tried renaming my wall pieces like you recommended. Importing works only with an invalid postfix name. Renaming it to the correct one results in a crash.

If I place my "wrongly" imported fbx in my world I don't get the LOD state in the outliner.

If I only import one single part of the wall, it works fine however. Is it maybe a problem with instancing?

 

nolods.PNG

lods.PNG

Posted
Quote

Is it maybe a problem with instancing?

Try to remove Use Instances check mark when importing a model. Will there be changes?

image.png

 

image.png

Posted

Thanks for your fast reply!

Yeah that works for the LODs!

I think I didn't really explain the results I want. The editor is still not using instances, I have separate meshes for each iteration of the wall.

I would like to use only one mesh, the single wall part, as an instance, but with two LOD levels at the same time :D

That doesnt seem to work though.

 

Posted

Hi, jsahir!

Sorry for keeping you waiting!

I was able to achieve the required result as you described.

First, I imported the .fbx to blender and deleted all the generated meshes with _lod_1 prefix since LOD levels are generated in FBXImporter in Editor.

Then, I combined the _lod_0 meshes of the wall into single mesh by Shift + J, and then imported the model with required LODs settings (I had no crash while applying your import settings).

Will this solution be appropriate? If not, could you, please, create a new ticket in the support desk on this case?

image.png

Posted

Hi! Thanks for your continued help, I think we're still not on the same page unfortunately.

The end result that I would like to achieve is a mesh cluster with LODs. Using auto-genarated LODs, I get instances with the same mesh, but I would like to use my own LODs for better control. So if working with instances and LODs in the same node is possible with auto generated LODs, shouldn't it be possible with my own?

 

So as an easy example

I have six objects:

Object_0_lod_0, Object_1_lod_0, Object_2_lod_0,

Object_0_lod_1, Object_1_lod_1, Object_2_lod_1

 

So my result should be one node with three objects, of which each has two surfaces and each surface is only referencing one mesh.

I hope I am explaining it somewhat comprehensively.  I have attached some screenshots :)

 

Hopefully you can help me, if not I can still reiterate in a private support ticket.

InstancesAuto.JPG

InstanceLOD.JPG

node.png

Posted

Oh Lord, I'm sorry, I get it now! :)

Quote

So my result should be one node with three objects, of which each has two surfaces and each surface is only referencing one mesh.

Unfortunately, this cannot be done this way. In your case, you want surfaces to be referenced as different meshes. Surfaces are parts of mesh, not the opposite, so it won't work. But you can prebake the meshes/parts of the wall from the start to make a single object with two required meshes as surfaces (you can do it even in editor - pick two meshes -> Export to -> Unigine Mesh file). In other words - it would be better to work on the content further before importing it.
 

Quote

So if working with instances and LODs in the same node is possible with auto generated LODs, shouldn't it be possible with my own?

Autogenerated LODs in Editor are not meshes, but a surfaces. So - using the editor LODs is another solution.

Thanks!

 

Posted

Well, importing .fbx with Combined by Postfixes setting on does a job. But we haven't found a workaround yet.

Fixing this will most likely will solve the issue. How critical is this problem for you? It will be fixed in new SDK update this summer. But if you need fix asap, you are going to need to adress the issue in support forum :) 

Posted

Hi! A fix with the next sdk will be fine. Thanks for helping me out!

  • Like 1
  • bmyagkov changed the title to [SOLVED] fbx / gltf import crashes editor when using instances and LODs
×
×
  • Create New...