Skip to content

Commit

Permalink
fix ShapeNetTriangle constructor bug and add rendering scripts and re…
Browse files Browse the repository at this point in the history
…sults.
  • Loading branch information
shi-jian committed May 4, 2017
1 parent 20e56ab commit 68bf9d3
Show file tree
Hide file tree
Showing 16 changed files with 240,208 additions and 37 deletions.
41 changes: 7 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,16 @@ If you meet the problem of missing header such as mitsuba_precompiled_header.hpp

Currently it cannot handle per-vertex normal or smooth group in ShapeNet obj. You can use 'maxSmoothAngle' to add some smoothness rendering effect.

A sample rendering configuration render.xml:
#### Samples

```xml
<?xml version="1.0" encoding="utf-8"?>
Rendering scripts and results can be found [here](shapenet). Images rendered with this ShapeNet importer(left) and Mitsuba OBJ importer(right):

<scene version="0.5.0">
<shape type="shapenet">
<string name="filename" value="ShapeNetCore.v1/02691156/5903b9eeb53f1f05a5a118bd15e6e34f/model.obj" />
<float name="maxSmoothAngle" value="75" />
</shape>

<emitter type="constant" id="env">
</emitter>

<integrator type="bdpt" >
</integrator>

<sensor type="perspective">
<transform name="toWorld">
<lookAt target="0,0,0" origin="1,1,1" up="0,1,0"/>
</transform>
<string name="focalLength" value="50mm"/>

<sampler type="ldsampler">
<integer name="sampleCount" value="32"/>
</sampler>

<film type="ldrfilm">
<integer name="width" value="600"/>
<integer name="height" value="600"/>
<boolean name="banner" value="false"/>
</film>
</sensor>
</scene>
```
![alt text](shapenet/sample-car-shapenet.png "ShapeNet importer")
![alt text](shapenet/sample-car-obj.png "Mitsuba OBJ importer")

![alt text](shapenet/sample-chair-shapenet.png "ShapeNet importer")
![alt text](shapenet/sample-chair-obj.png "Mitsuba OBJ importer")

#### Download

A compiled Windows x64 DLL can be downloaded [here](http://share.shijian.org.cn/shapenet/render/shapenet.dll) .
A compiled Windows x64 DLL can be downloaded [here](http://share.shijian.org.cn/shapenet/render/shapenet.dll) . Please put it under 'plugins' folder.
121 changes: 121 additions & 0 deletions shapenet/02958343/1a0bc9ab92c915167ae33d942430658c/model.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
#
## Alias OBJ Material File
# Exported from SketchUp, (c) 2000-2012 Trimble Navigation Limited

newmtl BLACKNESS1
Ka 0.000000 0.000000 0.000000
Kd 0.000000 0.000000 0.000000
Ks 0.330000 0.330000 0.330000

newmtl BODY_COLOR1
Ka 0.000000 0.000000 0.000000
Kd 0.588235 0.588235 0.588235
Ks 0.330000 0.330000 0.330000

newmtl ANODIZED1
Ka 0.000000 0.000000 0.000000
Kd 0.803922 0.803922 0.803922
Ks 0.330000 0.330000 0.330000

newmtl CHROME1
Ka 0.000000 0.000000 0.000000
Kd 0.803922 0.803922 0.803922
Ks 0.330000 0.330000 0.330000

newmtl RIMS_TX1
Ka 0.000000 0.000000 0.000000
Kd 0.803922 0.803922 0.803922
Ks 0.330000 0.330000 0.330000

newmtl LINES1
Ka 0.000000 0.000000 0.000000
Kd 0.000000 0.000000 0.000000
Ks 0.330000 0.330000 0.330000

newmtl BLACK_PLASTIC1
Ka 0.000000 0.000000 0.000000
Kd 0.000000 0.000000 0.000000
Ks 0.330000 0.330000 0.330000

newmtl GLASS_HD1
Ka 0.000000 0.000000 0.000000
Kd 0.784314 0.784314 0.784314
Ks 0.330000 0.330000 0.330000
d 0.500000

newmtl BLINKERS1
Ka 0.000000 0.000000 0.000000
Kd 1.000000 0.423529 0.141176
Ks 0.330000 0.330000 0.330000

newmtl BLINKERS2
Ka 0.000000 0.000000 0.000000
Kd 0.756863 0.141176 0.141176
Ks 0.330000 0.330000 0.330000

newmtl TIRES_BUMPTREAD1
Ka 0.000000 0.000000 0.000000
Kd 0.050980 0.050980 0.050980
Ks 0.330000 0.330000 0.330000

newmtl DASH1
Ka 0.000000 0.000000 0.000000
Kd 0.584314 0.584314 0.584314
Ks 0.330000 0.330000 0.330000

newmtl IINTERIOR1
Ka 0.000000 0.000000 0.000000
Kd 0.184314 0.184314 0.184314
Ks 0.330000 0.330000 0.330000

newmtl RIMS1
Ka 0.000000 0.000000 0.000000
Kd 0.803922 0.803922 0.803922
Ks 0.330000 0.330000 0.330000

newmtl WINDOWS1
Ka 0.000000 0.000000 0.000000
Kd 0.784314 0.792157 0.815686
Ks 0.330000 0.330000 0.330000
d 0.500000

newmtl STW1
Ka 0.000000 0.000000 0.000000
Kd 0.588235 0.588235 0.588235
Ks 0.330000 0.330000 0.330000

newmtl GLASS_BLACK1
Ka 0.000000 0.000000 0.000000
Kd 0.000000 0.000000 0.000000
Ks 0.330000 0.330000 0.330000

newmtl TAILS1
Ka 0.000000 0.000000 0.000000
Kd 0.584314 0.584314 0.584314
Ks 0.330000 0.330000 0.330000

newmtl FrontColor
Ka 0.000000 0.000000 0.000000
Kd 1.000000 1.000000 1.000000
Ks 0.330000 0.330000 0.330000

newmtl Color_A01
Ka 0.000000 0.000000 0.000000
Kd 1.000000 0.000000 0.000000
Ks 0.330000 0.330000 0.330000

newmtl Color_I01
Ka 0.000000 0.000000 0.000000
Kd 0.000000 0.000000 1.000000
Ks 0.330000 0.330000 0.330000

newmtl Color_009
Ka 0.000000 0.000000 0.000000
Kd 0.000000 0.000000 0.000000
Ks 0.330000 0.330000 0.330000

newmtl Color_007
Ka 0.000000 0.000000 0.000000
Kd 0.227451 0.227451 0.227451
Ks 0.330000 0.330000 0.330000

Loading

0 comments on commit 68bf9d3

Please sign in to comment.