Jump to content

[1.12.2] Render Shrinking Chunk of Blocks


DavidM

Recommended Posts

I am creating a block that, when placed down, will destroy nearby blocks in the range of 11x11x11.

I am trying to create it so that when the process happen, an animation appear.

I would like the animation to look like as if the whole chunk of blocks in the range of 11x11x11 shrinks into one block in 1 second duration.

I am planning to accomplish this animation with TESR that renders all the block in the 11x11x11 and shrink them a bit per tick; however, I am concerned that rendering 11**3 blocks every tick is going to cause significant performance issue on the client.

 

Is there a better way to accomplish this?

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Link to comment
Share on other sites

Whilst I cannot help out with the proper way to disable the blocks from rendering inside this area, and substituting your own animation, I can quite confidently state that it will not be as performance intensive as you think, if you keep OpenGL calls to a minimum.
I've made some menger-sponge inspired compressed blocks (20^1, 20^2.... 20^6 block compression) and whilst I was dealing with pre-calculated models and bakedQuad-caching, T3 compression(20^3) or 8,000 miniature blocks rendered inside a single blockspace did cause some stutter, but not game-breaking. (Though it wasn't animated)
Though 11^3 isn't a small number, that still only equates to 1,331 blocks. Yes, scaling all of this will have a higher performance drain than just basic rendering, but it shouldn't be impossible if you focus on performance.

  • Like 1

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Link to comment
Share on other sites

Thanks. I shall try rendering everything in a single buffer and optimize my GL calls.

 

59 minutes ago, Matryoshika said:

disable the blocks from rendering inside this area

The blocks inside the area will be destroyed prior to the animation; therefore, it won’t be necessary to disable the rendering of the blocks.

 

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

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.

Announcements



×
×
  • Create New...

Important Information

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