Skip to main content
Up and Coming
May 8, 2013

Real Time Mandelbulb

Anybody thought doing a real time mandelbulb fligh through with the Oculus in mind? That would be pretty trippy :) And low requirements, apart from the actual coding itself, but no assets to speak of. Perfect for programmers!





    58 replies

    Up and Coming
    September 18, 2014
    Unfortunatley the adaptive scaling seems a bit extreme for me as soon as I tap into the first scene the screen percentage drops to down to about 30%. Think Ill have ago at removing this feature and compiling myself.

    What I could make from the Gallery and the lego bricks afterwards looks very cool though.
    DK2. Phenom 2 x4 4.2GHz,Asrock Extreme 3 970,8GB DDR3 1600, R9 270x 1180/1400.
    Up and Coming
    September 18, 2014
    Have a look at the DynamicallyScaleFBO() function, at line 102 in main_include.cpp: https://github.com/jimbo00000/RiftRay/blob/master/src/main_include.cpp

    There's a clause there to drop resolution to minimum if the instantaneous frame rate ever drops below 45(i.e. a frame takes more than 1/45 of a second to render). This does often get tripped on a change in program or bound texture as things get cached up the first time around. You could try a less dramatic drop in resolution or just delete the clause entirely - the design philosophy was that anything is better than dropping frames.
    Up and Coming
    September 27, 2014
    I was hoping someone would make this. Thank you!

    After downloading it though...honestly, I can't even figure out how to run it. Is it PC only? :oops:

    You should definitely release on share. This sort of thing would be very popular for first time VR demo uses.
    Cubicle Ninjas Custom VR App Development Guided Meditation VR for Rift, Gear, and Go
    New Participant
    October 28, 2014
    I tried to build the library myself, but fighting with the dependencies bored me out before I managed to get them all in there. Any hope you could add a switch or something to disable the automatic resolution dropping? Or set a minimum? The resolution it drops to is pretty over(under?)kill, since you cannot make anything out of that soup.

    I might try again with the libraries tomorrow if I remember though.
    New Participant
    October 28, 2014
    Ha! Got it working. Copypasted way too many absolute pathes here and here though :D

    But oh man, this is what I got the rift for. I wanted to see what my own shadertoys looked like with it. Nice library, cheers!
    Inspiring
    December 29, 2014
    This is really cool, but how do non-Programmers fix the SUPER-low resolution issue? I've been toughing it out at what appears to be 320x200 resolution. I would love to see it at something higher.
    Up and Coming
    December 30, 2014
    I've added a couple of features in the latest release to address that: https://github.com/jimbo00000/RiftRay/releases/tag/2.0.2

    First, I've adjusted the target frame rate to just under the DK2's display rate to yield better results with VSync on. Second, dynamic FBO scaling can be turned off by editing the included RiftRay.cfg file, or by editing the FBO size manually with the F5-F8 keys a la jherico's Shadertoy VR: http://www.reddit.com/r/oculus/comments/2q0ard/new_build_of_shadertoy_vr/. Adjusting cinemascope factor with page up/page down is also an option.

    Give the new build a try with the dynamic scaling on(default with included .cfg file), and if it still looks too blurry, hit F8 a few times. At that point you'll be in manual, so be ready to hit F5 when you start dropping frames.
    Inspiring
    January 4, 2015
    Amazing stuff! Will it automatically grab new shaders off the website, or is it just the ones you've hand picked?

    As for the Dynamic resolution, that doesn't work very well. On my Radeon card it always dumps down to SUPER-LOW, or what I imagine is the lowest setting it absolutely can. Bumping it up in rez does not effect the framerate at all, at least in the menus, so I have to imagine it's one of those Anti-Radeon bugs that seem to plague so much Rift demos. I'm guessing GeForce handles OpenGL, or whatever's being used in these demos, better then Radeon. Usually forcing it to use DirectX is the solution to get around alot of these bugs. I didn't even know there were words on those menu images until you added the forced increase to the resolution.

    But the controls for resolution and screen cropping are working great. I think Oculus would prefer to have simpler controls for demos, so this might not get you on the main page, but I found it no problem with tweak and mess with. And the shaders look AMAZING! Almost all of them work perfectly. There are 2 or 3 that aren't responding to positional tracking. One of them was that landscape with the snake-like growths coming out of it. I can't recall what the others were.

    Also, all of the joystick input seems to be off. I've been trying to control it with an Xbox controller and it seems like the button layout is scrambled.

    I can't help but to wonder though. The performance from Boxplorer was far better at full resolution (at least on the DK1). Well this Shader website collection is really cool, I think it's more aimed for real-time editing for websites, and lacks the full performance possible if it was more dedicated to handling fractals. Your time might be better spent getting Boxplorer up and running with the DK2 and developing some kind of interpreter for the Shaders to make them work with it. I'm not too sure what's involved behind-the-scenes, so that's just a suggestion.
    Up and Coming
    January 5, 2015
    Hi Max, thanks for the detailed feedback!

    "MaxSMoke777" wrote:
    Amazing stuff! Will it automatically grab new shaders off the website, or is it just the ones you've hand picked?

    Shaders are hand-picked and manually ported. There is a small HOWTO doc on this in the repo: https://github.com/jimbo00000/RiftRay/blob/master/doc/ShaderPorting.md

    "MaxSMoke777" wrote:
    As for the Dynamic resolution, that doesn't work very well. On my Radeon card it always dumps down to SUPER-LOW, or what I imagine is the lowest setting it absolutely can. Bumping it up in rez does not effect the framerate at all, at least in the menus, so I have to imagine it's one of those Anti-Radeon bugs that seem to plague so much Rift demos. I'm guessing GeForce handles OpenGL, or whatever's being used in these demos, better then Radeon. Usually forcing it to use DirectX is the solution to get around alot of these bugs. I didn't even know there were words on those menu images until you added the forced increase to the resolution.

    FBO scaling appears to work as designed on my Radeon HD6670, except for some instability below 60 fps where the app seems to drop a frame every second or two, kicking the resolution way down to compensate. I'm not sure if it's AMD's OpenGL handling per se that's causing the problem, but switching to DX is not an option here. If you're inclined to try out different forced vsync settings in the Catalyst control panel, I'd be interested to hear if there's any difference. F9, F10 and F11 are supposed to toggle vsync from within the app, but I have found support for this to be hit-or-miss.

    "MaxSMoke777" wrote:
    But the controls for resolution and screen cropping are working great. I think Oculus would prefer to have simpler controls for demos, so this might not get you on the main page, but I found it no problem with tweak and mess with.

    I would love to hear your ideas for simpler controls. At one point I had the mouse wheel controlling resolution which was nice and easy. If you have any recommendations, I'll get them in there.

    "MaxSMoke777" wrote:
    There are 2 or 3 that aren't responding to positional tracking. One of them was that landscape with the snake-like growths coming out of it. I can't recall what the others were.

    Good eye on the positional tracking. Two notable shadertoys lacking it are terrain_tubes and voxel_edges, both of which have a headScale of >1. I will look into this.

    "MaxSMoke777" wrote:
    Also, all of the joystick input seems to be off. I've been trying to control it with an Xbox controller and it seems like the button layout is scrambled.

    You've convinced me. I finally broke down and ordered the Xbox controller. Expect an update in a few days.

    "MaxSMoke777" wrote:
    I can't help but to wonder though. The performance from Boxplorer was far better at full resolution (at least on the DK1). Well this Shader website collection is really cool, I think it's more aimed for real-time editing for websites, and lacks the full performance possible if it was more dedicated to handling fractals. Your time might be better spent getting Boxplorer up and running with the DK2 and developing some kind of interpreter for the Shaders to make them work with it. I'm not too sure what's involved behind-the-scenes, so that's just a suggestion.

    This is surprising - do you remember any specific shaders that were faster in Boxplorer? I wouldn't expect any significant differences in performance between the two apps as the vast majority of the work they're doing is in fragment shader and GPU-bound. The only way to get around this(that I know of) and increase fps is to render fewer pixels.

    Also consider that the DK1 demanded less than half the render bandwidth of the DK2 (1280x800@60Hz = 61MPx/sec, 1920x1080@75Hz = 155MPx/sec).
    Inspiring
    January 7, 2015
    All of the Boxplorer demos except for the bug walking around seemed to run at 30 to 70+ FPS at full DK1 resolution. I know the DK1 is alot lower resolution then the DK2, but it was still higher then settings I'm comfortable with on this demo. The Reflectiods, running with full reflections, ran at faster, at a higher rez then your Reflectiods, without reflections. It actually ran so fast, I could barely believe my computer produces those images. Quite mind blowing! There were controls in Boxplorer for altering Reflectiod in real time, and the no matter how convoluted I managed to get the landscape, it always kept at least 40fps. A little choppy sometimes, but never unusably slow.

    As for the controls, the Xbox controller is utterly bristling with buttons, so any of those might do. I'd suggest throwing a cheat-sheet using the Start button so people always know what button does what.

    But I would suggest scrapping the automatic resolution changer, in favor of using the controller. Make a clear statement on the starting screen, maybe off to the side, that users can change the performance using the controller. Since the starting menu screen is the most important, and always runs well, definitely force it to run at a high starting resolution. Without the main menu, the whole experience becomes very difficult.

    Back to the subject of controls, a few of those fractal shaders can be easily altered by changing a few numbers, correct? How about allowing some facet of the controller to slide those numbers up and down, like Boxplorer allowed with Reflectiod? Real-time altering of fractals is AMAZING! If the users can alter just 2 or 3 parameters with a few button presses, I'm sure they'll spend hours seeing what kind of results they can get. I know I did!