- Home /
First Person Camera Distortion Problem
The first person camera is distorting surfaces when I get too close to them. I have not messed with the FOV settings, it is currently set to 60.
I need the texture to be totally flat and undistorted by the camera, as the player will spend a lot of time climbing surfaces.
This is what it looks like:
It's tough to tell exactly what I'm looking at there. However, I still have a thought regarding what the problem may be.
While experimenting with screen-space texturing on an uneven surface, I've found that calculating ALL of the screen-space uv coordinates entirely in the vertex shader often lead to distorted interpolation when transferred over to the fragment shader while viewed from extremely close up. It was a shame to transfer those calculations to the fragment shader, but it immediately cleared up all of the distortion I was seeing in that situation.
I'm very unfamiliar with shader coding. The texture is using the default shader, so what do I need to change in the code, exactly?
what does the texture original looks like? what shader are you using?
The original texture looks like this:
I'm using unity's standard opaque shader.
Is that texture specifically what we're seeing in the original image, or is that a reflection in the original image?
This looks like a problem with parallax/height map. Does your mesh have tangents built correctly? And how close are you to the surface? Even in an fps there should be a distance between the camera and a surface
That is exactly what the problem is, actually. I disabled the height map, and the issue disappeared. The problem now is that the texture looks very flat.
As far as distance, the character is scaling a rock face with uneven surfaces, so it's unavoidable that the camera will make unintentional contact with some of those surfaces.
Glad I could help! Have a look at some AAA fps games and you'll see you can't get right up close to a wall, put this limit in and you should be able to use height maps without distortion.
It might be because you are using a height map? I had a similar problem with rocks when i used them
That's actually exactly what it was. We ended up scrapping the climbing mechanic, so it didn't matter, but you are correct.
Your answer
Follow this Question
Related Questions
Zooming a camera without distorting edges with POV changes 1 Answer
How do i combine first and third person views? 1 Answer
Clarification with Texture2D.ReadPixels. 1 Answer
How to use Second Camera for farther draw distance without creating a visible border? 0 Answers
Character Moving in Elliptical Pattern 0 Answers