Jump to content

LOD giving me problems.


chicagobob123
 Share

Recommended Posts

I loaded meshes with BABYLON.SceneLoader.ImportMesh and saved them into an array (Not shown here to make an easier example).   

There was only one mesh per babylon file. 

        BABYLON.SceneLoader.ImportMesh("",'models/numbers/',''sample.babylon',scene,function(meshes,particlesystems,skeletons) {        

           ...          

       Sample[x]=meshes[0];

     }

Later I cloned the mesh array

sample2[x]  = Sample[x].clone(); 
sample2[x] .addLODLevel(400,null);
       

Because Sample needed to be seen all the time and sample2 did not, sample2 is later instanced because there is a lot of them and  

needed an LOD.  Great, but something is very wrong. 

When I include the sample2 array meshes as soon as the become visible items from the Sample[] array disappear. 

HELP? I really don't get whats going on. I thought Clone would create new meshes independent of the orginal. Is that not true?

 

 

 

Link to comment
Share on other sites

"the null in .addLODLevel(400,null); should be a mesh"

actually not if you want the stuff to not be seen at distance xx away. 

In the example the mesh is set to null to make the knot disappear. 

https://doc.babylonjs.com/how_to/how_to_use_lod

-->knot00.addLODLevel(55, null);

 

As for reproduction thats where this gets complicated. 

I am not sure I can. I guess I can try with the knots example

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...