Game Dev Engine #13. Fractal: Iterated Function System.

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ต.ค. 2024

ความคิดเห็น • 17

  • @Xonatron
    @Xonatron 11 หลายเดือนก่อน +1

    This is really cool. I always wondered how they did that (in EMF's Verses demo).

    • @JDoucette
      @JDoucette  8 หลายเดือนก่อน +1

      I think Verses by EMF they calculated each fractal, then did a LERP between the two. The hard part would have been coding the Mode 12h (640x480 x 16 colors), which had the 4 color planes, where each byte (of a single plane) controlled 8 pixels. But of course, not all bytes would need updating, so this mode could actually be faster. It wasn't at the frame rate, from what I remember (and Mode 12h was only 60 Hz).

    • @JDoucette
      @JDoucette  8 หลายเดือนก่อน

      But yeah -- I always wondered as well, especially since they showed off the Sierpinski Triangle, which I already knew could be made with the "chaos game" (randomly move 50% of the way to one of the origins). So it was odd to see it mixed in with fractals that appeared to not be able to work in that manner.

    • @Xonatron
      @Xonatron 8 หลายเดือนก่อน +1

      @@JDoucette This just made me wonder if there was a way to do it with polygons. Each step would be a 4x increase in polygon count: 1 pyramid, 4 pyramids, 16 pyramids, etc.

    • @JDoucette
      @JDoucette  8 หลายเดือนก่อน

      @@Xonatron Yeah, you can. All this really is, is a mapping algorithm -- a transformation using the point where it is now, to where it should be. Since the point could be in random locations, you can think of the point as already being where the fractal is (like it's already drawn), and then you take the entire fractal (since the point could literally be anywhere on this fractal) and map the entire thing to the new location. That's how you perceive the transform. This is why the entire fractal of the fern becomes just its leaf.

    • @JDoucette
      @JDoucette  8 หลายเดือนก่อน +1

      @@Xonatron In any case, with polygons, I think you mean 3D shapes made of points. So you could just map all of those points together at the same time. However, whatever you started with would remain, and it would be larger than the smaller versions of itself. Really, you're talking about taking the original and replacing it with smaller versions. I'd have to think through how that would work. Sierpinski can be made with polygons and pyramids, but you just continually replace everything you have with something smaller.

  • @punpcklbw
    @punpcklbw 11 หลายเดือนก่อน

    Neat stuff! I've been experimenting with IFS for a long time and got interesting results with it. Also I invented another way to add color. Since I use additive blending for points, I chose to render RGB channels separately, with the probabilities of transformations varying as a function of color channel. Later I extended this concept to hyperspectral rendering (with many wavelengths mixed into a single linear RGB buffer). It nicely complements IFS and can yield even more natural colors.

    • @JDoucette
      @JDoucette  8 หลายเดือนก่อน

      Hey there, thanks. I swear I read and answered your comment, but I'm noticing now that I hadn't. The adding of color into these fractals is so non-trivial that when I (first) read your comment, it made me ponder more methods. I think I had an idea to try some out and get back to you, and that never happened, sorry!

    • @JDoucette
      @JDoucette  8 หลายเดือนก่อน

      Interesting -- if I understand correctly -- with RGB as 3 different channels, you can see that they work independently (or with any 3-dimensional color space, such as HSV). But with your "hyperspectral" rendering (I'll have to look that up), you are allowing for more dimensions of color (er, of waves, but are merged or converge into a color-space like RGB).

    • @JDoucette
      @JDoucette  8 หลายเดือนก่อน +1

      I'm looking at your demo now -- "Bolaexu: IFS Fractal Design" -- I see you are using Ken Silverman's EvalDraw! So cool. I used that so much for quick prototyping of things. And your GUI tool showcasing the rectangles of the transformations, and editing them in real-time, is very neat ... I've wanted to try that just to see how easy it would be to design something. I see you were able to in a matter of seconds.

    • @punpcklbw
      @punpcklbw 8 หลายเดือนก่อน

      @@JDoucette I've noticed some problem with comments/replies on TH-cam, sometimes they don't get displayed for a reason, despite being approved and the counter incremented.

    • @JDoucette
      @JDoucette  8 หลายเดือนก่อน

      @@punpcklbw Yes, I've seen that happen before. But I think in this case, it is my fault. :) It's like the text you think about sending but later realize you haven't sent, heh.