Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
Lenaco

Lag - Lumber vs Chiseled Blocks.

19 posts in this topic

 

Kitty, are you sure about this?
On a server we had, at one point, a completely chiseled roof and if was almost impossible to to move around in that area, while we have a lot of lumber roofs and we notice no notable difference in lag.

To be a little more specific, the chiseled roof was done in detail mode, not in slab or stairs mode. When done in slab or stairs mode, we see no notable difference in lag either.

AS you can see in these pictures our basic design is to try and get a roof as smooth as possible with the use of lumber, where, regardless of the slope, usually 8 pieces of lumber are used per block. We also tend to stick to one color.
http://eternitytfc.enjin.com/gallery/m/35332610/album/266191/syspage/1
http://eternitytfc.enjin.com/gallery/m/35332610/album/266192/syspage/1

Edited by Lenaco
Fixed some typo's.
0

Share this post


Link to post
Share on other sites

Rendering lag is caused by a high number of exposed faces. If you were to make two completely identical shapes from both lumber of all one type placed in the same direction and detailed mode of a chisel the visual lag from the blocks would be essentially the same. This is even present in vanilla Minecraft with fence blocks because fences have so many different exposed faces. I can't find the video that proved this, but here's Vech's related tweet about it.

 

0

Share this post


Link to post
Share on other sites

My experience, and that of others, does not seem to support this hypothesis.
I have also conduced a few test and they also point towards a big difference in lag.

2 exactly the same, fairly large builds, one with a lumber roof and the other with a smooth stone chiseled roof.
I can easily walk around and place blocks in the lumber house, but when I try to do exactly the same in the chiseled house I have (quite a lot of) lag.

When trying to place blocks there is a substantial delay, walking around is far from smooth.
I haven't looked at the FPS as I don't really care, I find it way more important that when I place a block, I don't place two or three blocks at the same time.

I do not contest what you say, it may very well be utterly correct in theory, but when I have the above experience on multiple servers and this experience is shared by multiple people, I would rather not see it dismissing outright so easily.
Maybe there is an underlying cause, something else that also influences lag that is tied into the chiseling concept, I don't know, that's why I am putting this out here.
 

Edited by Lenaco
Fixed some typo's.
0

Share this post


Link to post
Share on other sites
3 hours ago, Lenaco said:

2 exactly the same, fairly large, builds, one with a lumber roof and the other with a smooth stone chiseled roof.

I can easily walk around and place blocks in the lumber house, but when I try to do exactly the same in the chiseled house I have (quite a lot of) lag.

When trying to place blocks there is a substantial delay, walking around is for from smooth.

Maybe it is matter of collision detection, not rendering itself?

0

Share this post


Link to post
Share on other sites

The issue is rendering, which is client side. The effect somethings has on client performance depends largely on its number of faces. In 1.7.10 MC renders the faces whether you can see them or not. So each piece of lumber has the same number of faces as a full block. So if you fill the block 1 block has the faces of 64 blocks.

Each part of a detailed chiselled block faces as a block and there are 512 of them. Stairs and chiselled are 8.

Eitherway the effect of these blocks is on the client and so effect depends on your system. Some peoples fps will tank where others are fine. 

The reason why you get block placing delay is that you are receiving so much information from server for the chiselled blocks you are getting latency. 

The TPS for server is not effected. 

0

Share this post


Link to post
Share on other sites
11 minutes ago, Bunsan said:

So if you fill the block 1 block has the faces of 64 blocks.

Because lumber can be placed North/South, East/West and Up/Down, you're actually looking at a total of at least the faces of 192 blocks being possible in a single block.

Edit: And on top of that there's also the extra overhead of the fact that you can place multiple different types of lumber within the same block, so each piece has to get its own texture and orientation rather than using the same texture for the entire block.

Edited by Kittychanley
0

Share this post


Link to post
Share on other sites
3 hours ago, ciekma said:

Maybe it is matter of collision detection, not rendering itself?

Collision detection is only calculated when an entity is actually colliding with the block, so unless you've got a whole bunch of players standing on the roof, that's not it.

0

Share this post


Link to post
Share on other sites
32 minutes ago, Bunsan said:

In 1.7.10 MC renders the faces whether you can see them or not.

Each part of a detailed chiselled block faces as a block and there are 512 of them. Stairs and chiselled are 8.

This would explain a lot, if the following is true.

If all the faces of a block are rendered, regardless of visibility, that means that a detailed block without any micro blocks missing would be rendered as 3072 sides.
Length * Width * Depth * Sides = 8 * 8 * 8 * 6 = 3072

The more micro blocks you take out, the less sides needs to be rendered, the less the lag is?
Provided the above is true, would I be able to decrease lag by hollowing out all the chiseled blocks I have in a build?

This would also explain to me why chiseled blocks have a higher impact on lag than lumber, as people tend to only place the outline with lumber while leaving the unseen parts empty, and with chiseling people do not take out the core.

Even if you take 1 lumber vs the same volume of chiseled blocks it adds up.
Lumber: 6 sides, texture, orientation.
Chiseled: 8 micro blocks, 6 sides per block = 48 rendered sides.
I don't know exactly how much extra information is stored for the orientation, but I doubt it is the equivalent of 42 rendered sides.

Kitty, could the above be correct?

0

Share this post


Link to post
Share on other sites

It's a bit more complicated that what Bunsan is saying. For example, detailed chiseled blocks actually only render the 8 "stair chunks" by default to make up the solid block. It's not until a piece is removed that the stair chunk is divided into its 4x4 micro blocks. Also, while vanilla Minecraft might render faces whether you can see them or not with their blocks, the TFC detailed chiseled block render explicitly checks to make sure a micro block is visible before rendering it. So there's literally no difference whether the chiseled block is hollow or not, because we're not rendering them anyways.

https://github.com/Deadrik/TFCraft/blob/master/src/Common/com/bioxx/tfc/Render/Blocks/RenderDetailed.java

1

Share this post


Link to post
Share on other sites

The observation I made about lag with detail chiseled blocks was from experience and feedback from multiple players.  After an incident where I had a build with an enormous amount of detail chiseling and complaints from every person who visited I switched to using mostly lumber.  Since then I have taken observation from everyone who visits my builds on how laggy they seem to them, and so far I haven't had the severe issue I had with the detail chisel build.

All of this in itself seems to be a more personal choice issue than anything.  If the building material you are using creates issues scale back a bit.

I love the detail chiseling feature and still use it quite often; just not on a large scale in any one place anymore.  If I experienced complaints from my use of lumber I'd do the same, but as of yet all of the feedback has been neutral or positive.

(P.S.  I should mention the span of the observations of these builds on servers is approximately 2 years with hundreds of hours of play.)

0

Share this post


Link to post
Share on other sites

Did by chance all of the complaints about lag happen while you were playing build 78, and not 79? There was a lot of optimisation to chiseled blocks for 79.

0

Share this post


Link to post
Share on other sites

Nope, they happened while playing on 79, I have no experience playing 78.

Don't get me wrong, the game can take quite a lot of chiseling before starting to lag, but then again, we chisel A LOT.

I just want to understand how the mechanism exactly works, so I can try and take steps to bring down the lag.
And I know using lumber for the roofs compared to using chiseled blocks for the roofs makes a huge difference, I just don't know why.
 

0

Share this post


Link to post
Share on other sites

The reason is fairly simple. Minecraft has a poorly optimized 3D engine. Given the graphical detail it should run well on old computers, but doesn't. Playing some of the many (bad) Minecraft clones you'll notice they often have something in common. Their 3D engines are mostly way better than that of Minecraft.

You're a server owner so you could easily try this experiment. Generate a new world that is completely empty using the cleanroom generator plugin. Then use world edit to replicate the experiment in the tweet Kitty posted above. When the world is empty you'll easily hit 1000+ fps. But as soon as you fill a chunk with fence posts it'll drop significantly. Then create a chunk of chiseled detail blocks. In all cases you'll notice that those blocks do not affect server TPS in any significant way, only your client's fps will be affected (assuming server and client don't run on the same machine).

1

Share this post


Link to post
Share on other sites

Would you have an explanation why chiseled blocks create a bigger disturbance for the client than lumber when used in exactly the same construction?
And with exactly I do mean exactly, exactly the same shape, form and volume.

All I am hearing is that this should not result in any difference, maybe even the lumber being a worse disturbance.
But in all my experiments and the experience of many different players on different servers points exactly to the opposite.

I would like to understand why that is happening...

0

Share this post


Link to post
Share on other sites

A chiseled block by definition can't be the same as a lumber block. As soon as you chisel a block it gets more than the 6 faces, 8 vertices and 12 triangles (polygons) a standard cube has. Depending on the mode of chisel you can get up to 8 x 8 x 8 x 6 - 6 faces and 8 x 8 x 8 x 8 - 8 vertices and 8 x 8 x 8 x 12 - 12 triangles. Rough geometry wise instead of just having to deal with 8 vertices the client now has to deal with up to 4088 vertices for each chiseled block. And instead of just 12 triangles it now has to process up to 6132 triangles. That's a huge increase in processing time required just for transform and lightning calculations.

So let's say you have 100 detailed chiseled blocks. That's up to 613.200 polygons which you want rendered 60 times per second. That's 36.792.000 polygons per second just for those 100 blocks. To put things in perspective, a GTX Titan X can render up to about 30 million polygons per second.  The trick to any good 3D engine is to not have to render those polygons which you do not actually see. However Minecraft doesn't seem to be particularly good at this. It seems to have a hard time dealing with the raw geometry. Either because it's not efficient at determining which polygons are occluded and thus shouldn't be rendered. Or because it's simply rendering too much.

 

Edited by InsaneJ
Added links.
1

Share this post


Link to post
Share on other sites

Just an important note InsaneJ, when we say lumber blocks, we mean the placed microblocks. Not the solid plank block. Also, as I explained earlier using detailed mode on a chiseled block doesn't automatically convert it to the 512 microblocks. We have an optimized render that only converts it to the 8 stair-size blocks until a single piece of it is removed, and at that point just that single stair-size chunk of the block turns into 4x4x4 micro blocks. We also have checks in place so that only the microblocks that are visible to the player are rendered.

There's also no overhead on lighting calculations. Our renderer first does the lighting calculation of a normal, solid block and just uses that for the entire detailed chiseled block.

0

Share this post


Link to post
Share on other sites

Just to be sure we are all talking about the same thing.

I am comparing lumber with 8 micro blocks in the equal form and volume.
So for each lumber placed I calculate 8 micro blocks in a straight line.

Just this, obviously, is not enough to create any disturbance in the force, so I multiply this to encompass 4 chunks.
4 chunks * 16 blocks * 16 blocks = an area of 1024 blocks.

8 lumber per block for a simple roof * area of 1024 = 8192 placed pieces of lumber, with only the ends touching, so 4 exposed sides (excluding texture and orientation.
VS
8 micro blocks per row * 8 rows per block * area of 1024 = 65536 placed micro blocks, with only the ends touching, so also 4 exposed sides.

This gives you exactly the same volume and form, but not the same amount of entities.
And yes, I am cutting some corners by not calculating the exposed ends, but they should be somewhat equal.

@Kitty
When you say lumber is just as laggy as chiseled blocks, what exactly do you mean?
- 1 lumber is as laggy as 1 microblock (same amount of entities).
- 1 lumber is as laggy as 8 microblo
ck (same volume).
- 1 block of lumber (64 pcs)  are as laggy as 1 block of microblocks (512 pcs, both a full block).

 

I would also ask a question about the lighting.

I have noticed that, when I chisel a block any sides facing a solid block are indeed black, but once I chisel that block the lighting on my first chiseled block changes, and it is correctly lighted.
Taking this in account, it doesn't seem to me that the block uses the lighting as if it is a solid block, and makes InsaneJ's remarks valid.
(And nope, I do not know what I have my MC lighting setting set to, I can have a look when I get home tonight.)

0

Share this post


Link to post
Share on other sites

When I say that lumber is just as laggy as chiseled blocks, I mean that on average, for all configurations of lumber and all configurations of chiseled blocks, they are about the same. Yes there are specific configurations of lumber that are less laggy than chiseled blocks, but there are also configurations of chiseled blocks that are less laggy than lumber. To use your examples, plus an extra one

  • 1 placed piece of lumber will generate the same amount of FPS lag as a single microblock
  • 1 placed piece of lumber will generate slightly less FPS lag than 8 microblocks in a strip.
  • 1 solid block of lumber (64 pcs) will generate more lag than 1 solid block of microblocks, because it renders as a solid block of stair chunks so it's only 8 pcs
  • A normal, solid (not hollow) stair shape made of lumber (48 pcs) will generate more lag that a stair shape made of microblocks, because it always renders as a solid block of stair chunks unless a microblock has been removed, so only 6 pcs

All of these comparisons assume that you are only ever using one type of lumber within a block, and you are facing everything the same direction. The moment that you put multiple types of lumber into a single block, or you place the lumber in different directions you have to factor in rendering of multiple textures.

Your example of lighting is actually proving what I said and invalidating InsaneJ's remarks. You don't have smooth lighting on, which means you are using the most basic of lighting engines that Minecraft provides. The difference here is the terminology when it comes to talking about lighting. In this case when I use the word "solid" I mean the lighting calculations of a full, 1m^3 block. However, in this case a "solid" block can also be transparent (e.g. glass block). Chiseled blocks in Minecraft using the basic lighting engine without smooth lighting are simply considered transparent, which is why the neighbor blocks no longer have black sides.

0

Share this post


Link to post
Share on other sites

Thank you very much for your explanations and your patience with me, I think I understand now how it works and how I can apply this to my builds to make them somewhat less laggy.

0

Share this post


Link to post
Share on other sites