Skip to content

- [❔ other question] Add differentiable parameter to shape #595

Description

@chx125ck

Summary

How to add a differentiable parameter to an existing shape?

Description

I am trying to make the radius of a sphere differentiable, any hint on how to achieve this? Which parts of the code should I modify to make it work?

Activity

  1. Speierers commented on May 10, 2022

    @Speierers
    Member

    Hi @chx125ck ,

    In the current codebase this will require a few changes in sphere.cpp. First you will need to set the type of m_radius to Float. Then make sure it is properly exposed and handled in the traverse() and parameters_changed() method. You will probably need to change the update() method as well so that it doesn't overwrite m_radius.

    More importantly, you will need to use the path-reparam integrator in order to correctly account for the discontinuities in the light transport equation when differentiating w.r.t. such parameter. Please see the pathreparam-optix7 branch for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions