Title: Perspective side effects Post by: bib on December 15, 2009, 08:11:25 PM Hello
Since I've been experimenting with perspective views of the Mandelbulb, I often come across the problem you can see starting at 0:34 It appears each time the camera is too close from the surface: what's behind the camera appears around the image. As it can be seen, I tried to move the back clipping plane to hide this, but without success. Does anyone know how to prevent this ? David ? Thanks http://www.youtube.com/watch?v=2kcZHsjJulQ MandelbulbSpaceZoom { ::txRh5jn2VmVWvxNOS43DQ+PIo8yMwxqFv0xsgAZScmBzikJZXHg9lFbAbd0tmorRSttb/rfL eIJK1tj74HMYRW1H/YpisYxOvTkMIK/lX+CHnhihyMu7HF1pZlbPUu1pvVkk58YTTlrz9FpD 75R++O7zK2tfgzgmlijZd9ck088ORVG02H6PvFaE65jR4wAWMLkSDdS6ySLG65uiu+s6s/BC vBx2g99jdf5LUIpoRiodoopm7+WRy3211coO11pBYSxwRJ6OVZD7bS5VHKHKaF99ODdiagqd Z1D8jZ9v8FVi22i6da4gez64u+b8fzrQU/QUkrTlYHMBIv5ue5Lyb6AIFKjqEPUItKypNrLZ fWy34N55O5FlZ1wqEcSf83uvolcj3hcw3ATR3Ru7/5P+M5GirEg2veH4YkLDkHGk633cfRde DvuBky1e9hjtAUfp7Q5RHyNO/zDlFCj1GNI3Aou5Pd+7DFJfz5x/X7VJuzjShR/XHEARrhZC GGDDrtvvpsIlfz738HwoCp/E6E8TtGnn7nbKqHkeuWXzIP2VwBnk2eVH/13kdASNdbLGUOkA Qa05gkLstiiymDDwHGM1zYc/gobQj2o0EUaJuvnUIppuXq41gIbjvXk2eV3gFQ34NWaKNDBC tN3DTPWhXV79d8YoRaB4x3lxxjs4Qf2NvXGPAtFJJHAf2ROWPWVRdaR/AEV4BhrsooICJ2HH 6TpBRv5V+3+B1AnOyU0iEFxhhGJM9mZBQtfIrlze/1UjYmACfAOZ6C2YNIkhES5Rq03nlqjL AKLx0AXfiAC3goSRJYivaNCuv0/6AwckxaxDqpUPeXWeZWygx+hMgat7z6y0oLlVraY+NTO8 lsHiieU2seXZ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RVYfp6COc /fEtVv24lRlvld/lr5ljrQ9kVnfN2vX0m9U7ZkBl3KVQld19Jt/5jIHVTRe1Ui8/O+c5P/wZ 3ck15+9s6S3ao0caquIVbvY1hLq2lJSTR8LQvnN8zCQ8zCY+h6EVEap6xeeOUbkPO+lwTQxL koaIfemK2+U7m1vN2THQ+RY83V2A3s98RkS7f+4AjWqfgH5EeZqdfxw+h9wXt9NlpPZgwkCm aUXOs8O5qfrpzv8nSf8dcBj5/uR+rbUnkpeEb3nEqn3bYpp6I3nJF2k6qgi3e8LTrY5aaMRo KvffFclk9qLwMd851kIni60sH4UfmjCMONS+7TgN9zUP9x0Iy3E1MCUKgubUQYYIGxM9jiwj DEHEGoqBTPCmiXZCczE9POqNDha4067P9TniZgq/fomF4tP= } Title: Re: Perspective side effects Post by: BradC on December 15, 2009, 08:24:47 PM If your clipping plane is behind the camera instead of in front, it might do this. What's your algorithm? Raymarching? Depending on your math, if your near clipping plane is behind the camera then rays could be headed in the correct direction, but start out behind the camera rather than in front, and they might hit stuff back there. This would cause things behind the camera to appear inverted as they reflect onto the image, which appears to be the case in your animation. For example, the camera passes a bulb on the lower right, and it reappears coming from behind in the upper left.
Sweet animation btw. I wanna see it once you figure out what's going on with the perspective. Title: Re: Perspective side effects Post by: David Makin on December 15, 2009, 09:15:57 PM If your clipping plane is behind the camera instead of in front, it might do this. What's your algorithm? Raymarching? Depending on your math, if your near clipping plane is behind the camera then rays could be headed in the correct direction, but start out behind the camera rather than in front, and they might hit stuff back there. This would cause things behind the camera to appear inverted as they reflect onto the image, which appears to be the case in your animation. For example, the camera passes a bulb on the lower right, and it reappears coming from behind in the upper left. Sweet animation btw. I wanna see it once you figure out what's going on with the perspective. I think blb must have the front cliipping plane behind the viewpoint :) In my UF formula the front clipping plane distance should be less than the image plane distance in magnitude i.e. if the image plane distance is 0.1 then the front clipping plane distance should be >-0.1 If you get clipping happening with the chosen setting and can't move the clipping plane much further back then you'll have to increase UF's magnification instead. Title: Re: Perspective side effects Post by: twinbee on December 15, 2009, 10:45:42 PM I think I had exactly the same problem. As David and Brad said, it seems to be a clipping issue.
I solved it with one line of code: if(z<0) return false; // i.e. not part of set (at least not anymore ;) ) Btw, nice vid anyway! Title: Re: Perspective side effects Post by: Nahee_Enterprises on February 02, 2010, 11:22:41 AM Since I've been experimenting with perspective views of the Mandelbulb, I often come across the problem you can see starting at 0:34 It appears each time the camera is too close from the surface... I am just now getting around to viewing some of the animations I missed, and yes, too bad about the clipping problem on this video. Title: Re: Perspective side effects Post by: bib on February 02, 2010, 11:39:16 AM This was a problem I managed to fix afterwards, by carefully setting up cut clipping planes (in other animations). Watch my channel for my collection of Mandelbulb videos: http://www.youtube.com/user/bib993, and subscribe!
Title: Re: Perspective side effects Post by: Softology on April 04, 2010, 04:34:02 AM This was a problem I managed to fix afterwards, by carefully setting up cut clipping planes (in other animations). Watch my channel for my collection of Mandelbulb videos: http://www.youtube.com/user/bib993, and subscribe! I had similar issues when I used a clipping sphere to start with (as in the original keenan crane quaternion code that my mandelbulb code and others I have seen was based on). In my case, to fix it I skipped a clipping sphere altogether and traced each ray from the origin (camera) along the direction vector. The distance estimation takes care of the step size without needing the small initial step to the clipping plane/sphere. Doing it this way gets rid of another user setting to have to tweak the front and back clipping planes. Start from the camera, step along the ray until it exceeds the max iterations, distestimate<epsilon, or bailout. This was the first movie I tried with this method. No wraparound or clipping at all. http://www.youtube.com/watch?v=Kb4zig5veGQ Hopefully this helps others with the same issue. Jason. |