camera.outputRenderTarget doesn't work

it seems that pipcamera doesn’t render to rtt ???

You must not call rtt.render. The scene will be rendered automatically in the RTT because it is attached to the pipCamera output:

Note that I have commented the line 73 as you probably want the plane to be fully visible in the RTT.

I’m sorry to bother you again.
I seem to have a new problem.

At certain angles, the plane will disappear

You have some errors in the console:

That’s because you can’t use a texture as an input and an output in the same pass: that’s what happens to the RTT when it is used as a diffuse texture for the miniMap and the miniMap is rendered into the RTT texture.

So, you need a third camera to render the scene from the top to the RTT and use the pipCamera to render the minimap plane. As I did not fully understand what you did in your PG, I reworked a bit the PG:

The pipCamera is now an ortho camera that does not move and which only renders the minimap plane and I used a simple standard material for the minimap plane.

1 Like

In fact,I have always wanted to make a custom minimap that is more beautiful.

I tried using viewports for both cameras;
I’ve tried exporting the scene as image, working with the dom to handle the styles;
In the end, I think a shader would be a great choice.

Now, with your help, I think I’ve done what I wanted,thank you very much !

If I have time in the future, I think I will continue to optimize this minimap to make it look even more cool


1 Like