- Home /
Objects not aligning, showing tearing or part of the object next to it
Hi all
I have been experiencing some strange behavior when placing cubes next to each other.
I create 2 cubes each are 1x1x1 in size. I place them next to each other, one at 0,0,0 and one at 0,0,1. So they should align perfectly. When I look at them both in the scene and game view, I can see a black line showing up where the 2 cubes meet. It looks like I can see part of the cube that are supposed to be hidden behind the first one. It becomes more clear if I add a lightly colored material to them.
I have tried creating a textured cube in 3DS Max and imported that. Same thing happens with that one, even more visible if there's a light nearby. The tearing becomes bright as light shines on them and black if it is not hit by light.
The best way I can describe it is that it looks like the textures are jagged where 2 objects meet and the jagged edges don't align perfectly, so you can see through the cracks.
How can I fix this?
Best regards Rasmus Petersen
- create two cubes from unity primitives (gameObject - create other - cube)
place it as you describe (0,0,0), (0,0,1)
do you still see that edges?
geometry should be perfectly positioned and sized to achieve what you want. unity's primitives are perfectly sized by default
Yes, it's still there. Both in the scene view and the game view if I add a light otherwise it's just a dark gray mas with no shape.
I have added a screenshot of it to my original post.
If you are referring to the cast and receive shadows, already tried it and didn't change anything.
Answer by Rasp1977 · Jul 31, 2012 at 10:49 PM
It didn't solve the problem. I have created a very simple scene showing it and have added it to a new post in this thread, should show up soon.
Apparently I cant upload a unitypackage file and my posts with zip files won't show up.
So here is a link to my dropbox : https://dl.dropbox.com/u/1255833/VisualTearingTest.unitypackage
Hope it will let me write the url.
Answer by Rasp1977 · Aug 01, 2012 at 11:17 AM
For some reason it removed the post with the zip file. Trying again.
Looks like you altered the camera, it's only visible from certain angles. Try importing it again and not changing anything. I will create a new screenshot of what I see in the test package.
yes i altered a little to watch for whole object. but i didn't found an angle where i can see draw lags...
it seems the error somewhere else.... can you try on different platform? for example compile it and run on other PC/mobile?
can you pack whole project, including ProjectSettings and Assets folder?
I noticed it the first time on my android game, and this one is for standalone windows, so it's on both mobile and windows.
When it's for Android it's more visible.
Can unity create a package of the entire project or can I just zip it?
Answer by Rasp1977 · Aug 01, 2012 at 05:58 PM
What I see in the VisualTearingTest.unitypackage
Answer by Rasp1977 · Aug 02, 2012 at 06:35 PM
I have been experimenting with this and different settings, I can make it appear with all platforms and all quality settings in the Unity editor, however I can't see it when I build the game to stand alone pc, but when publishing it Android its really visible and all over the place.
Anyone with an android device that want to try it out and see if it's visible on their device or have had the same problem and know how to fix it?
Trying to get hold of Unity team, they might know something about it.
Answer by Rasp1977 · Aug 02, 2012 at 06:35 PM
I have finally created and example for standalone pc where it's visible.
1 random build dungeon, it's created with a script and all blocks are 1x1 or 1x1x1 cubes made with unity, so should be fairly precise in size. They are all placed correctly, with 1 unit between them.
Walls have a new material on them and floors have the standard material, and both show the problem.
It's visible in all resolutions.
It should show up as small white lines intersecting walls and floor as the camera panes across the dungeon.
I know its much to ask someone to run an executable file from a stranger, but if someone is willing, please let me know if it's also showing up on your system so that I can eliminate my own as the problem.
Executable and data folder can be downloaded from my dropbox : https://dl.dropbox.com/u/1255833/Build.zip
Best regards Rasmus Petersen