Skip to main content
added 15 characters in body
Source Link
Markus von Broady
  • 42.6k
  • 3
  • 37
  • 107

Sphere Projection uses the Spherical coordinate system:

  • radial distance $r$ (or $ρ$) is not used, because it’s a projection,
  • azimuth $\varphi$ (also known as a polar coordinate) is translated to $x$ in the texture,
  • inclination (elevation) $θ$ is translated to $y$ in the texture.

There are some aliasing problems visible on the azimuth seam and from far away in the Difference blending, and even when zooming some differences can still be spotted – maybe the algorithm could be improved by e.g. changing the orders of calculations, so the float errors are reduced?

In geometry nodes you don’t have the Generated coordinate system, but you don’t need it, and in fact, using the Object coordinate system is simpler, because you can remove the first Vector Math, which makes sure the center of sphere is in the origin:

Math: Arctan2 node outputs a value in range $-90°..+90°$, but expressed in radians (in memory in Blender angles are always represented as radians, though by default displayed as degrees, with the degree ° symbol) $=-π .. +π$$=-{π\over 2} .. +{π \over 2}$ so from $-3.1415…$$-1.57…$ to $+3.1415…$$+1.57…$. The UV space however is normalized in $0..1$ range, so this node is a more performant way of a Map Range like so:

Explaining using Python: (keep in mind _ means the result of last operation, previously displayed)

>>> radians(90)  # what is the range -90deg .. +90deg expressed in radians?
1.5707963267948966  # range from -1.57... to +1.57...

>>> 0.5 / _  # a * b = 0.5, therefore b = 0.5 / a (div both sides by a)
0.3183098861837907

>>> radians(90) * _  # obtained number, times the range gives -0.5..+0.5
0.5

>>> # and -0.5 .. +0.5 , can be normalized to 0..1 by adding 0.5

To further clarify, in the 2nd operation's comment, I mean that we have a range $-a .. +a$, and we want to multiply it by some number $b$, so that the range is $-0.5 .. +0.5$ (when normalizing a symmetric range, always first convert it to 0.5 on either side, and then add 0.5). To find this number $b$, just transform the formula describing the problem.

Sphere Projection uses the Spherical coordinate system:

  • radial distance $r$ (or $ρ$) is not used, because it’s a projection,
  • azimuth $\varphi$ (also known as a polar coordinate) is translated to $x$ in the texture,
  • inclination (elevation) $θ$ is translated to $y$ in the texture.

There are some aliasing problems visible on the azimuth seam and from far away in the Difference blending, and even when zooming some differences can still be spotted – maybe the algorithm could be improved by e.g. changing the orders of calculations, so the float errors are reduced?

In geometry nodes you don’t have the Generated coordinate system, but you don’t need it, and in fact, using the Object coordinate system is simpler, because you can remove the first Vector Math, which makes sure the center of sphere is in the origin:

Math: Arctan2 node outputs a value in range $-90°..+90°$, but expressed in radians (in memory in Blender angles are always represented as radians, though by default displayed as degrees, with the degree ° symbol) $=-π .. +π$ so from $-3.1415…$ to $+3.1415…$. The UV space however is normalized in $0..1$ range, so this node is a more performant way of a Map Range like so:

Explaining using Python: (keep in mind _ means the result of last operation, previously displayed)

>>> radians(90)  # what is the range -90deg .. +90deg expressed in radians?
1.5707963267948966  # range from -1.57... to +1.57...

>>> 0.5 / _  # a * b = 0.5, therefore b = 0.5 / a (div both sides by a)
0.3183098861837907

>>> radians(90) * _  # obtained number, times the range gives -0.5..+0.5
0.5

>>> # and -0.5 .. +0.5 , can be normalized to 0..1 by adding 0.5

To further clarify, in the 2nd operation's comment, I mean that we have a range $-a .. +a$, and we want to multiply it by some number $b$, so that the range is $-0.5 .. +0.5$ (when normalizing a symmetric range, always first convert it to 0.5 on either side, and then add 0.5). To find this number $b$, just transform the formula describing the problem.

Sphere Projection uses the Spherical coordinate system:

  • radial distance $r$ (or $ρ$) is not used, because it’s a projection,
  • azimuth $\varphi$ (also known as a polar coordinate) is translated to $x$ in the texture,
  • inclination (elevation) $θ$ is translated to $y$ in the texture.

There are some aliasing problems visible on the azimuth seam and from far away in the Difference blending, and even when zooming some differences can still be spotted – maybe the algorithm could be improved by e.g. changing the orders of calculations, so the float errors are reduced?

In geometry nodes you don’t have the Generated coordinate system, but you don’t need it, and in fact, using the Object coordinate system is simpler, because you can remove the first Vector Math, which makes sure the center of sphere is in the origin:

Math: Arctan2 node outputs a value in range $-90°..+90°$, but expressed in radians (in memory in Blender angles are always represented as radians, though by default displayed as degrees, with the degree ° symbol) $=-{π\over 2} .. +{π \over 2}$ so from $-1.57…$ to $+1.57…$. The UV space however is normalized in $0..1$ range, so this node is a more performant way of a Map Range like so:

Explaining using Python: (keep in mind _ means the result of last operation, previously displayed)

>>> radians(90)  # what is the range -90deg .. +90deg expressed in radians?
1.5707963267948966  # range from -1.57... to +1.57...

>>> 0.5 / _  # a * b = 0.5, therefore b = 0.5 / a (div both sides by a)
0.3183098861837907

>>> radians(90) * _  # obtained number, times the range gives -0.5..+0.5
0.5

>>> # and -0.5 .. +0.5 , can be normalized to 0..1 by adding 0.5

To further clarify, in the 2nd operation's comment, I mean that we have a range $-a .. +a$, and we want to multiply it by some number $b$, so that the range is $-0.5 .. +0.5$ (when normalizing a symmetric range, always first convert it to 0.5 on either side, and then add 0.5). To find this number $b$, just transform the formula describing the problem.

clarified the magic number
Source Link
Markus von Broady
  • 42.6k
  • 3
  • 37
  • 107

Sphere Projection uses the Spherical coordinate system:

  • radial distance $r$ (or $ρ$) is not used, because it’s a projection,
  • azimuth $\varphi$ (also known as a polar coordinate) is translated to $x$ in the texture,
  • inclination (elevation) $θ$ is translated to $y$ in the texture.

There are some aliasing problems visible on the azimuth seam and from far away in the Difference blending, and even when zooming some differences can still be spotted – maybe the algorithm could be improved by e.g. changing the orders of calculations, so the float errors are reduced?

In geometry nodes you don’t have the Generated coordinate system, but you don’t need it, and in fact, using the Object coordinate system is simpler, because you can remove the first Vector Math, which makes sure the center of sphere is in the origin:

Math: Arctan2 node outputs a value in range $-90°..+90°$, but expressed in radians (in memory in Blender angles are always represented as radians, though by default displayed as degrees, with the degree ° symbol) $=-π .. +π$ so from $-3.1415…$ to $+3.1415…$. The UV space however is normalized in $0..1$ range, so this node is a more performant way of a Map Range like so:

Explaining using Python: (keep in mind _ means the result of last operation, previously displayed)

>>> radians(90)  # what is the range -90deg .. +90deg expressed in radians?
1.5707963267948966  # range from -1.57... to +1.57...

>>> 0.5 / _  # a * b = 0.5, therefore b = 0.5 / a (div both sides by a)
0.3183098861837907

>>> radians(90) * _  # obtained number, times the range gives -0.5..+0.5
0.5

>>> # and -0.5 .. +0.5 , can be normalized to 0..1 by adding 0.5

To further clarify, in the 2nd operation's comment, I mean that we have a range $-a .. +a$, and we want to multiply it by some number $b$, so that the range is $-0.5 .. +0.5$ (when normalizing a symmetric range, always first convert it to 0.5 on either side, and then add 0.5). To find this number $b$, just transform the formula describing the problem.

Sphere Projection uses the Spherical coordinate system:

  • radial distance $r$ (or $ρ$) is not used, because it’s a projection,
  • azimuth $\varphi$ (also known as a polar coordinate) is translated to $x$ in the texture,
  • inclination (elevation) $θ$ is translated to $y$ in the texture.

There are some aliasing problems visible on the azimuth seam and from far away in the Difference blending, and even when zooming some differences can still be spotted – maybe the algorithm could be improved by e.g. changing the orders of calculations, so the float errors are reduced?

In geometry nodes you don’t have the Generated coordinate system, but you don’t need it, and in fact, using the Object coordinate system is simpler, because you can remove the first Vector Math, which makes sure the center of sphere is in the origin:

Sphere Projection uses the Spherical coordinate system:

  • radial distance $r$ (or $ρ$) is not used, because it’s a projection,
  • azimuth $\varphi$ (also known as a polar coordinate) is translated to $x$ in the texture,
  • inclination (elevation) $θ$ is translated to $y$ in the texture.

There are some aliasing problems visible on the azimuth seam and from far away in the Difference blending, and even when zooming some differences can still be spotted – maybe the algorithm could be improved by e.g. changing the orders of calculations, so the float errors are reduced?

In geometry nodes you don’t have the Generated coordinate system, but you don’t need it, and in fact, using the Object coordinate system is simpler, because you can remove the first Vector Math, which makes sure the center of sphere is in the origin:

Math: Arctan2 node outputs a value in range $-90°..+90°$, but expressed in radians (in memory in Blender angles are always represented as radians, though by default displayed as degrees, with the degree ° symbol) $=-π .. +π$ so from $-3.1415…$ to $+3.1415…$. The UV space however is normalized in $0..1$ range, so this node is a more performant way of a Map Range like so:

Explaining using Python: (keep in mind _ means the result of last operation, previously displayed)

>>> radians(90)  # what is the range -90deg .. +90deg expressed in radians?
1.5707963267948966  # range from -1.57... to +1.57...

>>> 0.5 / _  # a * b = 0.5, therefore b = 0.5 / a (div both sides by a)
0.3183098861837907

>>> radians(90) * _  # obtained number, times the range gives -0.5..+0.5
0.5

>>> # and -0.5 .. +0.5 , can be normalized to 0..1 by adding 0.5

To further clarify, in the 2nd operation's comment, I mean that we have a range $-a .. +a$, and we want to multiply it by some number $b$, so that the range is $-0.5 .. +0.5$ (when normalizing a symmetric range, always first convert it to 0.5 on either side, and then add 0.5). To find this number $b$, just transform the formula describing the problem.

Source Link
Markus von Broady
  • 42.6k
  • 3
  • 37
  • 107

Sphere Projection uses the Spherical coordinate system:

  • radial distance $r$ (or $ρ$) is not used, because it’s a projection,
  • azimuth $\varphi$ (also known as a polar coordinate) is translated to $x$ in the texture,
  • inclination (elevation) $θ$ is translated to $y$ in the texture.

There are some aliasing problems visible on the azimuth seam and from far away in the Difference blending, and even when zooming some differences can still be spotted – maybe the algorithm could be improved by e.g. changing the orders of calculations, so the float errors are reduced?

In geometry nodes you don’t have the Generated coordinate system, but you don’t need it, and in fact, using the Object coordinate system is simpler, because you can remove the first Vector Math, which makes sure the center of sphere is in the origin: