Jump to content

Recommended Posts

Posted (edited)

I am trying to create a mirror block that reflects the world (display the reflection of the world).

Just like a mirror in real-life, I would like the field of view of the mirror change based on the player’s position (i.e. if the player stands close to the left side of the mirror, he/she will see more of the right side reflected in the mirror).

How should I approach this?

Edited by DavidM

Some tips:

  Reveal hidden contents

 

Posted

I would look at how the end portal is rendered

  • Thanks 1

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 7/11/2019 at 1:09 PM, Cadiboo said:

I would look at how the end portal is rendered

Expand  

Thanks.

However, apart from the position calculation, I am also struggling on making the mirror block to display the reflection of the world.

I had done something similar in my previous thread of the camera block with frame buffer in GUI; however, AFAIK frame buffers cannot be rendered with a TESR.

How should I render the reflection in the world with a TESR?

Some tips:

  Reveal hidden contents

 

Posted
  On 7/11/2019 at 11:56 PM, DavidM said:

frame buffers cannot be rendered with a TESR

Expand  

I don't see any reason for this to be true. A TESR is just your code being called at a specific time. There are very few limitations on what you can do in your code. 

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 7/12/2019 at 2:51 AM, Cadiboo said:

I don't see any reason for this to be true. A TESR is just your code being called at a specific time. There are very few limitations on what you can do in your code. 

Expand  

Hmm for some reason I always thought frame buffer are solely used for GUI and screen rendering. Thanks for the clarification. I will look into it.

Some tips:

  Reveal hidden contents

 

Posted (edited)

I've realized that the view limit inside a mirror is specific to the direction the player views the mirror. In other words, different players see the mirror at different direction, thus they should see different views in the mirror.

Therefore, I'm wondering whether setting the renderViewEntity to an entity in the direction of the mirror would work, since different players see the mirror differently, and an entity can only return the same view. I think that I'm looking for a client-specific way to render the view of a remote position in a TESR without using an entity or the renderViewEntity.

This brings my problem similar to one of my previous posts, but without using an entity this time:

 

What would be a way to achieve this?

 

Edited by DavidM

Some tips:

  Reveal hidden contents

 

Posted
  On 7/18/2019 at 9:47 AM, uiytt said:

I don't know if it can help you : https://github.com/iChun/GeneralLaymansAestheticSpyingScreen

If I understand well, this mod use very similar properties of what you want to do, try to look in it.

Expand  

That's actually really useful. Thanks!

Some tips:

  Reveal hidden contents

 

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.

Announcements



×
×
  • Create New...

Important Information

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