UniLOD BETA: Level-of-detail and streaming support [UPDATE]

I’m getting an error when I import the files:

I’m on a Mac, but I was wondering if being on the Pro trial had anything to do with it. Does anyone know if plugins are disabled when using the trial version?

Hmm, weird that it’s complaining about UnityEditor assembly… Although, that’s a C# plugin, so it should work even in free unity. I’ll look into that, let me know if you figure out whats causing it.

I got the same error message. so I think maybe the DLL file did not work on Mac computer.

please test your tool on mac, thanks. :smile:

I’ll try to get a mac and take a look as soon as possible, got a couple other projects on my mind right now. I hope to look into it by the end of the week.

I see the same problem on Mac Unity Pro. Any assistance I can offer is yours as I’ve got a demo due next week that I’d love to put this in.

This looks very promising.

Unity crashes when I use Mesh simplifier. I have installed the latest DirectX but I’m not sure I have the latest VC++ runtimes. Where do I find them?

When I examine DXMeshCombine.dll and UniLOD.dll with Dependency Walker I notice that IESHIMS.DLL and WER.DLL are missing.

This is probably the most promising project I’ve seen on these forums.

What is the status? Are you planning on updating it further?

Thanks. I am planning on fixing any existing bugs, but I have no plans for additional features.

I apologize to the Mac owners, I still have no time to fix the existing bugs.

@Hilmer
I’ve seen this problem before with my testers. I haven’t figured out what is causing it. I also used dependency walker to check for dependencies, and there doesn’t seem to be anything else but DirectX and VC++ runtimes. Does it just crash, or does it show an error message about not being able to find a .dll?

Also, the .dlls you mention are both delayed-load and they don’t get called from the .dll. WER.dll is Vista specific, and shouldn’t cause problems as Windows prevents loading of this file if ran on earlier OS versions. IESHIMS.dll I am missing myself, so that can’t be the cause.

Hey there BearishSun,

Congratulations on this project, it really does look awesome - and thanks for sharing thus far, I would love to use it soon, so I shall be keeping it on my radar.

Great work and all the best.

" First thanks BearishSun for Unilod."
I have a problem with it.and i don’t know that its a bug or i do wrong!
When i drag object to lod simplify and then press create;this appear :
"
MESH FOLDER EXISTS
Folder with the specified name already exists.if you continue,all meshes with the same name in the folder will be replaced. do you want to continue?
"
If i press yes it ask again!
if i press no it stop work!
I use ut pro 2.61 and for this test i used unity’s cube and cylinder and other owner meshs.they have same result.
at bottom of viewport,in unity error reporter it report:
dllNotfoundException:"unity project address/assets/plugins/DXMeshCombine.dll
what i can do?
Thanks!

@hasanisakhani

This happens when some of the dependencies the .dll is using are missing. Do you have the latest directx and vc++ runtimes?

I’ve actually being trying to learn how to work with CombineSkinned and Skeletons. Any information would be welcome, not to steal the thread away from it’s ultimate goal.

This is very impressive but the downed resolution meshes are so un-predictable I’ll stick to doing everything by hand in the 3d app. Quality’s sake.

I have an LOD script that swaps meshes around for the lods but I haven’t found a way to implement layer changing or material changing. Those impressed me the most I think.

No.so i update them and test it again.unity crashed out i test it both on my notebook and pc it have same result.

@TheLlama

If all your skinned meshes share exactly the same skeleton you can just do something like this (Code not tested):

Mesh CombineMyMeshes(SkinnedMeshRenderer[] MeshRenderers)
{
   GameObject[] MeshRendererParents = new GameObject[MeshRenderers.Length];
   for(int i = 0; i < MeshRenderers.Length; i++)
       MeshRendererParents[i] = MeshRenderers[i].gameObject;

   Vector3 NewCenter;   
   Mesh OutputMesh;

   UniLOD.ModelCombine.CombineSkinned(MeshRendererParents, MeshRenderers[0].bones, MeshRenderers[0].sharedMesh.bindposes, true, out OutputMesh, out NewCenter);

   return OutputMesh;
}

If you want to combine their materials too, you use a slightly extended version of the CombineSkinned method, but the extra paramaters are pretty self explanatory.

If all of your meshes do not use the same skeleton, then you must call some of the skeleton combining functions(AddBonesToSkeleton or CombineSkeleton), before calling CombineSkinned, and pass the new skeleton(and new bindposes) to CombineSkinned.

Let me know if you need any more help.

@hasanisakhani
There seems to be some other problem with the plugin then. I sadly don’t have time to look into it yet…You may try installing the DirectX SDK(not the Runtimes, but the SDK). That’s the only thing I can imagine that might be missing, but it’s just a guess.

same problem
On notebook with WInXP SP3 - Unity Pro 2.6.1
DX9/vc++runtime 2008 sp1
error log

at (wrapper managed-to-native) UniLOD.MeshSimplify.SimplifyMesh (single[ ],single[ ],single[ ],single[ ],int,int[ ],int,single[ ],int,intptr,intptr,intptr,int,intptr,int,intptr) <0x00004>
at (wrapper managed-to-native) UniLOD.MeshSimplify.SimplifyMesh (single[ ],single[ ],single[ ],single[ ],int,int[ ],int,single[ ],int,intptr,intptr,intptr,int,intptr,int,intptr) <0xffffffff>
at UniLOD.MeshSimplify.Simplify (UnityEngine.Mesh,int,UnityEngine.Mesh) <0x009e7>
at UniLOD.LODSimplifyInternal.CreateLODMeshes (string) <0x001a5>
at UniLOD.LODSimplifyInternal.Update () <0x0001d>
at LODSimplify.Update () [0x00000] in E:\WORK TOOLS\Unity\TEST_CLEAR_ASSET\Assets\Editor\UniLOD\LODSimplify.cs:33
at (wrapper runtime-invoke) LODSimplify.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[ ]) <0x00004>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (object,object[ ]) <0xffffffff>
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[ ],System.Globalization.CultureInfo) <0x0009a>
at System.Reflection.MethodBase.Invoke (object,object[ ]) <0x0001a>
at UnityEditor.HostView.Invoke (string) <0x0002a>
at UnityEditor.HostView.SendUpdate () <0x0000f>
at UnityEditor.EditorApplication.Internal_CallUpdateFunctions () <0x00016>
at (wrapper runtime-invoke) UnityEditor.CompilerHelper.runtime_invoke_void (object,intptr,intptr,intptr) <0xffffffff>

perhpas you have copied the the plugin directory in the wrong place.

as seen in the video you have to copy the three directory in the root of your assets folder…

seemed to solved the problem for me…
Nice work on the system!!!

2pixelstudio
If copy plugin in wrong place dont see unilod menu =)

I tryed in other 3 PC with XPsp3+Unity3d Pro and same result - crush in simplification.

Instaling last DX9 / vc++ runtime 2005/2008/2008sp1
or Visual C++ Express 2008 did not produce results

So I’m really interested in using this in my game. Has the licensing been decided on yet? Am I free to use this in games at this point?

I seem to be getting an error. It’s cutting off the A in the asset directory.

Here is the errors:

DirectoryNotFoundException: Directory 'C:\PRODUCTION_ART_STORE\PRODUCTION_UNITY\_UniLOD_\CHECKIT_002\ssets\Resources\Scenes' not found.
System.IO.Directory.GetFileSystemEntries (System.String path, System.String pattern, FileAttributes mask, FileAttributes attrs) 
System.IO.Directory.GetFiles (System.String path, System.String pattern) 
System.IO.DirectoryInfo.GetFiles (System.String pattern) 
System.IO.DirectoryInfo.GetFiles () 
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:GetFiles ()
SceneManagerInspector.OnEnable ()   (at C:\PRODUCTION_ART_STORE\PRODUCTION_UNITY\_UniLOD_\CHECKIT_001\Assets\Editor\UniLOD\SceneManagerInspector.cs:87)

Not sure why

Thanks for your interest. The project UniLOD was originally developed for was recently put on hold, and with it so was UniLOD.

Sadly I cannot help you with any bugs at the time, nor can I provide licensing details.

I am considering releasing the source code so you can fix the problems yourselves, but I can’t give you an official answer yet.