Add Lou's Pseudo 3d Web Page
parent
7349317b92
commit
1eec57d463
7
Lou%27s-Pseudo-3d-Web-Page.md
Normal file
7
Lou%27s-Pseudo-3d-Web-Page.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
<br>Be aware that you will have totally different FOV values for horizontal (x) and vertical (y) for a regular or widescreen monitor that is in horizontal orientation. What we want to do to repair our perspective downside is to precompute a listing of distances for [5 Step Formula System](https://gitea.jasonstolle.com/karinebarff109) each line of the screen. In brief, the issue is how to describe a flat aircraft in 3d. To grasp how this works, first think of the 2d equal: a line! To explain a horizontal line in 2d, you'd say that for each (x, y) coordinate the y is the same. If we prolong this into 3d, [5 Step Formula system](https://gitea.jasonstolle.com/xqzanglea30913/5-step-formula-system7068/wiki/Study-Report%3A-Analyzing-5-Step-Formula-and-Its-Reviews) it turns into a plane: for each x and z distance, the y is identical! When it comes to a flat horizontal surface, it doesn't matter how far [legit work from home guide](http://gitea.frp.linyanli.cn/hectorchung054) the digital camera it's, the y is at all times the identical. Likewise, it would not matter how much to the left or right the purpose is, the y will nonetheless be the same.<br>
|
||||
|
||||
<br>Again to figuring out the distance of every line of the display screen: let's name this a Z Map. Calculating the Z Map is just a matter of rearranging the 3d projection formulation to discover a Z value for each display Y! This is the same for every line because, as described in the introductory paragraph, we're thinking about a flat street for the time-being. In addition to wanting much more correct and avoiding the "oatmeal effect", it has the benefit that it is straightforward to compute what the utmost draw distance is. The road is mapped onto the display by reading by this buffer: For every distance, it's essential to figure out what part of the road texture belongs there by noting how many units each stripe or pixel of the texture take up. Although we now know the [distance](https://www.dictionary.com/browse/distance) of every row of the screen, it could also be helpful to cache either the width of the road or scale issue for every line.<br>
|
||||
|
||||
<br>The scaling issue would simply be the inverse of the gap, adjusted in order that the value is 1 on the road which the participant's car graphic spends the most time. This may then be used to scale sprites that are on a given line, or to find what the width of the road is. To curve a road, you just want to alter the place of the middle-line in a curve shape. There are a pair methods to do that. A technique is to do it the way the Z positions were achieved in "The simplest Street": with three variables. That is, beginning at the bottom of the display screen, the amount that the middle of the highway shifts left or proper per line steadily will increase. Like with the texture reads, we will refer to these variables as the center line (curve) position, the curve velocity, and the [curve acceleration](https://www.google.com/search?q=curve%20acceleration&btnI=lucky). There are some issues with this method though.<br>
|
||||
|
||||
<br>One is that S-curves aren't very convinient. Another limitation that going right into a flip looks the same as coming out of a flip: The road bends, and merely unbends. To enhance the scenario, we'll introduce the concept of highway segments. A highway segment is a partition which is invisible to the participant. Consider it as an invisible horizontal divide which units the curve of the street above that line. At any given time, one of those segment dividers is at the underside of the screen and one other is travelling down at a steady price towards the bottom of the screen. Let's name the one at the underside the base segment, because it sets the preliminary curve of the street. When we begin drawing the road, the first thing we do is have a look at the bottom level and set the parameters for drawing accordingly. As a turn approaches, the phase line for that would start in the gap and come in direction of the participant kind of like some other street object, besides it needs to drift down the screen at a gentle fee.<br>
|
Loading…
Reference in New Issue
Block a user