-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt C++ examples to recent changes in appleseed #2751
base: master
Are you sure you want to change the base?
Conversation
Was it already black before ? |
I haven't run this example before so I cannot say with certainty. But I doubt the black part is correct. Looks like a bug. |
Thanks! It wasn't black before. This almost certainly is a self-intersection issue: |
@@ -151,6 +151,13 @@ namespace | |||
return raymarch(ray, t, p); | |||
} | |||
|
|||
void refine_and_offset( | |||
const foundation::Ray3d& obj_inst_ray, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use asf::
qualifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align arguments.
asf::hash_uint64(asf::binary_cast<asf::uint64>(ray.m_dir.x)) ^ | ||
asf::hash_uint64(asf::binary_cast<asf::uint64>(ray.m_dir.y)) ^ | ||
asf::hash_uint64(asf::binary_cast<asf::uint64>(ray.m_dir.z))); | ||
asf::hash_uint64(asf::binary_cast<uint64_t>(ray.m_org.x)) ^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefix integral types with std::
.
Now that appleseed has a built-in sphere object, the sphere object plugin is kind of redundant even though it's a nice, simple example of how to write an object plugin (but maybe we could implement another shape). Anyway, you could have a look at how the built-in sphere object implements refining if you want to fix the sphere object plugin: |
These changes allow building of the example files though I'm not sure it is the most elegant way to do it (adding the override).

Also there is still an issue with parts of the objects appearing black when rendering (see screenshot of sphereobject)