The Basics-Texture Clipping Part 1

Hello aspiring brick layers of ROBLOX, WoodReviewer here. Today marks a special week as I dive into a week of posts not relating to wood grain. However, it is maintaining the overall theme of this blog of complaining about minor things that annoy me and not most other people. Today I am complaining about texture clipping, also known as Z-Fighting, alpha fighting, and about half a dozen different names based on who you ask and how technically they are. Personally, I call it texture clipping. Now that I have settled on what I am calling texture clipping, it is time to say what it is.

What is Texture Clipping

Well, lets say you have two bricks, one white and one black. You inset them next to each other and you can see a distinct line where one ends and another begins.

Black Aand white.png

Now lets say you move one brick over a stud they are intersecting each other like this.

Black and white clipping.png

Do you see how when they overlap there is not one they is on top of the other, but rather they mix together? They is texture clipping.

“But WoodReviewer, I have never seen that in-game.” You have, but not like that. First off, ROBLOX recently changed how it handles texture clipping. Here is an old screenshot from MeepCity: Star Ball. Texture clipping use to have one brick overpower the other more, and not have the new system that appears grainy and has a bunch of obvious lines in them.

Texture Clipping Meep City.png

Secondly, when you see two texture clipping, the clipping updates every time the camera is updated. So if you are moving your camera, such as walking, the textures updated at around 60 times per second if your monitor runes at 60 frames per second. This creates a flashing sensation, where instead of being clear the area where the bricks overlap flickers.

Lastly, I used the two highest contrast bricks, black and white, to show this. In most cases, whether it is grass, concrete, or even wood of the same color, the clipping is harder, but not impossible, to see. For example, take a look at these two grey bricks, in the same position, as the above bricks, but notice how much harder the clipping is to see.

Why Does It Happen?

Texture clipping occurs because the camera, in this case the ROBLOX camera, cannot decide what part of an object goes infront of the other. In real life, imagine looking at a piece of drywall that has a coat of paint on it. But it is a really thing coat of paint. Obviously, our eyes see light so we can see the light being reflected off the paint. But computers work differently, and need to see one part to tell which one is on top. When they can’t texture clipping occurs, and some combination of both bricks is seen, causing the weird texture associated with texture clipping. As I mentioned, it updates each time the camera updates, causing the flickering seen in the two videos.

Of course, as I said this occurs when the face of two bricks is as the same height. But it doesn’t always occur like that. Take a look at the following bricks.

Baseplates Far.png

They may look like they are intersecting each other. Now, lets zoom in.

Baseplates Close.png

Those aren’t two small brick, one is a 2048×2048 baseplate. And they aren’t intersecting; the dark black brick is an entire stud on top of the light grey baseplate. Why does it do that? Because as you zoom out ROBLOX’s camera sounds the bricks positions. So in this case, two bricks that are offset by one stud look like they are clipping from 5,000 studs away, and at the same time two bricks that are offset by .001 studs may look like they are clipping from 100 studs away.

However, this mostly occurs at large distances, usually 500+ studs, and usually with fairly large bricks. It may occur with two 4x4x4 bricks at 500 studs that are clipping, but at 400 studs the bricks are too small to notice the clipping. A visual example is helpful here. Take this crate by EndorsedModel that has I featured in my blog on crates a few weeks ago. It is now fixed, but I still have an old version that has bad wood grain and texture clipping.

Crate Close.png

Up close with the camera less than 10 studs away from the clipping, again with high-contrast colors, the clipping is very visible. But when you zoom out, to 50 or so studs, the area that has the clipping gets smaller and the clipping is overall less noticeable.

Crate Medium.png

Zooming out to 100 studs it is hard to even make out the parts that cause the clipping, much less the clipping itself.

Crate Far.png

So basically texture clipping needs to be fixed for whatever distance it is used at, and depending on the distance some tricks will work differently. So what may work on a nightstand in an enclosed room that is only 10 studs by 10 studs may not work if you are making a runway for an airport and need to view it from 1,000+ studs away as planes go to land.

How To Fix It

There are many, many ways to fix texture clipping with bricks, and many more with GUIs and user made textures/decals. This week there will be several blog posts on texture clipping and how to fix it, including a look at some RBX Dev offices and some endorsed models. Along with that will be two more posts in a similar format addressing more specific issues. Unlike wood grain that follows a simple set of rules, the wood must be longer on one end than the other, texture clipping is more complex, can vary at a distance, and unlike wood grain you can’t just make the parts non-wood to make the issues go away. In addition there are performance benefits to different techniques for fixing texture clipping, some that work in different scenarios, and all of which have different pros and cons in different scenarios.

2 thoughts on “The Basics-Texture Clipping Part 1

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s