AustinGoodman / non-linear-sphere-tracing

An implementation of non-linear spheretracing for rendering deformed signed distance fields.
MIT License
2 stars 0 forks source link

Some questions about retrial normal #1

Open lingtengqiu opened 2 years ago

lingtengqiu commented 2 years ago

the method your propose NLST is Interesting. I have some questions about the retrial normal. In your paper, you said that We retrieve the surface normal from the SDF via finite differences and transform it to deformed space using the inverse transpose of Jacobian that is $(J_D^{-1})^T$. why not straightforward using the $J_D$?, I am very confused about it

AustinGoodman commented 2 years ago

Firstly, I just want to make it clear that this is not my paper, I only created this implementation to serve as a tutorial.

To answer your question, it turns out that for any linear transformation $M$, a normal vector $\vec{n}$ always transforms according to $(M^{-1})^T \cdot \vec{n}$. So it's nothing specific to non-linear sphere tracing.

This is a nice explanation https://stackoverflow.com/questions/10596548/correctly-transforming-a-surface-normal