Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

Posted

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?

 

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.