- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
12.Illumination.ppt.ppt
Global light properties glLightModelfv(property, value) Enable two sided lighting property = GL_LIGHT_MODEL_TWO_SIDE value = GL_TRUE (GL_FALSE if you don’t want two sided lighting) Global ambient color Property = GL_LIGHT_MODEL_AMBIENT Value = (red, green, blue, 1.0); Check the red book for others Surface Normals Correct normals are essential for correct lighting Associate a normal to each vertex glBegin(…) glNormal3f(x,y,z) glVertex3f(x,y,z) … glEnd() The normals you provide need to have a unit length You can use glEnable(GL_NORMALIZE) to have OpenGL normalize all the normals Lighting revisit Where is lighting performed in the graphics pipeline? modeling and viewing v1, m1 v2, m2 v3, m3 per vertex lighting projection clipping interpolate vertex colors viewport mapping Rasterization texturing shading Display Polygon shading model Flat shading – compute lighting once and assign the color to the whole polygon Flat shading Only use one vertex (usually the first one) normal and material property to compute the color for the polygon Benefit: fast to compute It is used when: The polygon is small enough The light source is far away (why?) The eye is very far away (why?) OpenGL command: glShadeModel(GL_FLAT) Mach Band Effect Flat shading suffers from “mach band effect” Mach band effect – human eyes accentuate the discontinuity at the boundary Side view of a polygonal surface perceived intensity Smooth shading Reduce the mach band effect – remove value discontinuity Compute lighting for more points on each face Flat shading smooth shading Smooth shading Two popular methods: Gouraud shading (used by OpenGL) Phong shading (better specular highlight, not supported by OpenGL) Gouraud Shading (1) The smooth shading algorithm used in OpenGL glShadeModel(GL_SMOOTH) Lighting is calculated for each of the polygon vertices Colors are interpolated for interior pixels Gouraud Shading (2) Per-ve
您可能关注的文档
- !FeSi2和!Fe(C,Si)薄膜的电子显微及X射线衍射研究.PDF
- 'Culture'-GeirGoldenSther.ppt
- 'Sausage'clusterradiorelic-ESO.PDF
- (Attachment1)Report-Stockton-on-TeesBoroughCouncil.doc
- (Attachment5)CommitteeReport(304Kbytes)-South.doc
- (coronal)type-IIs-SCOSTEP.PDF
- (H)CuHgAgPtAu。金属活动性由强逐渐减弱规律探寻金属.ppt
- (Journel).doc-ijsetr.doc
- (X),(Y)és(Z)-BME-építészetiábrázolásTanszék.ppt
- (十四)力學.PDF
最近下载
- 地理七上.doc VIP
- 麦克维尔自然冷却风冷螺杆冷水机组 安装使用手册(1).pdf VIP
- 《职业生涯规划与就业指导》高职大学生就业指导全套教学课件.pptx
- 竣工图绘制合同协议.docx VIP
- 浙江省温州市2022-2023学年高一上学期期末教学质量统一检测政治试题.pdf VIP
- 匹克球理论考试试题库及答案.docx VIP
- 2024年福建省龙岩市新罗区西城街道招聘社区工作者真题带答案详解.docx VIP
- 北京市东城区东直门中学2024-2025学年七年级上学期分班考数学试卷.docx VIP
- 2024-2025学年人教版初中体育与健康九年级(全一册)教学设计.docx
- 冬季防寒防冻培训.pptx VIP
原创力文档


文档评论(0)