Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualL. Spiro

Posted 16 January 2013 - 07:13 PM

Firstly, the main problem is that you are using a perspective transform instead of an orthogonal transform.  In a perspective transform, only the particles with exactly the correct Z distances will be scaled correctly according your scale.

 

The first fix is to use an orthogonal transform.

 

Once that is done you will probably notice that everything gets small.

That is because now one pixel = one unit.

 

So if a particle has traveled 100 pixels on the screen it is trivial to calculate how many world units that means.  And the inverse of such operation (taking 100 world units and showing that as pixels on a graph/bar) is also trivial.

 

 

I leave this up to the reader who shows some self-help efforts.

 

 

L. Spiro


#1L. Spiro

Posted 16 January 2013 - 03:28 AM

Firstly, the main problem is that you are using a perspective transform instead of an orthogonal transform.  In a perspective transform, only the particles with exactly the correct Z distances will be scaled correctly according your scale.

 

The first fix is to use an orthogonal transform.

 

Once that is done you will probably notice that everything gets small.

That is because no one pixel = one unit.

 

So if a particle has traveled 100 pixels on the screen it is trivial to calculate how many world units that means.  And the inverse of such operation (taking 100 world units and showing that as pixels on a graph/bar) is also trivial.

 

 

I leave this up to the reader who shows some self-help efforts.

 

 

L. Spiro


PARTNERS