Client rendering after receiving data from node js server

hello guys . i read in the docs that babylon can work in node js environment but don’t render . there is any way to send data like meshes from server side to client side to render it ?

Hi,

that would require serializing the meshes (or better yet - the scene) and sending them to the client. But it’s not something you can run on each frame, as it will take longer than a single frame. Also, the amount of data you will send to the client will be rather large.

If you want your server to be synced with the client, build the scene on the client and send only transformation updates of the nodes from the server to the client. This is more than possible to process on each frame.

yeah ,i got this but this making me wondering what nullEngine in node js can do without rendering ?.

like it’s shown here :

i thought maybe preparing the scene somehow (like in the docs above they created camera light …) for better UX, but as u said is impossible to sync every frame . so how babylon js can be used in node js ?

Everything babylon can, without actually rendering :slight_smile:

It’s helpful for multiple player experiences. for example you can check collision/physics interactions on the server, make sure the players don’t “cheat”.
But it depends on your usecase. if you are looking for server-side rendering, the null-engine is not the right choice.

understood . i thought those things r part of rendering . thank you