Skip to content

Browsing appleseed Source Code

François Beaune edited this page Jan 11, 2014 · 15 revisions

The Woboq code browser is very nice to read code because it has full cross-referencing: http://code.woboq.org/appleseed/appleseed/.

Top-level Libraries

src/appleseed/foundation/*: base code, utilities, etc. Not specific to rendering: https://github.com/appleseedhq/appleseed/tree/master/src/appleseed/foundation

src/appleseed/renderer/*: the entire renderer is there: https://github.com/appleseedhq/appleseed/tree/master/src/appleseed/renderer

src/appleseed/main/*: the entry point of the shared library / DLL: https://github.com/appleseedhq/appleseed/tree/master/src/appleseed/main

Foundation Code

The (generic) BVH implementation: https://github.com/appleseedhq/appleseed/tree/master/src/appleseed/foundation/math/bvh

The low-level intersection primitives: https://github.com/appleseedhq/appleseed/tree/master/src/appleseed/foundation/math/intersection

The QMC sampling context used throughout the renderer: https://github.com/appleseedhq/appleseed/blob/master/src/appleseed/foundation/math/sampling/qmcsamplingcontext.h

The low-level QMC primitives: https://github.com/appleseedhq/appleseed/blob/master/src/appleseed/foundation/math/qmc.h

Renderer Code

The intersection subsystem, built on top of the generic BVH code and relying on the low-level intersection primitives: https://github.com/appleseedhq/appleseed/tree/master/src/appleseed/renderer/kernel/intersection

The generic path tracing loop used whenever a path needs to be traced: https://github.com/appleseedhq/appleseed/blob/master/src/appleseed/renderer/kernel/lighting/pathtracer.h

The path tracing lighting engine: https://github.com/appleseedhq/appleseed/blob/master/src/appleseed/renderer/kernel/lighting/pt/ptlightingengine.cpp

All the modeling entities are defined there: https://github.com/appleseedhq/appleseed/tree/master/src/appleseed/renderer/modeling

Here is the interface that a BSDF must implement: https://github.com/appleseedhq/appleseed/blob/master/src/appleseed/renderer/modeling/bsdf/bsdf.h

Implementation of the simplest BRDF, the Lambertian BRDF: https://github.com/appleseedhq/appleseed/blob/master/src/appleseed/renderer/modeling/bsdf/lambertianbrdf.cpp

The code that renders a single pixel sample: https://github.com/appleseedhq/appleseed/blob/master/src/appleseed/renderer/kernel/rendering/generic/genericsamplerenderer.cpp

The code that renders a single pixel (uniform sampling, not adaptive): https://github.com/appleseedhq/appleseed/blob/master/src/appleseed/renderer/kernel/rendering/final/uniformpixelrenderer.cpp

The adaptive version: https://github.com/appleseedhq/appleseed/blob/master/src/appleseed/renderer/kernel/rendering/final/adaptivepixelrenderer.cpp

appleseed.cli

Entry point of appleseed.cli: https://github.com/appleseedhq/appleseed/blob/936738c559c83fc08de4a5c7956ad194ad4a01b2/src/appleseed.cli/main.cpp#L746

The function that renders a project file in appleseed.cli: https://github.com/appleseedhq/appleseed/blob/936738c559c83fc08de4a5c7956ad194ad4a01b2/src/appleseed.cli/main.cpp#L592

appleseed.studio

Entry point of appleseed.studio: https://github.com/appleseedhq/appleseed/blob/cee0efd5e94dfda7c82e13dd54118131642a2e9d/src/appleseed.studio/main/main.cpp#L219

Hot Spots

The "hottest" functions when rendering (the ones that have the biggest impact on performances): https://github.com/appleseedhq/appleseed/blob/c810c80d54b71730c0291c72897aac0e188408d7/src/appleseed/foundation/math/bvh/bvh_intersector.h#L646 https://github.com/appleseedhq/appleseed/blob/39b26b2f98812c4355c6b1117ffa1c65b8c8b410/src/appleseed/foundation/math/sampling/qmcsamplingcontext.h#L255 https://github.com/appleseedhq/appleseed/blob/9548e981884d05c7b2184d227d66b362f44a0f15/src/appleseed/renderer/kernel/intersection/triangletree.h#L331

Clone this wiki locally