Jump to content

Is it possible to render framebuffer from another entity's camera without displaying it on screen?


ztq15

Recommended Posts

I'm trying to make a camera peripheral block for computercraft (1.18.2 forge), but stuck at the start now

I want it to create a virtual camera entity, then return what it sees as imageBuffer so that it can be displayed by monitor from Tom's peripheral mod.

So first I tried using a specific entity as the carrier of camera.

I tried save the original mainRenderTarget, then create a new RenderTarget(or framebuffer) when RenderHandEvent fired, then use setCameraEntity to move the camera to that specific entity, render what it sees and write it into the new RenderTarget.

I did get the view from that entity as bufferedImage, then save it as a png file. 

But in game, both entity's camera view and player's camera view were displayed. Is it possible to render a entity's camera view without displaying it on screen?

 

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.