Skip to content
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

[❔ other question] How to split "aov" rendering while remaining differentiable? #559

Open
Agent-INF opened this issue Jan 17, 2022 · 2 comments

Comments

@Agent-INF
Copy link

Summary

How to split differentiable render results of an "aov" integrator?

Description

I have a scene with an aov integrator defined as follows:

    <integrator type="aov">
        <string name="aovs" value="depth.y:depth"/>
        <integrator type="path">
          <integer name="max_depth" value="$max_depth"/>
        </integrator>
    </integrator>

then I render the scene following the tutorial https://mitsuba2.readthedocs.io/en/latest/src/inverse_rendering/diff_render.html:

 image = render(scene, optimizer=opt, unbiased=True, spp=1)

I want to optimize the depth and RGB channel separately in a gradient-based manner, so I tried:

 render_list = image.split()

but it gives me the following error:

AttributeError: 'enoki.cuda_autodiff.Float32' object has no attribute 'split'

So what I want to ask is, what is the suitable way to split the aov rendering results while keeping them differentiable?
Thank you in advance!

@Agent-INF Agent-INF changed the title [❔ other question] [❔ other question] How to split "aov" rendering while remaining differentiable? Jan 17, 2022
@Speierers
Copy link
Member

Hi @Agent-INF
Unfortunately this is not currently supported in the Python render() function, but will be in the upcoming next release of the codebase.

You can take a look at the insides of the render() function and try to intercept the aov Float channels there.

Note also that differentiating a depth buffer requires visibility discontinuies to be handled properly, e.g. see PR #157 .

Good luck!

@Agent-INF
Copy link
Author

Thank you very much for your reply!
Looking forward to the upcoming next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants