Skip to main content
added 285 characters in body
Source Link
EvaMGG
  • 153
  • 1
  • 4

I want to represent ovaloids with ray-marching. I have ovaloids defined with an implicit equation.

For instance, we can consider the equation of an ellipsoid given as: $$ \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} -1 = 0, $$ where $a, b, c$ are constant.

Given this equation I need to caculate the normal for the shading of the suface. In an standard course of Curves and Surfaces I would take $f(x,y,z) = \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} -1 $ and compute $N(p) = \frac{\nabla f(p)}{|\nabla f(p)|}$ as the normal of the surface.

Here I have to check that $0$ is a regular value of $f$ and that $f $ is differentiable. However, the second check is not automate.

  • How can I calculate this normal from the implicit equation?
  • How is it done in real-world systems?
  • Can you give an explanation of the methods used and ideally point me some implementations that exist?

Please, answer in full generality and not only considering the example given above.

I want to represent ovaloids with ray-marching. I have ovaloids defined with an implicit equation.

For instance, we can consider the equation of an ellipsoid given as: $$ \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} -1 = 0, $$ where $a, b, c$ are constant.

Given this equation I need to caculate the normal for the shading of the suface.

  • How can I calculate this normal from the implicit equation?
  • How is it done in real-world systems?
  • Can you give an explanation of the methods used and ideally point me some implementations that exist?

Please, answer in full generality and not only considering the example given above.

I want to represent ovaloids with ray-marching. I have ovaloids defined with an implicit equation.

For instance, we can consider the equation of an ellipsoid given as: $$ \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} -1 = 0, $$ where $a, b, c$ are constant.

Given this equation I need to caculate the normal for the shading of the suface. In an standard course of Curves and Surfaces I would take $f(x,y,z) = \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} -1 $ and compute $N(p) = \frac{\nabla f(p)}{|\nabla f(p)|}$ as the normal of the surface.

Here I have to check that $0$ is a regular value of $f$ and that $f $ is differentiable. However, the second check is not automate.

  • How is it done in real-world systems?
  • Can you give an explanation of the methods used and ideally point me some implementations that exist?

Please, answer in full generality and not only considering the example given above.

added 264 characters in body; edited title
Source Link
EvaMGG
  • 153
  • 1
  • 4

Normal How to compute normal of surface from implicit equation for ray-marching algorithm?

I'm making a project about howI want to represent ovaloids with ray-marching. I have ovaloids defined with an implicit equation and for shading.

For instance, we can consider the equation of an ellipsoid given as: $$ \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} -1 = 0, $$ where $a, b, c$ are constant.

Given this equation I need to calculatecaculate the normal for the shading of the surfacesuface.

  • How can I calculate this normal from the implicit equation?
  • How is it done in real-world systems?
  • Can you give an explanation of the methods used and ideally point me some implementations that exist?

How can I calculate this normal from the implicit equation? How is it donePlease, answer in real-world systems? Can you give an explanation of the methods usedfull generality and ideally point me some implementations that exists?not only considering the example given above.

Normal of surface from implicit equation for ray-marching algorithm

I'm making a project about how to represent ovaloids with ray-marching. I have ovaloids defined with an implicit equation and for shading, I need to calculate the normal of the surface.

How can I calculate this normal from the implicit equation? How is it done in real-world systems? Can you give an explanation of the methods used and ideally point me some implementations that exists?

How to compute normal of surface from implicit equation for ray-marching?

I want to represent ovaloids with ray-marching. I have ovaloids defined with an implicit equation.

For instance, we can consider the equation of an ellipsoid given as: $$ \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} -1 = 0, $$ where $a, b, c$ are constant.

Given this equation I need to caculate the normal for the shading of the suface.

  • How can I calculate this normal from the implicit equation?
  • How is it done in real-world systems?
  • Can you give an explanation of the methods used and ideally point me some implementations that exist?

Please, answer in full generality and not only considering the example given above.

Source Link
EvaMGG
  • 153
  • 1
  • 4

Normal of surface from implicit equation for ray-marching algorithm

I'm making a project about how to represent ovaloids with ray-marching. I have ovaloids defined with an implicit equation and for shading, I need to calculate the normal of the surface.

How can I calculate this normal from the implicit equation? How is it done in real-world systems? Can you give an explanation of the methods used and ideally point me some implementations that exists?