Combine 2D with 3D


#1

Is 2 possible to combine 2D with 3D?

For example:

  1. Render 3D animated model in 2D scene
  2. Render 2D stuff in 3D scene (for ex. on plane)

Thanks!


#2

Sure, I use 2D to 3D a lot, and basically you use h2d.Object drawTo to draw your 2D object to a texture which you can then use to create a h3d.mat.Material.

For 3D to 2D I think you have to render a whole scene to texture instead by using:

engine.pushTarget(texture);
scene.render(engine);
engine.popTarget();