[Python] Optimize a sphere's position with Mistuba 3

Discussão em 'Python' iniciado por Stack, Junho 22, 2025.

  1. Stack

    Stack Membro Participativo

    As a simple experiment with Mitsuba 3 I want to use gradient optimization to find the best position of a sphere.

    Looking at the scene params I have s.to_world, a Transform4f, and s.bsdf.reflectance.value, a Float.

    If I try to follow the Gradient-based optimization tutorial, it fails if I use s.to_world instead of s.bsdf.reflectance.value:

    Exception: Optimizer.__setitem__(): value should be differentiable!


    If I try to follow the Object pose estimation tutorial, I can't figure out how to apply the transformation. A sphere doesn't have vertex_positions that I could transform.

    Continue reading...

Compartilhe esta Página