The resultant object looks like it is reflecting its environment!
Mathematically, the cube face is identified by using the normal vectors
(nx,ny,nz) on the surface of the object. The greatest component is used to identify
where the surface should be "looking"; and hence the cube face and the texture
image to be used. The other two coordinates are used to select the texel from the
texture by a simple 3D to 2D projection. If, say, ny was the highest value
component then we divide the other components by ny (nx/ny,nz/ny). These
coordinates are normalized to give the (s,t) values into the texture map. The code
to find the face and bind the appropriate texture image is shown below:
วัตถุดังกล่าวดูเหมือนว่าจะสะท้อนให้เห็นถึงสภาพแวดล้อมของมัน !
ทางคณิตศาสตร์ , ลูกบาศก์ใบหน้าถูกระบุโดยใช้
เวกเตอร์ปกติ ( NX , NY , NZ ) บนพื้นผิวของวัตถุ ส่วนประกอบที่ยิ่งใหญ่ที่สุดคือใช้เพื่อระบุ
ที่ผิวควร " มอง " และด้วยเหตุนี้ก้อนใบหน้าและภาพพื้นผิว
ที่จะใช้ อีกสองตำแหน่ง จะใช้ในการเลือกเท็กเซลจาก
พื้นผิวโดยง่าย 2D 3D ฉาย ถ้าพูด , NY เป็นองค์ประกอบค่า
สูงสุดแล้วเราแบ่งองค์ประกอบอื่น ๆโดย NY ( NX / NZ / NY , NY ) พิกัด
เป็นปกติให้ ( S , T ) ค่าในแผนที่พื้นผิว รหัส
หาใบหน้าและผูกภาพพื้นผิวที่เหมาะสมที่แสดงอยู่ด้านล่าง :
การแปล กรุณารอสักครู่..
