Sunday, July 21, 2013

Mitsuba Renderer: Loading PLY model files

In this tutorial, we will look at how to load the PLY dataset. Such datasets are quite common in graphics research and most rendering papers present their outputs for these datasets. These can be downloaded from the Stanford 3D scanning repository. I will assume that you have the required dragon.ply dataset downloaded and placed in the same location where your scene XML is.

Loading a PLY dataset is as simple as adding the following scene element.

< shape type="ply" >
   < string name="filename" value="dragon.ply"/ >
   < bsdf type="roughdielectric" >
      < ! -- Tweak the roughness parameter of the material -- >
      < float name="alpha" value="0.01" / >
    < / bsdf >
< / shape >

As can be seen it is very simple. Just change the shape's type to ply and then add the shape's bsdf. Here we have chosen a rough dielectric material to give the dragon a glass appearance. You can change the roughness value which controls how clear the glass is.

I rendered the glass dragon using path tracing, photon mapping, path space MLT (PSMLT), primary sample space MLT (PSSMLT) and energy redistribution path tracing (ERPT). The results are as follows

Path tracing

Energy redistribution path tracing (ERPT) 

Primary sample space MLT (PSSMLT)
Path space MLT (PSMLT)
Photon mapping
As in earlier tutorial, the full scene file may be downloaded from here: https://www.dropbox.com/s/h93wuwmbhkz8ozd/loadPly.xml

2 comments:

Unknown said...

Thanks for your blogs,I learn much from them.But I have problem when Loading PLY model files,I do the same as you described in this blog.But when I load the loadPly.xml,it failed.The Error information is :
load [scenehandler.cpp:745] in file "../loadPly.xml":Error while creating object:(null)
Could you give some advice to solve this problem? Thank you very much!

MMMovania said...

Hi Zhang,
I have not received this error before. What version of Mitsuba have you used?

Popular Posts

Copyright (C) 2011 - Movania Muhammad Mobeen. Awesome Inc. theme. Powered by Blogger.