0
\$\begingroup\$

I have a skybox with stars cubemap So, how can I rotate stars cubemap on Z axis using "Rotate About Axis"?

enter image description here

\$\endgroup\$
8
  • \$\begingroup\$ It's not clear to me what rotation you're describing. Consider adding a diagram to your question to illustrate? \$\endgroup\$
    – DMGregory
    Aug 3, 2023 at 19:25
  • \$\begingroup\$ What is incomprehensible in the rotation of Skybox?!!!!! \$\endgroup\$
    – user171926
    Aug 3, 2023 at 19:41
  • \$\begingroup\$ A skybox has as many degrees of rotational freedom as any other object. If you're trying to simulate motion of stars as observed from the north pole, you'd rotate around one axis. If your observer is at the equator, you'd use a different rotation axis. If you want to simulate an observer at an arbitrary latitude, you'd use another axis yet. It also depends on how the contents of your skybox texture are set up. (eg. is Polaris in the center of the y+ face, or is your skybox oriented relative to the ecliptic plane instead?) This is why a diagram helps make your situation unambiguous. \$\endgroup\$
    – DMGregory
    Aug 3, 2023 at 20:24
  • \$\begingroup\$ I want to simulate motion of stats. But how can I simulate the axis by float like set the float 90° to make it rotate to right? \$\endgroup\$
    – user171926
    Aug 4, 2023 at 2:29
  • \$\begingroup\$ And thanks for the explanation \$\endgroup\$
    – user171926
    Aug 4, 2023 at 2:31

1 Answer 1

0
\$\begingroup\$

Here is a simple skybox shader graph that allows you to rotate a cubemap about the y axis by an angle you provide in degrees:

Rotating cubemap shader graph

The Axis = (0, 1, 0) is what makes it rotate around the y axis. You can change this to a different axis, or even chain two of these nodes if you'd like to combine rotation due to time of day with rotation due to the observer's latitude.

\$\endgroup\$
6
  • \$\begingroup\$ Thank you, I have done this before, but this is not what I wanted, but I will implement it until I find out the way I want it. \$\endgroup\$
    – user171926
    Aug 5, 2023 at 16:33
  • \$\begingroup\$ This is why I wrote comments asking you to clarify what you wanted. The more specific you can be, the better your chances of getting an answer that delivers what you really want. Try explaining, in detail and with diagrams or screenshots, how the behaviour you observe with this graph differs from what you want. \$\endgroup\$
    – DMGregory
    Aug 5, 2023 at 16:39
  • \$\begingroup\$ After trying I think I will let it like that \$\endgroup\$
    – user171926
    Aug 5, 2023 at 18:07
  • \$\begingroup\$ But I'm still facing the problem of consistency of the cubemap with moon shape \$\endgroup\$
    – user171926
    Aug 5, 2023 at 18:09
  • \$\begingroup\$ If this answer solved your problem with rotating a cubemap, you can click the checkmark icon in the top left to mark it as Accepted. If it did not, you'll need to edit your question to clarify. You have a separate question about the moon, so we will not address that here. \$\endgroup\$
    – DMGregory
    Aug 6, 2023 at 7:19

You must log in to answer this question.