Leon-de-Owlet / magiccube4d

Automatically exported from code.google.com/p/magiccube4d
0 stars 0 forks source link

View scale affects shadows strangely. #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Make the view scale small and the shadows will appear to be floating above 
the horizon rather than being on the ground.

Original issue reported on code.google.com by roi...@gmail.com on 30 Jul 2009 at 4:51

GoogleCodeExporter commented 9 years ago
Eye W also affects the shadows strangely. If the horizon were exactly in the 
center,
it would look better but still not right. I think that we're missing is a proper
perspective transform in which everything approaches a vanishing point in the 
center
of the horizon. Or maybe even some other point on the horizon would make for an
interesting effect, but as it is, the shadows are often not believable.

Original comment by cutelyaw...@gmail.com on 4 Nov 2009 at 5:41

GoogleCodeExporter commented 9 years ago
I think we'll have two options to make the behavior correct:

(1) We'll have to transform the horizon along with the scaling (the horizon 
vertical 
position would not in general be at the same location).  The auto view scaling 
would 
probably do some pretty wild things to the horizon here though.

(2) We can merge what is the current 2D scaling factor into the 4D view matrix 
of 
the rotation handler, so that the scaling is done before shadows are 
calculated.  
This is my preferred choice.  The downside here is that a big zoom might 
actually 
make portions of the puzzle such that they should be below the ground, and I 
doubt 
we're handling drawing of that correctly.

Original comment by roi...@gmail.com on 4 Nov 2009 at 5:34