Commit 78e5392
authored
feat: Modify testrender to work with triangle meshes (#1865)
testrender was originally envisioned as a tiny example renderer that should only handle spheres/planes. Over time several groups have expressed the wish for it to handle arbitrary geometry instead. This PR replaces the sphere and quad primitives with triangle meshes.
I am making use of the (embedded) rapidobj library to load models in the .obj format. The original .xml scene format remains, so that you can combine several models together as well as declare and assign the osl shader networks you want to these meshes. For backwards compatibility, spheres and planes are still supported via tessellation (you specify how many subdivisions you want). In the case of .obj scenes, the shader assignment can be done either by the mesh name or the material name.
I am submitting this to get the review kickstarted. The history of commits includes some fairly large test scenes that should be squashed away to go into the main repo. Files over 50Mb are recommended to use git lfs, but we probably want to figure that out as a different task (possibly handle it via a separate repo).
The handling of derivatives is not totally correct yet, but the behavior is compatible with the previous (incorrect) handling of derivatives we had before.
---------
Signed-off-by: Chris Kulla <[email protected]>1 parent 709c5ff commit 78e5392
File tree
82 files changed
+16340
-437
lines changed- src
- cmake
- testrender
- rapidobj
- testsuite
- render-background
- ref
- render-bumptest
- ref
- render-bunny
- ref
- render-cornell
- ref
- render-furnace-diffuse
- render-material-layer
- render-microfacet
- ref
- render-mx-burley-diffuse
- ref
- render-mx-conductor
- ref
- render-mx-dielectric-glass
- ref
- render-mx-dielectric
- ref
- render-mx-furnace-burley-diffuse
- ref
- render-mx-furnace-oren-nayar
- ref
- render-mx-furnace-sheen
- ref
- render-mx-generalized-schlick-glass
- ref
- render-mx-generalized-schlick
- ref
- render-mx-layer
- ref
- render-mx-sheen
- ref
- render-oren-nayar
- ref
- render-raytypes/ref
- render-uv
- ref
- render-veachmis
- ref
- render-ward
- ref
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
82 files changed
+16340
-437
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| 164 | + | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
350 | 353 | | |
351 | 354 | | |
352 | 355 | | |
| 356 | + | |
353 | 357 | | |
354 | 358 | | |
355 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
72 | | - | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
0 commit comments