Dive Board



Barrel distortion

Barrel distortion

by PatHightree on Sep 1st, 2014 21:16 PM

Just starting out here, and I have a basic question.
Why is there no barrel distortion on the dive games?
Is that purely a performance issue?
If so, why does the google cardboard app do have it?

Thanks in advance, Patrick

PatHightree

Posts: 2

Joined: 30.08.2014


Re: Barrel distortion

by Stefan on Sep 2nd, 2014 03:08 AM

Mostly for performance reasons.
You are free to use a barrel distortion setup in your games.
Its just not included in the plugin because i have not found a solution yet that will automatically determine if the power of the deviceis big enough and then activate a distorted mode.
i have run some tests and concluded:

Pixel shader based barrel solutions :
pretty slow on 1080p devices

mesh based barrel solution:
runs fine , only too slow on old devices.

are there any other ways to do it without unity pro ?

Stefan

Posts: 129

Joined: 30.06.2013

dive-owner


Re: Barrel distortion

by PatHightree on Sep 2nd, 2014 09:12 AM

Thanks for the explanation, I figured as much.
The only thing I can think of would be to incorporate the barrel distortion in a vertex shader and override all materials.
That would deform the final image somewhat, but might be acceptable.
The central area gets compressed so you don't have long edges there.
It would be pretty performant too, I think.

PatHightree

Posts: 2

Joined: 30.08.2014


Re: Barrel distortion

by Stefan on Sep 2nd, 2014 10:23 AM

yes thats definately a possibility, however i guess some longer lines would appear to be moving when moving your head though.

Stefan

Posts: 129

Joined: 30.06.2013

dive-owner


Re: Barrel distortion

by Salmo on Sep 3rd, 2014 22:56 PM

is there any ressources out there about how to make mesh based barrel distortion ?
could always be an option that can be deactivated manually in "settings" if performance are too slow on other devices

Salmo

Posts: 21

Joined: 26.11.2013


STATISTICS


Total posts: 171547


Total topics: 41576


Total members: 44836


Newest member: Daniel G.