Convert 3D to 2D

I have a complex design (shelf ranges) working fine in 3D. The customer asked me to provide an option so that he can switch between 2D and 3D visualizations. How can I convert the 3D to 2D?

Thanks for any help

Depending of the need of your customer, maybe simply use ortographic cameras could do the trick :upside_down_face:

Thanks for your reply. I am currently using the orthographic camera but he needs something else for a realistic 2D.

We will need more explanations to be able to help you:

  • have you render reference to target?
  • do you want just an image to save or interactive 2D?
  • etc

Here is part of a code I use to create camera in TypeScript:

  this.camera = new TargetCamera('camera1', new Vector3(-6, 3, -3 ), scene);
  cameraZoom  = 3 
  this.camera.mode = Camera.ORTHOGRAPHIC_CAMERA;
  this.camera.orthoTop = cameraZoom / 2 ;
  this.camera.orthoBottom = -cameraZoom / 2;
  this.camera.orthoLeft = -cameraZoom ;
  this.camera.orthoRight = cameraZoom ;
  this.camera.setTarget(new Vector3(1, -0.65, 1));

   const light = new HemisphericLight('light1', new Vector3(0, 1, 0), scene);
   light.intensity = 0.98 ;

 // Point Light
   const pl = new PointLight('pl', new Vector3(0, 0, 0), scene);
  pl.intensity = 0.7;
  scene.registerBeforeRender(() => {
  pl.position = this.camera.position;
});  

this.engine.runRenderLoop(() => {
scene.render();
}
);

Then I use the MeshBuilder.CreateBox, Mesh.CreateCylinder, MeshBuilder.CreateDashedLines, dynamicTexture.drawText and MeshBuilder.CreatePlane methods to create the objects of the scene. The resulted scene is added to the canvas element of the page. There is a slider for zooming which just changes the value of the cameraZoom variable and updates the scene. This scenario works fine but I am asked to support 2D.