Jump to content

How to display/render meshes being loaded in live ?


Recommended Posts

We are loading a model exported from 3DS Max using BABYLON.SceneLoader.ImportMesh().


Instead of progress bar or progress stats, how do we show each meshes being loaded and rendered on screen, in live, one by one ?

Link to comment
Share on other sites

Hi dsman,


if you simply want to see them all while being rendered, you can disable the loading screen (Actually, I think the ImportMesh doesn'T even show it). They will render (almost) together if you use geometries embedded in the .babylon file or async (according to their download order and size) if you use babylonmeshdata files (incremental lolading). You can find some more info about the incremental loading system here - http://doc.babylonjs.com/page.php?p=22251


If you want them to render one by one, you will have to load them one by one as well (ImportMesh for each mesh you want to show). This will require you to know all of their IDs before loading the file.

Link to comment
Share on other sites

Yeah. So I don't have loading screen. But I don't see meshes one by one as they are being loaded. I see whole model when all the meshes are loaded. 


Incremental loading sounds interesting. But my question is where can I get source code of this converter :



What If I have thousands of models which I want to convert into incremental models.  

Link to comment
Share on other sites

Yeah, you see the whole model because everything is loaded in one single file.


The incremental file type simply takes the vertex data and exports it to an external file. 


A mesh can either have :

  • indices
  • positions
  • normals
  • uv coords / colors
  • other vertex data

or one single geometry (with geometry ID).

A geometry can either have the same vertex data I specified before or a data URL, a link to a .incremental.babylon file that contains, (surprisingly :-) ) the same data. So you can do it on your own. No need for the converter, you can create a very simple converter on your own. Give the geometry an ID, add it to the geometry list of the scene, and export the vertex data to a different file.


For more information about the babylon scene file type - http://doc.babylonjs.com/page.php?p=22661 

Link to comment
Share on other sites

  • 1 month later...

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.

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.


  • Recently Browsing   0 members

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