Welcome to Fractal Forums

Community => Meet & Greet => Topic started by: bosottip on December 20, 2011, 03:38:42 PM




Title: Hello everybody.
Post by: bosottip on December 20, 2011, 03:38:42 PM
Hi everybody.

I joined this site quite some time ago, but never posted anything nor actively took part to any discussion and/or forum.
In the meantime I have developed my own software based on XNA (C# and HLSL) distributed by Microsoft with Visual Studio Express, mostly targeting game development for XBOX and Windows.
To cut it short, I've got decent results and fast rendering (using the GPU) and I'm now looking for new formulae or different types of fractals.
Looking around I found several examples of what I'm looking for, but formulae are usually defined in terms that I cannot import in my program; I'm actually looking for the mathemathical formulation itself rather that the table of parameters for the standard programs such as Ultra Fractals.
Is there a place here or somewhere else on the web where I can find them?

Thanks for your attention.
Ciao.


Title: Re: Hello everybody.
Post by: cKleinhuis on December 20, 2011, 03:53:55 PM
hello and welcome to the forums, most of the forums are defined in clear written code, but you have to find
them, mostly you will find them in the theory and research section, or in the mandelbulb sections of the forums,
just search for threads where "DarkBeam" is mentioned, because he is usually the first that writes the plugin
for mandelbulb3d, but usually he does it by taking a clear formulated formula to convert into asm....


Title: Re: Hello everybody.
Post by: bosottip on December 20, 2011, 04:17:35 PM
Hi Fractal Omnipotent.
Thanks for your hint.
I'll start looking for Darkbeam posts and see if I can grab something from him.


Title: Re: Hello everybody.
Post by: David Makin on December 20, 2011, 05:14:17 PM
Also as far as formulas for Mandelbulbs are concerned you can play around with almost any of the angles associated with a 3D vector such that raising the 3D value to a power p raises the magnitude of the value from m (==sqrt(x^2+y^2+z^2) ) to m^p and the angles concerned are all simply multiplied by p.
Obviously only some of the angle combinations used make mathematical sense but almost any variations involving distances x, y , z, sqrt(x^2+y^2), sqrt(x^2+z^2), sqrt(y^2+z^2) and sqrt(x^2+y^2+z^2) will produce interesting results ;)
Plus of course you can also split the "power" in two and have a magnitude power separate from an angle power such that the magnitude becomes m^p but the angles are multiplied by q - in fact one can go further and have separate multiples for each of the angles used (though I don't think anyone's tried that yet ??).
Generally if the angle multiplier is made greater than the magnitude power value then the amount of chaos in the result increases and vice-versa - in fact increasing the angles generically in a formula for orbital attractors is a neat trick that will massively increase the chances of finding strange attractors rather than fixed periodic orbits.


Title: Re: Hello everybody.
Post by: cKleinhuis on December 20, 2011, 06:44:14 PM
and to add in another bunch:

simply convert complex formulas to triplex formulas, usually formulas that just contain exponentiation, multiplication, division, adding and subtracting are suitable to be easily converted ...

but make sure you have a brute force renderer to not mess up with the distance estimation ;9




Title: Re: Hello everybody.
Post by: bosottip on December 21, 2011, 10:13:39 PM
Yes, I already made some of the experiments you suggest, such as the ones in the short rough clips attached.
In the first one I'm using different values for power, vector rotation on xy plane, and for the second rotation.
DE must be modified accordingly, but seems to works fine too.


http://www.youtube.com/watch?v=ufj2nSRvQ6I

http://www.youtube.com/watch?v=vpAiinf-wRU

Sounds like whatever you do, you end up with some different flavour of the classic and well known Mandelbulb.
In my solution I don't have a user friendly environment to paste in different formulae.
I mostly focused on speed and, as I said, I got reasonable results; the two clips render in about 10 minutes, which is probably an acceptable performance.

To change the formula I must edit the HLSL code from the Visual Studio environment. Once yuo have a stable solution and are familiar with the environment it's not too bad.
I tried to figure out where some of the clips I've seen here (specially the Mandelbox ones) come from, but didn't succeceed and I cannot reuse the tables that are often provided with them.
But I'll keep trying.
I still want to work on my own explorer, but I'll probably try Mandelbub3D to see if it helps me addressing the search.

Thanks for your hints and regards.

 


Title: Re: Hello everybody.
Post by: Syntopia on December 21, 2011, 11:34:07 PM
Hi Bosottip,

You could also take a look at the Fragmentarium code examples - there are many fractals there, and the code is GLSL, so it should be easy to translate to HLSL: http://syntopia.github.com/Fragmentarium/


Title: Re: Hello everybody.
Post by: bosottip on December 22, 2011, 12:43:15 AM
Thanks Syntopia.
I'll have a look at it.
Since you mentioned GLSL:
I started using XNA and HLSL for no particular reason; just had to start from somewhere...
XNA makes it easy to render the graphics once you got the vectors, providing some high level funtions that you can use even without understanding in details how they work.
I use my own shader to get the virtual surface, render it to a texture and calculating normals multiplying two vectors adiacent to the voxel.
I believe this is one of the reasons, if not the only reason, why the rendering quality is so poor.
The best way would probably consist of calculating normals in the shader using a DE gradient, but I've got to use a scalar approach and calculate the normals as I said above because when I tried to embed a DE gradient approach the HLSL compiler (version 3) blows up the 512 available instruction slots.
Having said that:
do you know if the 512 instruction slot limitation is due to the HLSL compiler or to the target GPU hardware?
Would GLSL allow to fit more code in the shader?
If so I would consider dropping XNA and HLSL and restart from scratch with GLSLS, even if I currently have no clue of what it would take.


Title: Re: Hello everybody.
Post by: Syntopia on December 22, 2011, 12:58:17 AM
The number of instructions depend on the shader model - there is a list at wikipedia:
http://en.wikipedia.org/wiki/High_Level_Shader_Language

Even my oldest graphics card, a Geforce 8800, supports shader model 4, which seems to have unlimited slots. I have never experienced problems with this in GLSL.

It might be a limitation of XNA, though?


Title: Re: Hello everybody.
Post by: bosottip on December 28, 2011, 04:37:04 PM
You are right, it's XNA.
It doesn't support model 4 nor Directx 10.
Microsoft state they don't intend to, even for future releases. It's hard to believe, but that's their position.
As I said, I started with XNA because it let you play with graphics without having to understand Duirect X, content pipeline and everything else.
I'm having now a look at SlimDX, another DirectX wrapper running in C#.
Not as easy as XNA . . .


Title: Re: Hello everybody.
Post by: cKleinhuis on December 28, 2011, 05:47:43 PM
i dropped xna development as well ( whilst experimenting with the kinect sensor, and shader effects )
it could be a nice framework, but they use it for parallel development for xbox, and xbos is at the level of direct9 ....
i am unsure what graphics framework one should use, i am thinking still about using ogre, with the nice c# port it is quite
as easy to use as xna...