Paraboloid environment mapping
Paraboloid maps provide a good performance and higher quality than spherical maps. First a picture of an elliptical paraboloid, similar we will u it:
相对于spherical map,paraboloid map的性能更好,质量更佳。下图是⼀张椭球形paraboloid,后⾯会⽤到。
Elliptic paraboloid
An advantageous feature of paraboloids is that incident rays coming from the focal point, will be reflected parallel to the direction of the paraboloid, which facilitates the calculation of the projection:
paraboloid映射的⼀个优点是,从焦点出发的⼊射光线经过折射之后,将会以平⾏于paraboloid光轴的⽅向射出,这个特性会在后续的投影计算过程中被⽤到。利⽤这个特性,paraboloid map的相机使⽤的是正交矩阵,任何⼊射光线在paraboloid表⾯上的点都可以通过垂直于near clipping平⾯的的⽅向投影到paraboloid map上。
Paraboloid reflection
When using paraboloid mapping the space around the light source is divided into two hemispheres (paraboloids). There is a front and a rear hemisphere, which are put together with the open sides ahead, forming an enclod space, as in the picture above.
在paraboloid shadow map的实现⽅法中,光源周边的空间被分割成两个半球(paraboloids)。这两个半球被称为前向(front)半球与后向(rear)半球,如上图所⽰,这两个半球开⼝处衔接起来,就形成了⼀个密闭的空间。
Ma thema tic der iva tio n
First we choo a paraboloid that is suitable for this purpo:
我们为shadow map选定了⼀种合适的paraboloid形状,其公式给出如下(抛物线,两个抛物线组成的密闭形状,就形成了⼀个凸透镜,满⾜之前所说的焦点⼊射光线平⾏于光轴射出的特性):
darkangel
son of bitch什么意思抛物线公式
Each vertex rendered must be projected onto the paraboloid surface. A picture as explanation:
需要产⽣点光投影的所有物体的顶点在渲染后,都能够投射到paraboloid表⾯上,如下图所⽰:
cameron knightParaboloid projection厦门商务英语培训班
The x- and y- coordinate of the projection point must be found. The coordinates can be calculated using the normal vector at the point of projection. For this we first need the definition of the normal vector at the surface. This is determined by the cross product of the tangents. We will get the tangents from the partial derivation of the function with respect to x and y.
这个顶点在paraboloid表⾯上的投影点,是通过连接凸透镜焦点与顶点的直线与表⾯所相交的点,由于凸透镜的特性,这个⼊射光线的反射光线必定是垂直向上的(也就是平⾏于光轴)。
为了计算出对应的投影点,⾸先我们需要得到投影点对应的平⾯法线,平⾯法线可以通过平⾯上的两条切线通过叉乘得到,⽽切线则可以通过outweigh
f(x,y)的偏微分得到,如下所⽰:亚克力是什么意思
切线公式
The direction vector of the incident projection ray corresponds to the normalized vertex position in the paraboloid coordinate system. If we add the reflection vector to the direction vector, we get a vector that corresponds to the normal at the point of projection, only the length is different. Becau the reflection vector has the same direction as the z-axis, we only have to add 1 to the z-value of the incident vector.
⼊射光线的⽅向向量与表⾯上焦点在paraboloid的坐标是息息相关的。如果我们根据此点的法线⽅向推算⼊射光线的反射光线反向,我们就会发现,反射光线的⽅向是与Z轴平⾏的。⽽法线的⽅向实际上等于⼊射光线的⽅向(这⾥说的是⼊射光线的反⽅向)与反射光线的⽅向之和,也就是说,法线的⽅向实际上是⼊射光线的⽅向(归⼀化)在Z轴上加1即可。
marktwainIf we now establish a relationship to the above derivation, it can be en that a division of the added vector by its z-value calculates the x-and y-coordinate of the desired projection point.
按照上⾯的推导,我们可以得到如下的法线计算公式:
顺利英语Implementation
a.) Creation of the paraboloid shadow maps:
The paraboloid shadow maps must be created in the first two render pass. I ud a resolution of 1024 x 1024, for the maps, but this can be chon at will. The higher the resolution, the better the shadow quality, but the wor the performance. For the texture format it is recommended to u the R32F floating point format.
paraboloid shadow map必须是在渲染的最开始就开始⽣成(感觉没有必要吧,只要在使⽤之前⽣成不就⾏了,难道有其他的什么限制?)。此处使⽤的paraboloid map的分辨率是1024*1024的,实际上可以根据实际需要修正,分辨率太⾼了虽然会有助于提升阴影质量,但是同时也会导致性能的下降,⾄于贴图的格式,推荐使⽤32位的R32F浮点格式。can you feel it非诚勿扰
报考类别怎么填First of all, the render target for the front shadow map must be t. Next the world view matrix for the
paraboloid space must be created and t as a parameter for the effect. The world matrix corresponds to a common transformation in the absolute space and the view matrix is the matrix that allows us to render the scene from the perspective of the light. The position of this matrix is the light position and the orientation can be chon freely. I have chon the orientation towards the objects that will be illuminated. A projection matrix is not needed, becau we perform the projection manually.