alconmilenario Posted March 14, 2016 Share Posted March 14, 2016 Hello! I have a project with a coffee cup, which have a little plane over it where people can insert a photo. At the attached are some examples. The problem is: when a photo is in that space, and I move inside the world, or the camera is turned... The picture turns a little transparent, and the color of the cup turn overhead the photo. I would like, that the picture would be the most important, and would have as much definition as possible. As nearest the camera is, better visibiliy of the pictures, without the cup color interruption. I am sure that he layer with the picture have a material with alpha of 1. And the color of the cup is made with diffuseColor. With the attached pictures I am sure that it would be more understandable. Thanks in advance. I am turning crazy with that problem. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 15, 2016 Share Posted March 15, 2016 Hello nice project Just set your plane.material.zOffset = 1 and this should fix your depth fighting issue Quote Link to comment Share on other sites More sharing options...
alconmilenario Posted March 15, 2016 Author Share Posted March 15, 2016 7 hours ago, Deltakosh said: Hello nice project Just set your plane.material.zOffset = 1 and this should fix your depth fighting issue Thanks a lot, but it was not resolve my problem. I have put in the cup mesh a zOffset=1 and in the plane with the picture a zOffset=-1. I have read about it in that example: http://www.babylonjs-playground.com/#1NYKLE#4 I have tested with cup mesh with a zOffset of 0 and with the picture to 1, and the result is exactly the same. Any idea what is happening? Quote Link to comment Share on other sites More sharing options...
eboo Posted March 15, 2016 Share Posted March 15, 2016 with firefox, i see a red ball without any trouble. Quote Link to comment Share on other sites More sharing options...
alconmilenario Posted March 15, 2016 Author Share Posted March 15, 2016 2 minutes ago, eboo said: with firefox, i see a red ball without any trouble. I can see the red ball too, but I said that I used it only to understand how to use the zOffset. The problem of the first post is which I continue suffering. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 15, 2016 Share Posted March 15, 2016 You can increase zOffset In the meantime, you can also reproduce the issue in the playground. This will be easier to help you then Quote Link to comment Share on other sites More sharing options...
alconmilenario Posted March 16, 2016 Author Share Posted March 16, 2016 8 hours ago, Deltakosh said: You can increase zOffset In the meantime, you can also reproduce the issue in the playground. This will be easier to help you then Hello!! I have solved it changing the values of the camera. It was the main problem. At first I had a cam.fov = 0.01, and I supposed that it was a very small range. Then I have put more, and apparently it is solved. I discover it when I was developing a playground to show the code. I don't know how it works, but testing with some combinations of numbers of cam.fov and cam.radius it is solved. Thanks for your time!! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 16, 2016 Share Posted March 16, 2016 Excellent! Quote Link to comment Share on other sites More sharing options...
MasterSplinter Posted March 17, 2016 Share Posted March 17, 2016 I need to spend more time reading through the questions...learn so much Boz 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 17, 2016 Share Posted March 17, 2016 Can someone explain why the fov being set low would cause clipping like this? I've seen other odd happenings with different 3D engines when you set the near clip of the camera to a low value, but what's the reason for this? Can someone link me to the script that would deal with this function with the camera. Quote Link to comment Share on other sites More sharing options...
MasterSplinter Posted March 17, 2016 Share Posted March 17, 2016 3 minutes ago, Pryme8 said: Can someone explain why the fov being set low would cause clipping like this? I've seen other odd happenings with different 3D engines when you set the near clip of the camera to a low value, but what's the reason for this? Can someone link me to the script that would deal with this function with the camera. Orrrhh mang. U need to look at the source on what you are trying to do. And test against something vanilla to determine that. I would think with a low FOV everything would get sandwiched.... Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 17, 2016 Share Posted March 17, 2016 Yea on others engines I've seen it clip models in half if you set it to low Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.