appleseed Users Forum

Add source render components

Hello, I have seen your apple.studio source code and understood the rough process of running it. You use boost, Qt, and use frame->tile->pixel and so on to render the final image.

Now I want to add my own render component, such as a new bsdf or a new lighting engine to appleseed, Can you tell me the some detailed information about doing this? I know I should Add UI and action to Qt, and use slot function to call my source file, but it will be better if I can do the least modification to your source code .

So, I want to ask the minimum modification to write a new bsdf 。Thanks a lot

You are very welcome to contribute if you like to code or want to learn to code.

Why choose appleseed?

  • appleseed has an exceptionally clean and well documented code base. All source code is fully reviewed before it is added to the master branch on GitHub and development follows best industry and software engineering practices, like continuous integration (CI).
  • We have a friendly community with our main developers being professional software engineers and experts in render engine development. You can get advice and support from a range of diverse professionals and hobbyists on Discord or this forum.

Documentation about contributing:

The best way to start contributing:

  • Find a small bug/feature
    These small coding tasks are tagged as Good First Issue in our issue tracker. Let us know which you would like to tackle so that we can explain what it is about.

The standard way to do this is to make a personal fork of appleseed on GitHub and modify it.
The lighting engines are defined in https://github.com/appleseedhq/appleseed/tree/master/src/appleseed/renderer/kernel/lighting and the BSDFs in https://github.com/appleseedhq/appleseed/tree/master/src/appleseed/renderer/modeling/bsdf

Once you are happy with your modifications/new code and it runs without bugs locally you can open a pull request to get your code reviewed and finally added to appleseed-master.

Adding a new BSDF to appleseed is fairly simple, the basic steps are:

  1. Start with a copy of the files of one of the BSDF, say the Lambertian BRDF (lambertianbrdf.h and lambertianbrdf.cpp in src/appleseed/renderer/modeling/bsdf/.

  2. Rename:

    • the BSDF implementation class: LambertianBRDFImpl
    • the factory class: LambertianBRDFFactory
    • the BSDF model: const char* Model = "lambertian_brdf"
    • the BSDF name in the metadata: insert("label", "Lambertian BRDF")
  3. Add the new files to src/appleseed/CMakeLists.txt.

  4. Declare the new BSDF model in src/appleseed/renderer/modeling/bsdf/bsdffactoryregistrar.cpp

That should be all that is needed to add a new BSDF with the same behavior as the Lambertian BRDF. After you’ve built appleseed, the new BSDF should appear in appleseed.studio. You can then start modifying your BSDF according to your needs.

The process is roughly the same for any modeling entity (BSSRDF, EDF, light, etc.) and engine components (tile renderer, pixel renderer, sample renderer, etc.).

1 Like

Thank you very much. This is just what I needed. I look your source code carefully but the project is not that easy so This is very useful and can save me much time!!

Can we know what are your plans? it sounds interesting what you doing.

Oh, I have read PBRT books and used Mitsuba, LuxCore and other render softwares. On the one hand, I want to study render theorey. On the other hand , I am a game programmer and i am famaliar with Unreal Engine , Orge , threejs and other real-time PBR game engine. Indeed my final goal is to realize realtime path tracing render algorithms for game engine or animation production
After using many offline render enigne, I think appleseed is what I thinks best for me,

  1. It can produce many complex results and the scene interactiveness are good enough compared to other render engine like mitsuba
  2. It is only for render so not too complicated as unreal game engine.

And, I like the style of appleseed’s UI, It give me comforable feeling.

Besides these advantages, I think some other features will make it more powerful

  1. particle support
  2. gpu support
  3. other path tracing algorithms and other sampling algorithms. Indeed I swayed precariously between appleseed and Mitsuba, for mitsuba has so many different algorithms: bidirectional path trace and so on . But in the end appleseed makes me feel more professional
    4.native animation support
  4. other powerful features for render photo-like power images

So, with so many things I want to do, I must understand your codes clearly enough. I have seen the code for about 1 month . And maybe later I will make my contribution to appleseed. Thanks for @franz and @Mango3 code help, It will make me understand better .

3 Likes

Thanks for your keen interest. We are glad to help in any way we can and certainly would appreciate any contributions.

Agree, this is one of the most appealing features of Mitsuba.
appleseed is a more production focused render engine than Mitsuba where stability is paramount. Currently we only have exposed/fully functional the path-tracing and stochastic progressive photon mapping lighting engines.

In the sources you will also find a bidirectional integrator https://github.com/appleseedhq/appleseed/tree/master/src/appleseed/renderer/kernel/lighting/bdpt
which is not completely finished and therefore not exposed to users.

Apart from this, in the near future we will have a guided path-tracing implementation (a current GSoC project) which will improve rendering difficult lighting situations (GI dominated scenes, complex specular-glossy light transport etc.)

More information about this exciting new, robust and unbiased algorithm from Thomas Müller et al. together with the Mitsuba implementation is here:
https://github.com/Tom94/practical-path-guiding

1 Like