Jump to content

Recommended Posts

Posted

Okay, I've been having fun making complicated entity models and animations.  One thing that bothers me though is that in order to have a smooth joint between two parts I like to overlap them a bit.  The problem is that the area of overlap will "flash" a bit where I mean that it shows the texture of either one or the other part "randomly".  I'm not sure if this is some OpenGL issue when there are two planes perfectly overlapping, or whether it is a rendering code issue where the order of the rendering is changing. 

 

Or maybe the screen refresh rate is randomly occuring in between the renders of my body parts?  Is this a display sync issue?

 

What confuses me about this, is that in my custom model class I'm fairly certain that the order of the render calls is fixed.  I basically "body.render()", "head.render()", etc. for all the body parts in order.

 

If the render order is fixed, why is there the glitchy flashing effect on overlapping parts?

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted

This is normal. This happen when the computer need to calculate the position of the texture on the same position. The computer can't. it is constantly trying to get one side to be visible.

If you stop rotating the screen, you can see is does not glitch. Simply because the computer does not need to calculate the position.

 

solution: shrink one side (face) to 99.999%, just a bit smaller. and voila, solved. but is that possible in minecraft?

Coding, Testing, Smiling, Publishing!

Posted

This is normal. This happen when the computer need to calculate the position of the texture on the same position. The computer can't. it is constantly trying to get one side to be visible.

If you stop rotating the screen, you can see is does not glitch. Simply because the computer does not need to calculate the position.

 

solution: shrink one side (face) to 99.999%, just a bit smaller. and voila, solved. but is that possible in minecraft?

 

Yeah, I understand that what to render becomes ambiguous because they are both technically at same location.  But since it is a computer, I'd assume that it is still a logical process that would be biased to doing one or the other.  For example, the render order in my model class is a set order, so you would think that the last one rendered would be the one that would show in case of a "tie" in position.  I'm thinking that maybe actually true, but maybe the screen refresh is occasionally happening between the render calls.

 

Anyway, it does seem common in Minecraft so I suppose people aren't that picky about weird render issues (like heads of entities going inside blocks and such).  That is part of the charm of Minecraft (that the graphics aren't sophisticated).

 

I think it is possible to scale the parts to 99% before render, so maybe I'll try that.  I had thought about that, but wanted to know first if the issue had some other obvious fix.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted

Hi

 

I have had the same problem with textures which are parallel and on top of each other; it was caused by small roundoff errors determining which of the two textures  is "in front" of the other one.

 

If you have depth culling on, the render order doesn't matter unless you're doing alpha blending.

 

You can fix it by moving one of the textures slightly in front of the other one by a very small amount (i.e. by not trying to overlap them, leaving a very small gap instead).

 

-TGG

 

 

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.