Search Unity

How to make this fake reflection of Sonic Adventure?

Discussion in 'Image Effects' started by FrostApps, Jul 15, 2018.

  1. FrostApps

    FrostApps

    Joined:
    Dec 15, 2014
    Posts:
    39
    Many 128bit generation games using that effect.
    Someone knows how to do it, without using real-time Shaders.
    I wanted a fake effect to use on mobiles.

    Image:


    Video: check in from 4:00 min

     
  2. ntjahero

    ntjahero

    Joined:
    Jun 18, 2018
    Posts:
    9
    If you mean the reflection on the car - I would go for a custom shader that samples an environment map based on the reflection of the view vector by the surface normal.
    The reflected vector can be calculated with this formula:
    http://paulbourke.net/geometry/reflected/
    Ri is the view vector, Rr is the result.
    The coordinates of the result can then be used to sample a latlong texture like so:
    Code (CSharp):
    1.     float PI = 3.14159;
    2.     float phi = atan2(R.x,R.z);
    3.     float theta = acos(R.y);
    4.     float U = (PI + phi) / (2*PI);
    5.     float V = theta/PI;
    6.  
    where R is the reflected vector
     
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I would suggest sampling a cubemap on a modern mobile wouldn't be terribly expensive unless you want a bad distortion effect for stylised purposes.

    Also "128bit generation" is a nonsense term that is meaningless to most developers, it was purely just nonsense marketing.