You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beside the problem that we can't handle Include statements yet (see issue #41), we need to implement CreateLoopSubdiv(...) on the Rust side and a bunch of helper functions/structs:
std::vector<std::shared_ptr<Shape>> CreateLoopSubdiv(const Transform *o2w,
const Transform *w2o,
bool reverseOrientation,
const ParamSet ¶ms) {
int nLevels = params.FindOneInt("levels",
params.FindOneInt("nlevels", 3));
int nps, nIndices;
constint *vertexIndices = params.FindInt("indices", &nIndices);
const Point3f *P = params.FindPoint3f("P", &nps);
if (!vertexIndices) {
Error("Vertex indices \"indices\" not provided for LoopSubdiv shape.");
return std::vector<std::shared_ptr<Shape>>();
}
if (!P) {
Error("Vertex positions \"P\" not provided for LoopSubdiv shape.");
return std::vector<std::shared_ptr<Shape>>();
}
// don't actually use this for now...
std::string scheme = params.FindOneString("scheme", "loop");
returnLoopSubdivide(o2w, w2o, reverseOrientation, nLevels, nIndices,
vertexIndices, nps, P);
}
Here is a first result (with only one instance of the killeroo geometry) for Rust:
There is a difference to the C++ version though:
> imf_diff -f -d killeroo-simple-cpp.exr killeroo-simple-rust.exr diff.jpg
differing pixels: 0.032% (155 of 490000)
average difference: 18.131%
maximum difference: 67.999%
Summary: A few pixels differ strongly.
== "killeroo-simple-cpp.exr" and "killeroo-simple-rust.exr" are different
After commit a7c7382 (and using the bdpt integrator with 256pixelsamples) we get almost identical results:
> imf_diff -f -d killeroo-simple-cpp.exr killeroo-simple-rust.exr diff.jpg
differing pixels: 0.003% (14 of 490000)
average difference: 1.581%
maximum difference: 2.609%
Summary: A few pixels differ slightly.
== "killeroo-simple-cpp.exr" and "killeroo-simple-rust.exr" are similar
The one and only test scene distributed with the C++ code contains a subdivision surface:
Beside the problem that we can't handle
Include
statements yet (see issue #41), we need to implementCreateLoopSubdiv(...)
on the Rust side and a bunch of helper functions/structs:The text was updated successfully, but these errors were encountered: