Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by archelyte_vz · Nov 01, 2018 at 05:13 AM · cameratextureviewdistortionfirst-person

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: alt text

distortion.png (511.6 kB)
Comment
Add comment · Show 10
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Eno-Khaon · Nov 01, 2018 at 06:22 AM 1
Share

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.

avatar image archelyte_vz Eno-Khaon · Nov 01, 2018 at 04:32 PM 0
Share

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?

avatar image SunnyChow · Nov 01, 2018 at 08:39 AM 0
Share

what does the texture original looks like? what shader are you using?

avatar image archelyte_vz SunnyChow · Nov 01, 2018 at 04:35 PM 0
Share

The original texture looks like this:
alt text


I'm using unity's standard opaque shader.

5f21d144-9da7-4d16-a585-ce72d24dc5a1-scaled.jpg (122.1 kB)
avatar image Eno-Khaon archelyte_vz · Nov 01, 2018 at 11:28 PM 0
Share

Is that texture specifically what we're seeing in the original image, or is that a reflection in the original image?

avatar image Jordash · Nov 02, 2018 at 02:10 AM 1
Share

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

avatar image archelyte_vz Jordash · Nov 02, 2018 at 03:25 PM 0
Share

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.

avatar image Jordash archelyte_vz · Nov 03, 2018 at 02:19 AM 0
Share

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.

avatar image hectorux · Nov 08, 2018 at 10:59 PM 1
Share

It might be because you are using a height map? I had a similar problem with rocks when i used them

avatar image archelyte_vz hectorux · Feb 06, 2020 at 10:26 PM 0
Share

That's actually exactly what it was. We ended up scrapping the climbing mechanic, so it didn't matter, but you are correct.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

175 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges