Let's say that I want to render something like Dimmadome's hat, a hat which has the height of infinity.

A quick answer to this would be to place the top side of the hat high enough for the crown(cylinder) to be cropped(like y=9999999...) half way in the view. I don't like this idea. So what I came up with is using IEEE 754 infinity in vertices.

(-0.5, INF, -0.5)
(0.5, INF, -0.5)
(0.5, INF, 0.5)
(-0.5, INF, 0.5)

(assuming the crown is a cube)

The problem is that after multiplying with the transform matrix, the vertices end up being all (INF, INF, INF), making them unrenderable. I just wrote this to give you an idea.

Is there any technique that can be used to achieve this? rather than using huge number? I wonder how they implemented this.

  • 4
    $\begingroup$ Perhaps you could try using homogeneous coordinates with w=0. It's sometimes used to create shadow volumes that extend off to "infinity". $\endgroup$ – Simon F Sep 3 '18 at 13:23
  • $\begingroup$ In episode "Mission Responsible they mention: "... 80-story hat storage building" - while on other pages they mention regular size and "infinitely tall". $\endgroup$ – Rob Sep 4 '18 at 21:53
  • 1
    $\begingroup$ What if you make the hat normal size but then use vertex shaders to always extend it so that it is barely larger than the screen? $\endgroup$ – piegames Sep 15 '18 at 9:54

You can render with a raymarcher and using distance fields. For the hat you would define the center and radius of the cylinder, and would draw any march which falls within such circle, no matter what "height" you are in, it will be infinite. You can also add a restriction, like y > 0 to put a beginning to your hat.


Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.