Compatability between 3D rendering and basic rendering

While trying out the new 3D graphics APIs (mainly M3D) I discovered that the screen object was completely replaced and had lost all of it's previous functions. I was concerned because I wanted to be able to make a UI for a 3D game that I am planning, but cannot do so if there is only 3D functionality. It would make me unable to create a UI or other things that I had planned. My suggestion is that the screen object retain it's basic rendering functions when using another rendering engine (especially a 3D one).

//this is impossible because the rendering engine removes all other screen functions except for screen.render()
draw = function()
  drawUI()  //function for drawing the user interface
  screen.render(scene, camera)

This is an interesting idea.

The preferred way to build an UI would be to allow drawing offscreen images and use them as sprites in M3D / Babylon. You could render your 3D scene, and then create a 2D scene for the UI that could be rendered on top of it ; all through the 3D API. This is probably the best in terms of performance.

Your solution seems much easier for someone who is already familiar with the standard microStudio 2D API. It would involve creating a drawing canvas on top of the canvas used for 3D rendering. I will think about it!

Post a reply



Validate your e-mail address to participate in the community