appleseed icon indicating copy to clipboard operation
appleseed copied to clipboard

Adapt C++ examples to recent changes in appleseed

Open Mango-3 opened this issue 4 years ago • 4 comments

  • Removed obsolete appleseed integer types
  • Added override of pure virtual function of derived class to be able to instantiate it.

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) sphereobject

Mango-3 avatar Dec 25 '19 14:12 Mango-3

Was it already black before ?

oktomus avatar Dec 26 '19 16:12 oktomus

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.

Mango-3 avatar Dec 27 '19 08:12 Mango-3

Thanks!

It wasn't black before. This almost certainly is a self-intersection issue: refine_and_offset() must return valid front & back intersection points.

dictoon avatar Dec 27 '19 11:12 dictoon

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:

https://github.com/appleseedhq/appleseed/blob/master/src/appleseed/renderer/modeling/object/sphereobject.cpp#L136-L188

dictoon avatar Dec 27 '19 11:12 dictoon