• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Heath's Blog

            There is no end, it is just the beginning! - A Game Developer's Notes

            PBRT 2.0

            最近PBRT的官網(wǎng)放出這樣一段news:

            "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 full contest rules 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 authors at pbrt dot org if you have an image you'd like to submit for these purposes."

            看樣子在為PBRT第二版征集封面圖片。但在book發(fā)布之前,作者老早就把source code放出來(lái)了,這次直接從1.04飆升到2.0。網(wǎng)上很多人評(píng)價(jià)說(shuō)學(xué)習(xí)PBRT,首先編譯代碼的門檻就很高,確實(shí)也是這樣的。抱著看看2.0在這方面有無(wú)改進(jìn)的想法,下載了source code,這次直接是vs 2008的solution了。但依舊需要bison和flex,無(wú)妨,直接使用for windows的版本(在Win7下也能工作)。從1.04開(kāi)始就不再包含openexr,2.0也不例外,但新版比老版本的代碼及二進(jìn)制部署更為合理,不再極端地為一個(gè)類產(chǎn)生一個(gè)dll了,而是很干凈地生成一個(gè)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時(shí),根據(jù)微軟如下解釋:“It (Microsoft Macro Assembler 8.0, included with Visual C++ 2005 Express ) refuses to assemble a MOVD instruction with a memory operand with an implied size, and requires that "dword ptr" prefix the memory operand.”需要將編譯錯(cuò)誤指令movd的源地址用dword ptr修飾。隨后編譯ilmbase和openexr,期間有一些手工調(diào)整的地方,很容易搞定。最終openexr的產(chǎn)出放置與..\..\..\..\..\..\Deploy下。然后在pbrt項(xiàng)目中指定include、lib,以及加入PBRT_HAS_OPENEXR和OPENEXR_DLL Preprocessor Definition(代碼缺省是tga而非exr作為紋理文件格式和輸出圖片格式,然而作者提供的scene卻使用exr,這顯然是個(gè)悲?。W詈?,干脆直接用bison和flex將ll和yy產(chǎn)生cpp了,然后把編譯時(shí)調(diào)用bison和flex代碼從.vcproj中剔除。
            最終用編譯產(chǎn)生的pbrt.exe渲染了幾幅,只有一幅成功了(簡(jiǎn)直就是一個(gè)悲劇,后面慢慢查找原因)。看來(lái)2.0在代碼易編譯上,仍舊毫無(wú)改進(jìn)。
            聊以自慰,貼一張?jiān)诒咀由虾臅r(shí)126.4s的圖(CPU: P8700,MEM: DDR3 1066 4G):

            posted on 2009-11-03 00:54 Heath 閱讀(5133) 評(píng)論(18)  編輯 收藏 引用 所屬分類: Graphics Programming

            Feedback

            # re: PBRT 2.0 2009-12-20 00:52 slashspirit

            請(qǐng)問(wèn)樓主何處可以找到pbrt2.0源碼?我在官網(wǎng)上沒(méi)有看到鏈接,是有其他途徑么?可以分享一下么?
            今晚剛用VS2008編譯了1.03 運(yùn)行時(shí)會(huì)在WriteRGBAFile那里出異常...
            謝謝!  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0[未登錄](méi) 2009-12-28 12:28 Heath

            @slashspirithttp://github.com/mmp/pbrt-v2  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0 2010-07-11 19:19 pbrt

            你好。我在官網(wǎng)下載的pbrt-v2的源碼的pbrtlex.ll沒(méi)有辦法編譯,不知道怎么回事,出現(xiàn)下面這樣的錯(cuò)誤:
            error PRJ0019: 某個(gè)工具從以下位置返回了錯(cuò)誤代碼: "Flexing core\pbrtlex.ll"
            但編譯pbrtparse.yy時(shí)一點(diǎn)問(wèn)題都沒(méi)有。
            不知道你編譯時(shí)有沒(méi)有遇到這樣的問(wèn)題。  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0[未登錄](méi) 2010-07-11 21:34 Heath

            @pbrt
            注意flex指定輸出文件的格式,-o后沒(méi)有空格,如:
            ..\bin\flex -ocore\pbrtlex.cpp core\pbrtlex.ll  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0[未登錄](méi) 2010-07-11 22:06 Heath

            我上傳了一份在googlecode上,支持vs2010和vs2008(pbrt.sln.old),有需要的同學(xué)自助:
            http://code.google.com/p/offline-renderer/downloads/list  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0 2010-07-15 10:23 pbrt

            @Heath
            嗯,就是-o后面多個(gè)空格的問(wèn)題,現(xiàn)在已經(jīng)解決了!多謝!沒(méi)有OpenEXR和ilmbase的編譯已經(jīng)完成了,加入它們兩個(gè)的還在解決中,要是有問(wèn)題還要向你請(qǐng)教,呵呵~  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0 2010-07-15 12:21 pbrt

            在VS2008下編譯正常,在VS2010中會(huì)出現(xiàn)很多錯(cuò)誤,是為什么呢?
            在pbrt項(xiàng)目中指定include、lib,以及加入PBRT_HAS_OPENEXR和OPENEXR_DLL Preprocessor Definition,這些在哪里設(shè)置?
            呵呵,對(duì)VS2008、2010以及pbrt-v2都算是新手,很多不熟悉的。
            pbrt-v1時(shí)也挺麻煩的,不過(guò)到V2之后很多都不知道怎么設(shè)置了  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0 2010-07-17 10:08 pbrt

            @pbrt
            已經(jīng)搞定了,呵呵,就是渲染時(shí)需要的時(shí)間變得比v1時(shí)長(zhǎng)了不少,編譯smoke-2.pbrt用了170多秒,bunny.pbrt用了十來(lái)分鐘,渲染出來(lái)的效果也不太好~~  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0 2010-08-04 17:10 fseraph

            原來(lái)你的blog換地方了,今天才發(fā)現(xiàn)  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0 2010-09-10 23:40 CecileChandler

            Some time ago, I did need to buy a car for my corporation but I didn't earn enough cash and could not purchase something. Thank God my mother adviced to take the <a href="http://bestfinance-blog.com/topics/home-loans">home loans</a> at creditors. Thus, I did so and used to be satisfied with my short term loan.   回復(fù)  更多評(píng)論   

            # re: PBRT 2.0 2010-11-16 21:39 essay

            My practice with progressive custom term paper company has been rewarding. You have fill my own expectations and the customer term paper you offer is extremely accommodating to my needs.Thank You!  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0 2012-07-01 23:10 written essay

            Are you looking for good paper writing service? Check our home page (qualityessay.com) and purchase essay writing from the expert agency.  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0 2012-09-27 15:11 new comer

            我是新手,編譯出了pbrt.exe 用的是vs2010 pbrt2.0版本,可是怎么進(jìn)行渲染,望指教,詳細(xì)的,多謝  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0[未登錄](méi) 2012-10-11 22:47 Heath

            @new comer
            PBRT是命令行程序,使用pbrt --help可以看到usage。它以.pbrt文件(場(chǎng)景描述文件)為輸入,缺省輸出.exr,用imageview打開(kāi)。另外,pbrt的示例場(chǎng)景可以到它的官網(wǎng)下載。  回復(fù)  更多評(píng)論   

            # re: PBRT 2.0 2012-10-13 18:53 new comer

            謝謝,已經(jīng)可以看到圖片了  回復(fù)  更多評(píng)論   

            国产农村妇女毛片精品久久| 婷婷久久综合九色综合九七| 亚洲精品国产综合久久一线| 精品免费久久久久国产一区| 久久综合久久久| 国产亚洲欧美成人久久片| 久久精品一本到99热免费| 亚洲色大成网站www久久九| 精品伊人久久大线蕉色首页| 精品久久久无码中文字幕| 亚洲愉拍99热成人精品热久久 | 精品国产乱码久久久久久1区2区| 亚洲欧美日韩精品久久亚洲区 | 亚洲?V乱码久久精品蜜桃 | 久久本道久久综合伊人| 久久精品国产清自在天天线| 女同久久| 亚洲AV无码久久精品狠狠爱浪潮| 久久影院综合精品| 久久精品欧美日韩精品| 久久精品成人欧美大片| 怡红院日本一道日本久久 | 日本一区精品久久久久影院| 久久成人影院精品777| 精品久久久久一区二区三区| 久久精品国产一区二区电影| 久久妇女高潮几次MBA| 国产精品久久久久国产A级| 日本三级久久网| 亚洲va中文字幕无码久久| 久久精品国产秦先生| 欧美精品丝袜久久久中文字幕 | av午夜福利一片免费看久久 | 久久亚洲综合色一区二区三区| 亚洲精品高清久久| 一本久道久久综合狠狠躁AV| 久久久无码精品亚洲日韩按摩| 国产高潮国产高潮久久久91 | 无码人妻久久一区二区三区蜜桃| 久久av无码专区亚洲av桃花岛| 久久露脸国产精品|