leht Posted October 1, 2018 Share Posted October 1, 2018 Hello, I'm migrating an medical application that viewing DICOM files from Three.js to Babylon.js. In my application I have a canvas with different frames (viewports) that have different meshes in them. The different viewports can get from same textures from data (that created from DICOM files). They need supports rotating, zooming, panning independently from other viewports. You can see my screenshot in the attachment. I'm considering to use multiple scenes, each scene for each viewport. But as I understand, the textures in Babylon need belong to a scene, although in my case it need to be used by multiple scenes. Could I create a texture without assign it to a scene? Is this possible if I just create a material (with a scene) and pass that texture as parameter in the function setTexture of that material? Or could you suggest the best solution for my case? I've read about the multiple cameras & viewports but I think it's not suitable with my case. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 1, 2018 Share Posted October 1, 2018 Hello, Babylon.js has an internal list of texture data, so if 2 scenes create a texture on the same url / data, the data will be shared and not loaded twice. In your case you can also consider having a single scene with 4 cameras (with viewports) NasimiAsl 1 Quote Link to comment Share on other sites More sharing options...
leht Posted October 2, 2018 Author Share Posted October 2, 2018 Thanks DeltaKosh, I will continue my implementation of multiple scenes and will let you know the result soon. About the option of single scene & multiple cameras, it's harder to manage the meshes' position, because each frame has separate meshes & textures, and the frame count is not fixed to 4 (it depends on user's choices). Another point is most of the time I don't want to re-render all the frames, just render the changing frame. So I think the multiple scenes option is fit to me. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
leht Posted October 20, 2018 Author Share Posted October 20, 2018 Hello, I confirm that 2 scenes can use same texture. ? Thanks much! Quote Link to comment Share on other sites More sharing options...
Guest Posted October 22, 2018 Share Posted October 22, 2018 Flagging as solved then Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.