Deviation Actions

gannjondal's avatar

Basic Intro Mb3D Formula Editor and JIT Compiler

By gannjondal
To all Mandelbulb3D friends.

Most probably you have heard that :iconthargor6: has announced a X-mas gift.

Since the original programmer Jesse had stopped the development there was a larger gap in development of our favorite tool - until Andreas alias thargor6 decided to step in as main developer, and until Jesse decided to move the program to open source.
Now, after several months of work Andreas has uploaded the ready made binaries of Mandelbulb3D v190 to the download page on Fractal Forums - at December-24th.

Again - Andreas & Team - Thank you very much for your work. I think it will bring really fresh life into the MB3D community.

The version step sounds small, and yes, you can work with MB3D v190 as you have worked before.

But besides the introduction of GUI theming there are a number of new major features which are listed at download page on Fractal Forums,  or at Andreas' homepage entry.

I want to provide a basic tutorial of one of those new features - the just-in-time formula compiler, and the related formula editor.
It does NOT talk about triplex maths, or about theory of dynamic systems. No fear ;-)
The tutorial just describes my first experiences using those new features. It provides steps, and screenshots which should allow you to create an own formula.

Note on performance:
Please note that formulas written for the JIT compile *are* slower than the original hand made machine code formulas from Jesse, Luca, M.Benesi etc.
But I have tested them on a medium sized PC (which had a i5-4440). At least simple formulas like that I have used in the tutorial are not much slower than usual.
As of now I have seen two things which can be MUCH slower:  Choosing DEAO as Ambient shadow, and calculating inside renders.

Please tell if you should have any difficulties to download / read the tutorial, or if you have any questions about the content!
I have uploaded a pdf, but the original is a odf (as used by Open/Libre Office etc). Therefore I can try to transform its into another format if needed.

Also:  Please feel free to share your own experiences.

If you are interested in more background on MB3D, or even the theory behind you may start at the forum's MB3D program child board , or its mandelbulb theory child board .


Further related pages:


Have fun, and create many unusal pictures :-)


--------------------
Update note [2015-02-23] :  A bit more on reformatting. That will be the final version for now :-)
Update note [2015-01-09] :  Have restructured the document so that it does better show the actual workflow. I hope that it makes the usage easier.
Update note [2015-01-08] :  I have uploaded a slightly changed version of the pdf. No major changes; have mainly corrected errors, and reformatted the document.
Published:
© 2016 - 2021 gannjondal
Comments76
Join the community to add your comment. Already a deviant? Log In
blackoes's avatar

i wish there was a more active MB3D community. i have so many questions that arent answered anywhere

Hello All, would like to get some help please with programming, this fractal: (z^pi)-(z/z^pi)+...(z^pi)-(z/z^pi)+... i was trying this software: Mandelbulb 3D but i could not do it because i do not know programming,   Thank You
bobthemage's avatar
Hiya! Thanxalot!!!!
gannjondal's avatar
Hehe - You're welcome :wave:
When I use the JIT formulas in M3D they are a bit slower to compute in the Main View. But that's alright.
But when I use them in the Navigator, they are incredibly slow. No intuitive interaction at all anymore.
Did anybody else notice this?
Seems they are not neatly implemented in the Navigator yet?

Great Job though. Thanks!
gannjondal's avatar
Thank you +Danke for your kind comment, Adrian :-)

Regarding the performance in the performance:

Usually (for me) the performance is ok in the navigator for the most JIT formulas as well.

Two pitfalls however:

- If using JITs: The longer a M3D instance is actively used the longer it needs until the calculation starts.
  This effect is specifically strong if you are using the navigator window heavily - and if you are using a CPU with many cores/threads.
  It seams to be related to a memory leak.
  --> It is to be recommended to restart the MB3D instance from time to time if using JITs

- For some JIT formulas everything is slow if MB3D thinks that the background needs to be calculated.
  -->  If it's slow:  Try to reduce the 'Far plane' in the navigator (e.g. to values of 10 or less - experimenting is needed), respective the 'Z end' in the 'Position' section of the main window.
SpiritBoxscape's avatar
Ooooooo
This brings up opportunities for people sharing formulas and playing around and all that nice stuff.
gannjondal's avatar
Thank you very much!
I hope it will become useful in any way :-)
quasihedron's avatar
Wish I had run into this sooner! :rofl:
Great job! Well done, G! :D
gannjondal's avatar
Oops. I thought you had seen it before.
You are of course very welcome :-)

By the way:  You also may check this journal for more references (not just to my work).
quasihedron's avatar
Thank you so much. These resources will be very useful. I scanned the list already and like what I see. 
I am sure that I will make a good fauxpas soon. This is development. I have a strange ability to find bugs and break things. :rofl::rofl::rofl:
gannjondal's avatar
Oh, errors can help to find some insight - or to create something new ;-)

You are very welcome!
quasihedron's avatar
In the olden days we said: 
"If it is a bad run, then it was a test." :rofl::rofl::rofl: 
gannjondal's avatar
GrannyOgg's avatar
I wondered what jit compiling was.
This should make very interesting reading!
gannjondal's avatar
You are right, the term 'JIT' (just in time) is maybe a bit developer speach.
I see that also me did not explain quite well in the headlines what it means. Ashamed 

On the other end - Your have much experience in UF.
And with this feature you can exactly do what could do in UF all the time - writing your own formulas.

The current feature has by far not as many possibilities as in UF, but it's at least a begin.
Thus - if you are interested, just read. I hope it's written understandable enough...

And of course - Thank you for your kind comment :-)
GrannyOgg's avatar
You credit me with more knowledge than I have :)
The last time I tried programming was back in the 80's when everything was written in basic lol!

But thank you for this anyway :D
gannjondal's avatar
Oh, I darkly remember those times :-)
I guess UF 'programming' is not more difficult than good old Basic. No patterns, objects...
You're welcome!
GBLXVIII's avatar
Well, I know nothing about writing formulas and programming but...I'll try something. At least this will make me understand this software a little more.
Thank you!!
gannjondal's avatar
I guess there is no real need to understand of programming, or higher mathematics to use this feature (although it may help to get something completely new).
Well, maybe it would help if one does not fall into daze if there's some 'x=a+b' on the screen ;-)

Just try it. And if you don't like it - there are already enough formulas around!

And of course:  Thank you!
GBLXVIII's avatar
I'm already trying...hope to get something!! :) (Smile) :) (Smile)
radlowsky's avatar
is it posssible  to  make   difs   transforme     formulas ?

like  apollo2D DIF
gannjondal's avatar
Hi Eric.

The only thing I have read is that you need to add DEOption = 20 to the 'Options' section of the formula editor (respective .DEOption at the begin of the .m3f file).
This will move the formula entry to the 'dIFS' tabs of the 'Formulas' window.

However, I'm quite sure that this is not enough. - And I have no idea whether this possibility is already implemented in the current version.
radlowsky's avatar
thx for your interet but

DEOPTION=20 can't be complie  (error)

I don't know hpw to make difs fractal or difs transforms !!!
  I don't that the solution is as esay as that is must be much much hatdest !!!!!!!!
Join the community to add your comment. Already a deviant? Log In