﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Heath's Blog-随笔分类-Graphics Programming</title><link>http://www.cppblog.com/heath/category/8441.html</link><description>There is no end, it is just the beginning!</description><language>zh-cn</language><lastBuildDate>Sun, 14 Mar 2010 10:55:25 GMT</lastBuildDate><pubDate>Sun, 14 Mar 2010 10:55:25 GMT</pubDate><ttl>60</ttl><item><title>写着玩(1)&amp;mdash;&amp;mdash;地形编辑</title><link>http://www.cppblog.com/heath/archive/2010/03/10/109392.html</link><dc:creator>Heath</dc:creator><author>Heath</author><pubDate>Wed, 10 Mar 2010 13:36:00 GMT</pubDate><guid>http://www.cppblog.com/heath/archive/2010/03/10/109392.html</guid><wfw:comment>http://www.cppblog.com/heath/comments/109392.html</wfw:comment><comments>http://www.cppblog.com/heath/archive/2010/03/10/109392.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heath/comments/commentRss/109392.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heath/services/trackbacks/109392.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 地形编辑的基本要求实际上只有三个：1) 地形网格的生成 2) 画刷所在区域的定位 3) 网格顶点高度值的修改 ...&nbsp;&nbsp;<a href='http://www.cppblog.com/heath/archive/2010/03/10/109392.html'>阅读全文</a><img src ="http://www.cppblog.com/heath/aggbug/109392.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heath/" target="_blank">Heath</a> 2010-03-10 21:36 <a href="http://www.cppblog.com/heath/archive/2010/03/10/109392.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>学习笔记—四元数与欧拉角之间的转换</title><link>http://www.cppblog.com/heath/archive/2009/12/13/103127.html</link><dc:creator>Heath</dc:creator><author>Heath</author><pubDate>Sun, 13 Dec 2009 10:44:00 GMT</pubDate><guid>http://www.cppblog.com/heath/archive/2009/12/13/103127.html</guid><wfw:comment>http://www.cppblog.com/heath/comments/103127.html</wfw:comment><comments>http://www.cppblog.com/heath/archive/2009/12/13/103127.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heath/comments/commentRss/103127.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heath/services/trackbacks/103127.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 在3D图形学中，最常用的旋转表示方法便是四元数和欧拉角，本文主要归纳了两种表达方式的转换&nbsp;&nbsp;<a href='http://www.cppblog.com/heath/archive/2009/12/13/103127.html'>阅读全文</a><img src ="http://www.cppblog.com/heath/aggbug/103127.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heath/" target="_blank">Heath</a> 2009-12-13 18:44 <a href="http://www.cppblog.com/heath/archive/2009/12/13/103127.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>PBRT 2.0</title><link>http://www.cppblog.com/heath/archive/2009/11/03/100027.html</link><dc:creator>Heath</dc:creator><author>Heath</author><pubDate>Mon, 02 Nov 2009 16:54:00 GMT</pubDate><guid>http://www.cppblog.com/heath/archive/2009/11/03/100027.html</guid><wfw:comment>http://www.cppblog.com/heath/comments/100027.html</wfw:comment><comments>http://www.cppblog.com/heath/archive/2009/11/03/100027.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cppblog.com/heath/comments/commentRss/100027.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heath/services/trackbacks/100027.html</trackback:ping><description><![CDATA[最近PBRT的官网放出这样一段news:<br><br>"We're having a contest to render the cover image for the second edition of the pbrt book---the best image rendered with pbrt submitted by December 1 will be featured as the image on the cover of the book. (See the <a href="http://www.pbrt.org/contest_rules.txt">full contest rules</a> for more information.) We are also looking for excellent rendered images to help show off concepts like depth of field, indirect lighting, caustics, subsurface scattering, etc. Contact <tt>authors at pbrt dot org</tt> if you have an image you'd like to submit for these purposes."<br><br>看样子在为PBRT第二版征集封面图片。但在book发布之前，作者老早就把source code放出来了，这次直接从1.04飙升到2.0。网上很多人评价说学习PBRT，首先编译代码的门槛就很高，确实也是这样的。抱着看看2.0在这方面有无改进的想法，下载了source code，这次直接是vs 2008的solution了。但依旧需要bison和flex，无妨，直接使用for windows的版本（在Win7下也能工作）。从1.04开始就不再包含openexr，2.0也不例外，但新版比老版本的代码及二进制部署更为合理，不再极端地为一个类产生一个dll了，而是很干净地生成一个pbrt.exe。要编译openexr（http://www.openexr.com/，最新版为1.6.1），需要ilmbase（http://www.openexr.com/，最新版为1.0.1）和zlib（www.zlib.net，最新版为1.2.3）。在编译zlib时，根据微软如下解释：&#8220;It (Microsoft Macro Assembler 8.0, included with Visual C++ 2005 Express )&nbsp;refuses to assemble a MOVD instruction with a memory operand with an implied size, and requires that "dword ptr" prefix the memory operand.&#8221;需要将编译错误指令movd的源地址用dword ptr修饰。随后编译ilmbase和openexr，期间有一些手工调整的地方，很容易搞定。最终openexr的产出放置与..\..\..\..\..\..\Deploy下。然后在pbrt项目中指定include、lib，以及加入PBRT_HAS_OPENEXR和OPENEXR_DLL Preprocessor Definition（代码缺省是tga而非exr作为纹理文件格式和输出图片格式，然而作者提供的scene却使用exr，这显然是个悲剧）。最后，干脆直接用bison和flex将ll和yy产生cpp了，然后把编译时调用bison和flex代码从.vcproj中剔除。<br>最终用编译产生的pbrt.exe渲染了几幅，只有一幅成功了（简直就是一个悲剧，后面慢慢查找原因）。看来2.0在代码易编译上，仍旧毫无改进。<br>聊以自慰，贴一张在本子上耗时126.4s的图（CPU: P8700，MEM: DDR3 1066 4G）：<br><img height=500 alt="" src="http://www.cppblog.com/images/cppblog_com/heath/pbrt2.png" width=800 border=0>
<img src ="http://www.cppblog.com/heath/aggbug/100027.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heath/" target="_blank">Heath</a> 2009-11-03 00:54 <a href="http://www.cppblog.com/heath/archive/2009/11/03/100027.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Generate Realistic Water based on multiple Normal maps</title><link>http://www.cppblog.com/heath/archive/2008/12/06/68723.html</link><dc:creator>Heath</dc:creator><author>Heath</author><pubDate>Sat, 06 Dec 2008 08:06:00 GMT</pubDate><guid>http://www.cppblog.com/heath/archive/2008/12/06/68723.html</guid><wfw:comment>http://www.cppblog.com/heath/comments/68723.html</wfw:comment><comments>http://www.cppblog.com/heath/archive/2008/12/06/68723.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/heath/comments/commentRss/68723.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heath/services/trackbacks/68723.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 基于Berlin噪声算法可以产生真实的水面效果，然计算量较大。本文介绍了一种基于多张静态normal map产生水面的简单方法。&nbsp;&nbsp;<a href='http://www.cppblog.com/heath/archive/2008/12/06/68723.html'>阅读全文</a><img src ="http://www.cppblog.com/heath/aggbug/68723.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heath/" target="_blank">Heath</a> 2008-12-06 16:06 <a href="http://www.cppblog.com/heath/archive/2008/12/06/68723.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>描边</title><link>http://www.cppblog.com/heath/archive/2008/10/11/63739.html</link><dc:creator>Heath</dc:creator><author>Heath</author><pubDate>Sat, 11 Oct 2008 07:45:00 GMT</pubDate><guid>http://www.cppblog.com/heath/archive/2008/10/11/63739.html</guid><wfw:comment>http://www.cppblog.com/heath/comments/63739.html</wfw:comment><comments>http://www.cppblog.com/heath/archive/2008/10/11/63739.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.cppblog.com/heath/comments/commentRss/63739.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heath/services/trackbacks/63739.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本文介绍了一种简单的描边渲染方法。&nbsp;&nbsp;<a href='http://www.cppblog.com/heath/archive/2008/10/11/63739.html'>阅读全文</a><img src ="http://www.cppblog.com/heath/aggbug/63739.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heath/" target="_blank">Heath</a> 2008-10-11 15:45 <a href="http://www.cppblog.com/heath/archive/2008/10/11/63739.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Fresnel Effect</title><link>http://www.cppblog.com/heath/archive/2008/10/09/63530.html</link><dc:creator>Heath</dc:creator><author>Heath</author><pubDate>Thu, 09 Oct 2008 03:57:00 GMT</pubDate><guid>http://www.cppblog.com/heath/archive/2008/10/09/63530.html</guid><wfw:comment>http://www.cppblog.com/heath/comments/63530.html</wfw:comment><comments>http://www.cppblog.com/heath/archive/2008/10/09/63530.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/heath/comments/commentRss/63530.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heath/services/trackbacks/63530.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Fresnel Effect混合了反射和折射，使得物体更真实。&nbsp;&nbsp;<a href='http://www.cppblog.com/heath/archive/2008/10/09/63530.html'>阅读全文</a><img src ="http://www.cppblog.com/heath/aggbug/63530.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heath/" target="_blank">Heath</a> 2008-10-09 11:57 <a href="http://www.cppblog.com/heath/archive/2008/10/09/63530.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>材质的可视化编辑</title><link>http://www.cppblog.com/heath/archive/2008/10/08/63488.html</link><dc:creator>Heath</dc:creator><author>Heath</author><pubDate>Wed, 08 Oct 2008 09:50:00 GMT</pubDate><guid>http://www.cppblog.com/heath/archive/2008/10/08/63488.html</guid><wfw:comment>http://www.cppblog.com/heath/comments/63488.html</wfw:comment><comments>http://www.cppblog.com/heath/archive/2008/10/08/63488.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/heath/comments/commentRss/63488.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/heath/services/trackbacks/63488.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 随着图形硬件可编程能力的不断提高，材质编辑在现代（或者次世代）游戏开发中也开始受到关注。&nbsp;&nbsp;<a href='http://www.cppblog.com/heath/archive/2008/10/08/63488.html'>阅读全文</a><img src ="http://www.cppblog.com/heath/aggbug/63488.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/heath/" target="_blank">Heath</a> 2008-10-08 17:50 <a href="http://www.cppblog.com/heath/archive/2008/10/08/63488.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>